The /payment_bank API calls

The payment_bank object represents a bank account that is tokenized from the tokenization.3.latest.js library and is used for payments.

Payment Bank States

The payment_bank object has the following states and possible state transitions:

new The payment bank was just created by the application.
pending The payment bank is being authorized for use with a checkout. If a user goes through the manual account entry flow during tokenization, we send deposits to their account and ask them to confirm them.
authorized The payment bank is authorized for use with a checkout.
disabled The payment bank has been disabled.

payment_bank states

Version: v2 2017-05-31

POST Endpoint

https://wepayapi.com/v2/payment_bank

/payment_bank

Use this call to look up the details of a payment bank.

Arguments

Parameter Required Type Description
payment_bank_id Yes Integer (64 bits) The unique ID for the payment bank you want to look up.
client_id Yes Integer (64 bits) The ID for your API application. You can find it on your application's dashboard.
client_secret Yes String (255 chars) The secret for your API application. You can find it on your application's dashboard.

Example

{
   "payment_bank_id": 235810395803,
   "client_id": 12345,
   "client_secret": "asbasf2341"
}

Response

Response Type Description
payment_bank_id Integer (64 bits) The unique ID for the payment bank.
bank_name String (255 chars) The name of the payment bank account.
account_last_four String (255 chars) The last four digits of the payment bank account.
state String (255 chars) The state that the payment bank is in.

Example

{
   "payment_bank_id": 235810395803,
   "bank_name": "My Bank Name",
   "account_last_four": "9876",
   "state": "new"
}

/payment_bank/persist

Use this call when you want to save a bank account on your platform for later use as a payment method, without calling /checkout/create now. If the payer has already verified the bank account, it will be available immediately for use as a payment method. If the payer has not verified the bank account, this call will initiate the sending of micro-deposits.

Arguments

Parameter Required Type Description
payment_bank_id Yes Integer (64 bits) The unique ID of the payment_bank.
client_id Yes Integer (64 bits) The ID for your API application. You can find it on your application's dashboard.
client_secret Yes String (255 chars) The secret for your API application. You can find it on your application's dashboard.

Example

{
   "payment_bank_id": 235810395803,
   "client_id": 12345,
   "client_secret": "asbasf2341"
}

Response

Response Type Description
payment_bank_id Integer (64 bits) The unique ID for the payment bank.
bank_name String (255 chars) The name of the payment bank account.
account_last_four String (255 chars) The last four digits of the payment bank account.
state String (255 chars) The state that the payment bank is in.

Example

{
   "payment_bank_id": 235810395803,
   "bank_name": "My Bank Name",
   "account_last_four": "9876",
   "state": "authorized"
}