Create a One-time Token

One-time token represents payment source information including Credit cards or Direct Debit account details. It is a disposable token for creating charges/subscriptions/customers or updating customers. One-time tokens expire after 3 hours.

ENDPOINTMETHODHEADERS
/payment_sources/tokens
POST
x-access-token: An Access Token generated in the Paydock dashboard
Content-Type: application/json
Schema Attributes
PropertyTypeRequired
first_namestringNo
last_namestringNo
emailstringNo
phonestringNo
typestringYes
account_namestringYes
account_numberstringYes
account_bsbstringYes
account_routingstringNo
gateway_idstringNo
Examples
Bank Account
Request
{
  "first_name": "Wanda",
  "last_name": "Mertz",
  "email": "wanda.mertz@example.com",
  "phone": "+1234567890",
  "type": "bank_account",
  "account_name": "Wanda Mertz",
  "account_number": "12345678",
  "account_bsb": "064000",
  "gateway_id": "5d1df20be205944082f778b8"
}
Response
{
  "status": 201,
  "error": null,
  "resource": {
    "type": "token",
    "data": "f6301700-dcfe-4640-aabf-eff4ee3d96a6"
  }
}