Bank Accounts API

The bank accounts API allows you to securely store bank account details in exchange for a bank account token. This token can then be used to create a recipient using the recipients API.

A bank account token can only be used once to create a recipient. The token automatically expires after one month if it hasn’t been used.

There are two ways of authenticating when using this API to store bank account details:

  1. In your secure environment, by using HTTP basic access authentication with one of your secret API keys.
  2. In an insecure environment, such as a web browser or mobile application, by using one of your publishable API keys.

This API supports JSONP.

POST /bank_accounts

Creates a bank account token and returns its details.

Optional publishable_api_key Your publishable API key, if requesting from an insecure environment.
name The account holder’s name (e.g. John Smith).
bsb The BSB (Bank State Branch) code of the bank account.
number The account number of the bank account.

Example

curl https://test-api.pinpayments.com/1/bank_accounts -d "publishable_api_key=your-publishable-api-key" \
 -d "name=Mr Roland Robot" \
 -d "bsb=123456" \
 -d "number=987654321"
201 Created
{
  "response": {
    "token": "ba_nytGw7koRg23EEp9NTmz9w",
    "name": "Mr Roland Robot",
    "bsb": "123456",
    "number": "XXXXXX321",
    "bank_name": "",
    "branch": ""
  },
  "ip_address": "192.0.2.42"
}

Error Responses

422 invalid_resource {...}
{
  "error": "invalid_resource",
  "error_description": "One or more parameters were missing or invalid",
  "messages": [
    {
      "param": "bsb",
      "code": "bsb_invalid",
      "message": "BSB can't be blank"
    }
  ]
}

Pin Payments is owned and operated by
Southern Payment Systems Pty Ltd
ABN: 46 154 451 582
Level 1, 34 Queen St,
Melbourne VIC 3000

Privacy Policy Terms Security Status

Australia