Skip to content

Direct Debit

Process a Direct Debit Transaction

This article describes the different scenarios that can be simulated in the Sandbox environment. The payment.amount field is used to control the desired behaviour.

NOTE: These scenarios use the POST operation against the /transactions resource. You must have already created a customer token with a bank account payment instrument.

Simulate an Approved Direct Debit Transaction

Any amount value not listed in the below scenarios will result in an approved payment. The result.status will change from pending to approved and you will receive a webhook notification with the updated status.

Simulate a Declined Direct Debit Transaction

This scenario simulates a direct debit transaction being submitted, but then declined by the customer’s bank. The result.status will change from pending to declined and you will receive a webhook notification with the updated status. The result.codes array will contain a code and message indicating the reason for the decline.

CodeMessageAmount
D10000declined11000
D10001target_account_invalid11001
D10002target_account_blocked11002
D10007target_account_closed11007

Simulate a Declined Refund for a Direct Debit Transaction

This scenario simulates a refund being submitted and getting declined by the customer’s bank. The result.status will change from pending to declined and you will receive a webhook notification with the updated status. The result.codes array will contain a code and message indicating the reason for the decline.

CodeMessageAmount
D10000declined11400

Simulate a Late Return for a Direct Debit Transaction

This scenario simulates a direct debit transaction being approved initially, but then later declined by the customer’s bank. In the Production environment, this decline would usually occur after the funds have been settled to the merchant. In this test scenario the result.status will go through the full lifecycle of pending to approved and finally to declined. You will receive a webhook with the updated status for each step.

CodeMessageAmount
D10029dishonoured_after_settlement11010