Complete a single Redirect Flow

POST {{url}}/redirect_flows/{{redirect_flow}}/actions/complete

Please consider using the Billing Requests API instead of Redirect Flows for any future integrations.

This creates a customer, customer bank account, and mandate using the details supplied by your customer and returns the ID of the created mandate.

This will return a redirectflowincomplete error if your customer has not yet been redirected back to your site, and a redirectflowalreadycompleted error if your integration has already completed this flow. It will return a badrequest error if the session_token differs to the one supplied when the redirect flow was created.

Complete a Redirect Flow API Docs

Request Body

{"data"=>{"session_token"=>"{{session_token}}"}}

RESPONSES

status: OK

{"redirect_flows":{"id":"RE00065090KJ6MDFER2C70QAXXHNHMTM","description":"Wine boxes","session_token":"SESS_9095ad21-a48b-4eec-af1e-bc23b50fbcb8","scheme":"bacs","success_redirect_url":"https://example.com/pay/confirm","created_at":"2024-03-22T20:29:05.480Z","links":{"creditor":"CR00006C6DF0TD","billing_request":"BRQ0005Y9HKHDD9","mandate":"MD000ZS5B9F5D5","customer":"CU0014DQJE46DT","customer_bank_account":"BA000ZP5RGQCW6"},"metadata":{},"confirmation_url":"https://pay-sandbox.gocardless.com/flow/RE00065090KJ6MDFER2C70QAXXHNHMTM/success","mandate_reference":"4PCCZDD"}}