Create a Bank Account Token

POST /v1/tokens

curl https://testapi.txpmnts.com/v1/tokens \
  -u sk_test_yFStF-KUmgr-7CoumuY2JA: \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d "bank_account[country]"=US \
  -d "bank_account[currency]"=USD \
  -d "bank_account[account_holder_name]"="John Doe" \
  -d "bank_account[account_holder_type]"=individual \
  -d "bank_account[routing_number]"=110000000 \
  -d "bank_account[account_number]"=000123456789

This above command returns a JSON structure like this:

{
	"id": "9TDphrhSQ9mHsFztnRxXbg",
	"bank_account": {
		"account_holder_name": "John Doe",
		"account_holder_type": "individual",
		"country": "PL",
		"currency": "EUR",
		"swift_code": "",
		"last4": "6789",
		"routing_number": "110000000"
	},
	"fingerprint": "R1gbK7BauiX3XdnUCQRhzlnvMxxtSKVS7NqScFBeVRE",
	"client_ip": "127.0.0.1",
	"created_at": 1568895704,
	"type": "bank_account"
}

Arguments

Contains the bank account information to be stored.

Parameter
Type
Requiered
Description

bank_account[currency]

string

optional

The currency the bank acount is in.

bank_account[country]

string

required

The country in which the bank account is located.

bank_account[account_holder_name]

string

optional

The name of the person or business that owns the bank account. This field is required when attaching the bank account to a Customer object.

bank_account[account_holder_type]

string

optional

The type of entity that holds the account. This can be either individual, company. This fields is required when attaching the bank account to a Customer object.

bank_account[routing_number]

string

conditional

The routing number, short code, or other country-appropriate institution number for the bank account.

bank_account[account_number]

string

required

The account number for the bank account, in string formaat. Must be a checking account.

bank_account[saving]

boolean

optional

True if the account is from saving.

bank_account[bank_name]

string

optional

The name of the financial institution that the account belongs to.

bank_account[swift_code]

string

optional

The account swift code for international transfers.

Returns

Returns the created bank account token if successful. Otherwise, this call returns an error.

Last updated