POST
Payments
POST /payments/external_accounts
POST /payments/external_accountsconst createExternalAccount = () => {
const timestamp = Math.round(Date.now() / 1000)
const body = {
participant_code: 'ALI123',
account_nickname: 'test1',
account_number: '123456789',
routing_number: '011401533',
account_type: 'checking'
}
const payload = timestamp + 'POST' + '/payments/external_accounts' + JSON.stringify(body)
const decodedSecret = Buffer.from(apiSecret, 'base64')
const hmac = crypto.createHmac('sha256', decodedSecret)
const signedPayload = hmac.update(payload).digest('base64')
// SET HEADERS
const headers = {
'X-NDAX-API-KEY': 'public_key',
'X-NDAX-SIGNED': signedPayload,
'X-NDAX-TIMESTAMP': timestamp,
'X-NDAX-PASSPHRASE': 'passphrase'
}
const options = {
headers,
body,
json: true
}
return request.post(`https://api.ndax.in/payments/external_accounts`, options)
}Sample response
Creates a new external account object that is required when generating payment transactions.
Request body:
participant_code
The participant code of the Platform’s participant that the external account will be associated with.
string
account_nickname
The account nickname of the external account, i.e. “Primary Checking”
string
account_number
The full bank account number of the external account.
string
routing_number
The routing number of the bank where the external account is held.
string
account_type
Either “checking” or “savings” and indicates what type of account the external account is.
string
Additional fields in response:
external_account_id
The unique identifier that NDAX generates to identify the external account.
string
GET /payments/external_accounts
GET /payments/external_accountsSample response
Used to get a list of external_accounts associated with a Platform’s participants.
Query parameters include:
participants(optional) list of participant codes that can be used to filter for external accounts, example: ALI123,TES123.page(optional) for paginating through the list of accounts.size(optional) for paginating through the list of accounts.
Response:
request_id
The unique identifier generated by NDAX associated with the request.
string
participant_code
The participant code of the Platform’s participant that the external account will be associated with.
string
account_nickname
The account nickname of the external account, i.e. “Primary Checking”
string
account_number
The full bank account number of the external account.
string
routing_number
The routing number of the bank where the external account is held.
string
account_type
Accepts either “checking” or “savings” and indicates what type of account the external account is.
string
external_account_id
The unique identifier that NDAX generates to identify the external account.
string
Last updated