Direct Debit Flow
Direct Debit relies on the concepts of having a known customer and obtaining an authority to debit the customer’s account. As such, the workflow for processing a Direct Debit payment slightly different to that of a normal online card payment.
In order to debit a customer’s bank account, you first have to tokenise them using the Global Payments API, then you can submit payments using the payment.instrument.customer.paymentInstrumentId instead of passing the bank account details in the transaction request.
A high level overview of the workflow is below.
Step 1: Present the customer with all the information related to the payment, eg. any transaction fees, setup fees, or failed payment fees that may apply. The customer is also presented with a link to the Global Payments DDR Service Agreement.
Step 2: The customer provides their bank account details and authorises the Direct Debit Request. This is usually an explicit action, eg. ticking a box with the wording ‘I agree to the Terms and Conditions of the Direct Debit Request and Service Agreement’.
Step 3: Call the /customers endpoint to create a customer token, then pass the bsb and account number to the /customers/{id}/paymentinstruments endpoint to store the bank account details as a payment method against the token.
Step 4: Pass the token details to the /transactions endpoint to process a payment. As Direct Debit payments are not processed in real time, you will receive a pending response, indicating that Global Payments has received the request and will process it in the next batch run.
Step 5: Receive and handle the webhook event from Global Payments when the payment has been successfully processed and settled.