Scenario Simulator
Scenario Simulators allow you to manually trigger and test certain paths that your integration will encounter in the real world. These endpoints are only active in the sandbox environment.
Simulate a scenario#
POST
/scenario_simulators/{scenario_simulator_id}/actions/runRuns the specific scenario simulator against the specific resource
Path Parameters
| Name | Type | Description |
|---|---|---|
scenario_simulator_idrequired | string | The scenario simulator id |
Responsehttp
Request Body
scenario_simulatorsobject1 properties
linksobject
1 properties
resourcestring
ID of the resource to run the simulation against.
Must be same type of resource as the simulator that is being run.
eg. Payment ID for payment_failed, Mandate ID for mandate_activated etc
Response 200
Action completed successfully
scenario_simulatorsobject1 properties
idstring
The unique identifier of the simulator, used to initiate simulations. One of:
creditor_verification_status_action_required: Sets a creditor'sverification statustoaction required, meaning that the creditor must provide further information to GoCardless in order to verify their account to receive payouts.creditor_verification_status_in_review: Sets a creditor'sverification statustoin review, meaning that the creditor has provided all of the information requested by GoCardless to verify their account, and is now awaiting review.creditor_verification_status_successful: Sets a creditor'sverification statustosuccessful, meaning that the creditor is fully verified and can receive payouts.payment_confirmed: Transitions a payment through toconfirmed. It must start in thepending_submissionstate, and its mandate must be in theactivatedstate (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may bepending_submission, since their mandates are submitted with their first payment).payment_paid_out: Transitions a payment through topaid_out, having been collected successfully and paid out to you. It must start in thepending_submissionstate, and its mandate must be in theactivatedstate (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may bepending_submission, since their mandates are submitted with their first payment).payment_failed: Transitions a payment through tofailed. It must start in thepending_submissionstate, and its mandate must be in theactivatedstate (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may bepending_submission, since their mandates are submitted with their first payment).payment_charged_back: Behaves the same as thepayout_paid_outsimulator, except that the payment is transitioned tocharged_backafter it is paid out, having been charged back by the customer.payment_chargeback_settled: Behaves the same as thepayment_charged_backsimulator, except that the charged back payment is additionally included as a debit item in a payout, thereby settling the charged back payment.payment_late_failure: Transitions a payment through tolate_failure, having been apparently collected successfully beforehand. It must start in either thepending_submissionorpaid_outstate, and its mandate must be in theactivatedstate (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may bepending_submission, since their mandates are submitted with their first payment). Not compatible with Autogiro mandates.payment_late_failure_settled: Behaves the same as thepayment_late_failuresimulator, except that the late failure is additionally included as a debit item in a payout, thereby settling the late failure.payment_submitted: Transitions a payment tosubmitted, without proceeding any further. It must start in thepending_submissionstate.mandate_activated: Transitions a mandate through toactivated, having been submitted to the banks and set up successfully. It must start in thepending_submissionstate. Not compatible with ACH, BECS, BECS_NZ and SEPA mandates, which are submitted and activated with their first payment.mandate_customer_approval_granted: Transitions a mandate through topending_submission, as if the customer approved the mandate creation. It must start in thepending_customer_approvalstate. Compatible only with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments associated with the mandate will be transitioned topending_submission. All subscriptions associated with the mandate will becomeactive.mandate_customer_approval_skipped: Transitions a mandate through topending_submission, as if the customer skipped the mandate approval during the mandate creation process. It must start in thepending_customer_approvalstate. Compatible only with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments associated with the mandate will be transitioned topending_submission. All subscriptions associated with the mandate will becomeactive.mandate_failed: Transitions a mandate through tofailed, having been submitted to the banks but found to be invalid (for example due to invalid bank details). It must start in thepending_submissionorsubmittedstates. Not compatible with SEPA mandates, which are submitted with their first payment.mandate_expired: Transitions a mandate through toexpired, having been submitted to the banks, set up successfully and then expired because no collection attempts were made against it for longer than the scheme's dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, Betalingsservice, and BECS). It must start in thepending_submissionstate. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do not expire.mandate_transferred: Transitions a mandate through totransferred, having been submitted to the banks, set up successfully and then moved to a new bank account due. It must start in thepending_submissionstate. Only compatible with Bacs and SEPA mandates.mandate_transferred_with_resubmission: Transitions a mandate throughtransferredand resubmits it to the banks, can be caused be the UK's Current Account Switching Service (CASS) or when a customer contacts GoCardless to change their bank details. It must start in thepending_submissionstate. Only compatible with Bacs mandates.mandate_suspended_by_payer: Transitions a mandate tosuspended_by_payer, as if payer has suspended the mandate after it has been setup successfully. It must start in theactivatedstate. Only compatible with PAY_TO mandates.refund_paid: Transitions a refund topaid. It must start in either thepending_submissionorsubmittedstate.refund_settled: Transitions a refund topaid, if it's not already, then generates a payout that includes the refund, thereby settling the funds. It must start in one ofpending_submission,submittedorpaidstates.refund_bounced: Transitions a refund tobounced. It must start in either thepending_submission,submitted, orpaidstate.refund_returned: Transitions a refund torefund_returned. The refund must start inpending_submission.payout_bounced: Transitions a payout tobounced. It must start in thepaidstate.billing_request_fulfilled: Authorises the billing request, and then fulfils it. The billing request must be in thependingstate, with all actions completed except forbank_authorisation. Only billing requests with apayment_requestare supported.billing_request_fulfilled_and_payment_failed: Authorises the billing request, fulfils it, and moves the associated payment tofailed. The billing request must be in thependingstate, with all actions completed except forbank_authorisation. Only billing requests with apayment_requestare supported.billing_request_fulfilled_and_payment_confirmed_to_failed: Authorises the billing request, fulfils it, moves the associated payment toconfirmedand then moves it tofailed. The billing request must be in thependingstate, with all actions completed except forbank_authorisation. Only billing requests with apayment_requestare supported.billing_request_fulfilled_and_payment_paid_out: Authorises the billing request, fulfils it, and moves the associated payment topaid_out. The billing request must be in thependingstate, with all actions completed except forbank_authorisation. Only billing requests with apayment_requestare supported.
Errors 400401404422500
400
Bad Request
401
Unauthorised
404
Not found
422
Validation Error
500
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobject