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. |
Version: v2 2019-04-03
POST Endpoints
/payment_bank
https://wepayapi.com/v2/payment_bank
/payment_bank/persist
https://wepayapi.com/v2/payment_bank/persist
/payment_bank/verify
https://wepayapi.com/v2/payment_bank/verify
/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) | State of the payment bank. |
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) | State of the payment bank. |
Example
{
"payment_bank_id": 235810395803,
"bank_name": "My Bank Name",
"account_last_four": "9876",
"state": "authorized"
}
/payment_bank/verify
Using WePay’s notification APIs, your platform receives a webhook when a payer initiates the micro-deposit verification flow. Once the two micro-deposits are deposited in the payer’s bank account and the payer is ready to verify the microdeposit values, your platform can use the /payment_bank/verify call to collect the micro-deposit amounts and pass the values to WePay for verification.
In concert with the notification APIs, the /payment_bank/verify call allows your platform to retain full control of the user experience surrounding the micro-deposit verification process.
Arguments
Parameter | Required | Type | Description |
client_id | Yes | Integer (64 bits) | The ID for your API application. You can find it on your application's dashboard. |
payment_bank_id | Yes | Integer (64 bits) | The unique ID of the payment_bank . |
client_secret | Yes | String (255 chars) | The secret for your API application. You can find it on your application's dashboard. |
type | Yes | Constant | microdeposits |
microdeposits | Yes | Integer | The list of micro-deposits recieved by the account. Order doesn't matter. Units are in the base currency of the account (e.g. pennies for U.S. accounts). |
Example
{
"client_id": 1234,
"client_secret": "b1fc2f68-4d1f-4a",
"payment_bank_id": 12345,
"type": "microdeposits",
"microdeposits": [
8,
12
]
}
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) | State of the payment bank. Possible values: new , pending , authorized , disabled . |
Example
{
"payment_bank_id": 12345,
"bank_name": "Wells Fargo",
"account_last_four": "6789",
"state": "authorized"
}