Create a direct debit
/direct_debitsBody Parameters
descriptionstringMust be unique. Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore. It is recommended you make this descriptive for your customer - e.g. Invoice ABCD123.
amountnumber (float)Amount. Minimum 0.01, positive only.
bsbstringThe source account's BSB number. Format: ###-###
account_namestringThe source account name. Max 32 characters.
account_numberstringThe source account number. Max 9 digits.
datestring (date)(optional)Date of the direct debit. Optional but recommended. Defaults to the next processing period (current day if before 17:00, next day if after). Must be in the future.
referencestring(optional)Unique reference
metadataobject(optional)Metadata of the direct debit
bank_accountstring(optional)The Fat Zebra bank account ID to be used in place of account_name, account_number, and bsb. If bank_account is supplied, the other attributes should be omitted.
Request
curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits -u TEST:TEST -d'
{
"description":"Confirmation",
"amount":42,
"bsb":"123-123",
"account_name":"Test",
"account_number":"012345678"
}'Response
{
"successful": true,
"response": {
"id": "071-DD-L4M3SN0E",
"amount": 42.0,
"bsb": "123-123",
"account_number": "012345678",
"account_name": "Test",
"description": "Confirmation",
"reference": "071-DD-L4M3SN0E",
"date": "2018-09-14",
"process_date": null,
"status": "New",
"result": null,
"metadata": null
},
"errors": [],
"test": true
}{
"successful": false,
"response": {},
"errors": [
"Could not find bank account 071-B-ABC123"
],
"test": true
}