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.
| Code | Message | Amount |
|---|---|---|
| D10000 | declined | 11000 |
| D10001 | target_account_invalid | 11001 |
| D10002 | target_account_blocked | 11002 |
| D10007 | target_account_closed | 11007 |
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.
| Code | Message | Amount |
|---|---|---|
| D10000 | declined | 11400 |
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.
| Code | Message | Amount |
|---|---|---|
| D10029 | dishonoured_after_settlement | 11010 |