CollectionsDirect DebitAuthorizations

Create a Direct Debit Authorization

POST
/v1/direct-debit-authorizations

Authorization

authorization
AuthorizationBearer <token>

Set Your Secret API Key

In: header

Header Parameters

Idempotency-Key?string

A unique value, eg. a UUID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

billReferenceNumber*string

Bill reference number for your payer. Must be at most 35 characters. Only alphanumeric characters and dashes are accepted. This must be unique for each new Direct Debit Authorization that you create.

Match^[a-zA-Z0-9\-]+$
Length1 <= length <= 35
businessUnitId?string

Business unit identifier, where your organization uses one.

Length1 <= length <= 5
country?string

Value in

  • "SG"
  • "MY"
  • "HK"
  • "KR"
  • "AU"
  • "US"
  • "ID"
  • "TW"
  • "BR"
  • "DK"
  • "PH"
  • "VN"
  • "AE"
  • "GB"
  • "IN"
  • "MX"
  • "CN"
endDate*string

If the payer sets an expiry date earlier than this end date with their bank during authorization, Acme will fail this authorization.

Formatdate
maxAmount?number
Deprecated

A positive integer value in the specified currency's smallest unit. E.g. SGD $10 will be represented as 1000 (in cents). Some banks allow payers to set deduction limits when they are approving the Direct Debit Authorizations. If the payer sets a deduction limit that is lower than maxAmount, Acme will fail the Direct Debit Authorization. Deprecated: use precheckMinAmount and precheckMaxAmount instead.

Range1 <= value <= 20000000
maxAmountCurrency?string
Deprecated

Three-letter ISO 4217 currency code in full uppercase. Currently supports SGD. Deprecated: use precheckCurrency instead.

payerName*string

Payer's name.

Length1 <= length <= 140
payerSegment*string

Your payer's segment: RETAIL or CORPORATE.

Value in

  • "CORPORATE"
  • "RETAIL"
payerSwiftBic*string

Your payer's bank SWIFT/BIC code. Use List Direct Debit Banks for the banks that support eGIRO and their current status.

Match^[A-Z0-9]{4}SG[A-Z0-9]{5}$
Length1 <= length
precheckCurrency?string

Three-letter ISO 4217 currency code in full uppercase. Currently supports SGD. This is required if either precheckMinAmount or precheckMaxAmount is set.

precheckMaxAmount?number

A positive integer value in the specified currency's smallest unit. E.g. SGD $10 will be represented as 1000 (in cents).

If you attempt to create a Direct Debit Payment (for this Direct Debit Authorization) with an amount greater than precheckMaxAmount, Acme will reject the Direct Debit Payment request. Use this as a guardrail to prevent yourself from overcharging your payers.

If the payer sets a deduction limit that is lower than precheckMaxAmount, precheckMaxAmount will be updated to the lower deduction limit.

If precheckMaxAmount is not set, it will be updated to the deduction limit set by the payer. If the payer does not set a deduction limit, and the payer's bank does not set a default deduction limit, Acme will set precheckMaxAmount to SGD $200,000.00.

Range1 <= value <= 20000000
precheckMinAmount?number

A positive integer value in the specified currency's smallest unit. E.g. SGD $10 will be represented as 1000 (in cents). Some banks allow payers to set deduction limits when they are approving Direct Debit Authorizations. If the payer sets a deduction limit that is lower than precheckMinAmount, Acme will fail the Direct Debit Authorization. If you attempt to create a Direct Debit Payment with an amount lower than precheckMinAmount, Acme will reject the Direct Debit Payment request.

Range1 <= value <= 20000000
returnUrl*string

Payer will be redirected to this URL after they have authorized the Direct Debit Authorisation at their bank's website.

Match^[A-Za-z][A-Za-z0-9+\-\.]+:\/\/[^:\?\/]+(:[0-9]+)?((\/[^\/\?]*)*\/?(\?[^\?\/]*)?)?$
Length0 <= length <= 2048

Response Body

*/*

curl -X POST "https://example.com/v1/direct-debit-authorizations" \  -H "Content-Type: application/json" \  -d '{    "billReferenceNumber": "string",    "endDate": "2019-08-24",    "payerName": "string",    "payerSegment": "CORPORATE",    "payerSwiftBic": "string",    "returnUrl": "string"  }'
{  "authorizeUrl": "string",  "billReferenceNumber": "string",  "cancelReturnUrl": "string",  "cancelUrl": "string",  "createdAt": "string",  "endDate": "string",  "failureReason": "string",  "id": "string",  "maxAmount": 0,  "maxAmountCurrency": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "payerAuthorizedMaxAmount": 0,  "payerBankAccountNumber": "string",  "payerBankCode": "string",  "payerIdHash": "string",  "payerIdType": "string",  "payerName": "string",  "payerSegment": "string",  "payerSwiftBic": "string",  "precheckCurrency": "string",  "precheckMaxAmount": 0,  "precheckMinAmount": 0,  "returnUrl": "string",  "startDate": "string",  "status": "string",  "transactionReference": "string",  "underlyingErrorMessage": "string",  "updatedAt": "string"}