Skip to main content
GoCardless

GoCardless sandbox in Odoo: which environment you use and how to go live

With the GoCardless connector for Odoo, the payment provider is connected to a single environment, sandbox or live account, depending on the Live setting when you connect (in Odoo 20; in 17, 18 and 19, on the provider's «State»). If you change that setting afterwards, the module sends nothing to GoCardless and asks you to disconnect and connect again.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 17 November 2026

Key facts

Versions
Odoo 17, 18, 19 and 20
Checked
in the connector's source code, version 20.0 · against the sources linked at the end
Reading time
5 min

What Odoo brings together and which environment the provider is connected to

GoCardless offers a sandbox, with its own API address (https://api-sandbox.gocardless.com/), and the live account. The token the payment provider stores belongs to one of them, and mixing them only produces an error that does not explain why. So before sending a request to GoCardless, the connector compares the token's environment with the mode the provider is in now.

In Odoo 20, the GoCardless payment provider's form brings together the Live setting and the environment it was connected to; your customers' mandates are stored as payment methods. The Connected Environment field is on the payment provider's form and is read-only. With the default values it is not visible: it is hidden while the provider has no connected environment. Its values are Sandbox and Live, and its help text reads: Which GoCardless environment the stored token belongs to. The module itself fills it in (the user does not), and the Disconnect button empties it.

GoCardless payment provider in test mode, configuration tab, with the options to connect your account or paste an access token (advanced), the connected status and the test connection button
Configuration tab of the GoCardless provider, with demonstration data and the interface in English
How to stop copy-pasting between apps (Odoo)
Video: How to stop copy-pasting between apps (Odoo)

Sandbox against live account

AspectSandboxLive account
Live settingOffOn
API addresshttps://api-sandbox.gocardless.com/A different one: the module uses one address for each mode
Connected Environment, when the module fills it in on connectingSandboxLive
If you change Live after connectingThe module sends nothing and asks you to disconnect and connect againThe same
Reinstate mandate (sandbox) button in Odoo 20Visible if the mandate is cancelled, failed or expiredNot visible; if the action is reached, it stops with a message
Copy of the databaseThe module does not use the original database's connection; in a test copy, paste a sandbox token in the advanced mode or connect with Live offThe module does not use the live account in a copy until This database charges from now on is pressed

What happens if you change the mode after connecting

The module compares the environment stored in Connected Environment with what the Live setting says now. If they differ, it sends nothing to GoCardless and stops with this message: This provider was connected to the GoCardless …. Disconnect it and connect again after changing its Live setting. In place of the dots it shows the environment the provider was connected to.

You can run into it by pressing Reinstate mandate (sandbox) on a connection made in live mode with the setting now switched off. The way out is what the message says: disconnect and connect again.

Odoo 17, 18 and 19 have no «Live» setting: the provider's «State» field does that job, with the values «Disabled», «Enabled» and «Test Mode». In those versions this message ends with «Disconnect it and connect again after changing its state.», the warning in a copy of the database suggests connecting in «Test Mode» instead of with «Live» off, and to move to the live account you set the «State» to «Enabled».

What the «Reinstate mandate (sandbox)» button does

The button is on the view of the saved mandate, the GoCardless payment method. In Odoo 20 it is hidden if the method is not a GoCardless one, if the provider is live, or if the mandate is not cancelled, failed or expired. The Mandate Status field is not visible in any view, so the button appears or not depending on a status you do not read on screen. In Odoo 17, 18 and 19 the condition looks at the provider's state and hides the button when it is enabled, instead of the live setting.

When you press it, the module checks the following and, if everything is in order, asks for the reinstatement:

  1. If the provider is live, it stops with GoCardless does not let this connection reinstate a live mandate. Ask the customer for a new mandate.
  2. If the mandate's status cannot be reinstated, it stops and the customer has to sign a new mandate.
  3. Otherwise it asks GoCardless to reinstate the mandate, instead of making the customer sign again. That request first goes through the connected environment check: if it does not match the Live setting, it stops with the message from the previous section.
  4. It marks the mandate as awaiting reinstatement and, if it has an associated contact, leaves a note on that contact: Reinstatement of the GoCardless mandate requested. It stays unusable until the bank confirms it.

Reinstatement is not instant: the customer's bank has to accept it, and the mandate stays inactive until GoCardless confirms.

List of saved payment methods with GoCardless SEPA mandates for several partners, showing the SEPA Direct Debit method, the provider and the mandate reference
Mandates saved as payment methods, with demonstration data from an invented gym and the interface in English

How to move to the live account

  1. Change the provider's Live setting (in Odoo 17, 18 and 19, set its «State» to «Enabled»).
  2. Disconnect the provider, as the message asks (the Disconnect button empties Connected Environment).
  3. Connect again: with the two-click connection or, in the advanced mode, by pasting an access token from the live account.

If the database that will collect with the live account replaces another one, there is the This database charges from now on button. It asks for confirmation and it needs Live switched on and this database's live access token. If either is missing, it stops with Turn Live on and paste this database's live access token first. In Odoo 17, 18 and 19 the message is «Set the provider to Enabled and paste this database's live access token first.». In the advanced mode, the other database can go on collecting until you deactivate its access token in GoCardless.

How FlexigoTech helps

The GoCardless connector comes with a FlexigoTech Cloud subscription; prices, excluding VAT, are on the Odoo Apps listing and on the module page. If you do not use Odoo yet, FlexigoTech implements Odoo for versions 17, 18, 19 and 20 and builds custom connectors and integrations, so you can try GoCardless in the sandbox before moving to the live account.

Keep reading

Checked in the connector's source code (version 20.0) and the linked sources

Sources

  • Module source code: flexigo_payment_gocardless 20.0 (6fe1a716): const.py
  • Module source code: flexigo_payment_gocardless 20.0 (6fe1a716): models/payment_provider.py
  • Module source code: flexigo_payment_gocardless 20.0 (6fe1a716): views/payment_token_views.xml
  • Module source code: flexigo_payment_gocardless 20.0 (6fe1a716): models/payment_token.py
  • flexigotech.com/en/services.html
  • Module source code: flexigo_payment_gocardless 20.0 (6fe1a716): __manifest__.py