curl https://api.zbdpay.com/api/v1/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/payment-methods \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Payment methods retrieved.",
"data": {
"payment_methods": [
{
"payment_method_id": "pm_1c7e9a20-5d4b-4f3a-8e62-7b0d2f91c3a8",
"rail": "ach",
"institution_name": "Chase",
"currency": "USD",
"last4": "6789",
"status": "active"
}
]
},
"error": null
}
Users
List Payment Methods
Read a user’s linked payment methods, masked, with the ID you send on a payout.
GET
/
api
/
v1
/
users
/
{userId}
/
payment-methods
curl https://api.zbdpay.com/api/v1/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/payment-methods \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Payment methods retrieved.",
"data": {
"payment_methods": [
{
"payment_method_id": "pm_1c7e9a20-5d4b-4f3a-8e62-7b0d2f91c3a8",
"rail": "ach",
"institution_name": "Chase",
"currency": "USD",
"last4": "6789",
"status": "active"
}
]
},
"error": null
}
Users add payment methods in the widget’s payment method selection flow. This endpoint returns them, masked, so your backend can get the
payment_method_id to send on Create a Payout, or show them in your own selector.
Configuration
Header Parameters
string
required
Your ZBD API key.
Path Parameters
string
required
The ZBD user ID returned by Create a User.
curl https://api.zbdpay.com/api/v1/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/payment-methods \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Payment methods retrieved.",
"data": {
"payment_methods": [
{
"payment_method_id": "pm_1c7e9a20-5d4b-4f3a-8e62-7b0d2f91c3a8",
"rail": "ach",
"institution_name": "Chase",
"currency": "USD",
"last4": "6789",
"status": "active"
}
]
},
"error": null
}
Response
object[]
The user’s payment methods. Each one is a single account paid over a single rail, so the same bank account can appear once for each rail it supports.
string
The ID you send on Create a Payout.
string
How the payout reaches the account, for example
ach. Rails differ in fees and timing. See Payout Methods.string | null
The bank or provider, so you can show something like “Chase ending in 6789”.
string
The currency the method is paid in.
string
The last four digits of the account.
string
active or inactive. A payout to an inactive method returns 422 payment_method_inactive.Errors
| HTTP | code | When |
|---|---|---|
401 | unauthorized | The API key is missing or invalid |
404 | user_not_found | The user doesn’t exist under your key |
Was this page helpful?