Create a Payment Token

POST /directdebit/v1/accounts/account_id/purchases

You can process a Direct Debit purchase request with a single-use token generated from the Customer Vault API and at the same time create a permanent payment token that will be associated with the customer's profile and that will be available for future requests in the Direct Debit API.

This request is currently supported for ACH and EFT bank accounts only.

The following example shows how to create a permanent payment token for an EFT account by using a single-use token. The value used for the paymentToken field in this request is the previously generated paymentToken that is returned in the response to an EFT single-use token creation request in the Customer Vault API.

By default the Direct Debit processing system will check for duplicate transactions.

Prior to trying the example, you should:

  • Provide a unique merchant reference number for each transaction (if this value is not unique, and the number has been used in the past 90 days, the request will be flagged as a duplicate).
  • Replace the merchant account number (89987201 in the example above) in the URL with the test account number you received for the currency you wish to test.
  • Replace the API key (after the -u) with the API key you have received.

The response includes a multiUsePaymentToken value in the eft object. You can now use this value as the paymentToken in any EFT Direct Debit request that can use this token in place of full bank account details , e.g., an EFT Purchase.

See our API Reference section for a full description of the parameters required for the request and returned in the response.

Did you find this page useful?