GoCardlessDeveloper Docs
Create a sandbox account

Scenario Simulators#

View as Markdown

When you're building an integration, there are common paths you should make sure your integration handles — for example, a customer cancelling their mandate or a payment failing due to insufficient funds.

In the sandbox environment, scenario simulators let you manually trigger these cases to test how your integration responds. They're available through the dashboard and the API.

Dashboard-triggered scenarios#

Dashboard-triggered scenarios are started from your Sandbox Dashboard. Head to the Developers tab → API Settings, open the Actions dropdown, and click Simulate scenario.

Simulate a scenario

Choose a scenario from the dropdown. You'll see a description of what will happen and anything to be aware of — some simulators are incompatible with certain schemes.

Simulate a scenario modal

Enter the ID of the resource to simulate against, then click Simulate scenario. If the resource can't be found or isn't compatible with the chosen scenario, you'll see an error.

Dashboard-triggered scenarios support all name-triggered scenarios below, plus extras such as creditor verification status for partners.

API-triggered scenarios#

Trigger simulators via the API. See the scenario simulators API reference for details.

Name-triggered scenarios#

Name-triggered scenarios use special customer given_name values. For example, creating a customer named "Successful" activates their mandate immediately and pays out payments straight away. All relevant events and webhooks are sent.

given_nameDescriptionOn mandate creationOn payment creationSchemes
SuccessfulPayment collected and paid out successfully.submittedactivatedsubmittedconfirmedpaid_out (payout created)ACH, Autogiro, Bacs, BECS, BECS NZ, Betalingsservice, PAD, SEPA Core
PennilessPayment fails (e.g. insufficient funds).submittedactivatedsubmittedfailedACH, Autogiro, Bacs, BECS, BECS NZ, Betalingsservice, PAD, SEPA Core
FicklePayment collected then charged back.submittedactivatedsubmittedconfirmedpaid_outcharged_backACH, Autogiro, Bacs, BECS, BECS NZ, Betalingsservice, PAD, SEPA Core
LatePayment fails but the bank reports it later than normal.submittedactivatedsubmittedconfirmedfailedACH, Bacs, BECS, BECS NZ, SEPA Core
InvalidMandate fails because bank details are invalid.submittedfailedN/AACH, Autogiro, Bacs, BECS, BECS NZ, Betalingsservice, PAD
ExpiredMandate expires after the scheme dormancy period (13 months Bacs, 15 months BECS/Betalingsservice, 3 years SEPA).submittedactivatedexpiredN/AACH, Bacs, BECS, BECS NZ, Betalingsservice, PAD, SEPA Core
SwitchingBacs mandate transferred via the Current Account Switching Service.submittedactivetransferredN/ABacs only

Instalment Schedules#

Instalment schedule states are simulated using a special customer given_name or a special schedule name:

Schedule nameCustomer given_nameDescriptionResult
N/ASuccessfulAll payments collected successfully.completed
N/APennilessPayments cannot be collected.errored
FailyN/AFails with: must be on or after mandate's next_possible_customer_charge_datecreation_failed

Outbound Payments#

Simulate outbound payment outcomes by setting a specific description value at creation:

descriptionDescriptionResult
failed_to_executeSubmission to the bank fails.executingfailed
failed_due_to_bank_rejectionSubmission succeeds but is rejected by the recipient's bank.executingfailed
failed_due_to_bank_rejection_after_executionSubmitted and accepted, then later rejected.executingexecutedfailed
Any other valueSubmission succeeds and is accepted.executingexecuted

Payer Name Verification#

To simulate a No Match result in the Billing Request Flow, use these details at the collect_bank_account_details step:

account_holder_namesort_codeaccount_number
No Match20000055779911

Confirmation of Payee (CoP) for Outbound Payments#

Simulate CoP results by creating bank accounts with specific account_holder_name values:

account_holder_namesort_codeaccount_numberResult
PARTIAL MATCH20000055779911partial_match
NO MATCH20000055779911no_match
UNABLE TO MATCH20000055779911unable_to_match
Any other name20000055779911full_match

What's next?#