Payment methods
List the card providers your buyers can pay with, which ones you turned off, each one's minimum and where it serves, and what Smart Routing would offer for an amount, so your own checkout shows the same choices.
On this page
The payment method object
A payment method is one card provider your buyers can pay through. The list holds every card provider Railbed offers, including the ones you turned off under Integrations → Card providers in the dashboard. It's in a fixed order, or in your own order for the key's mode when you saved one there, with any provider your order doesn't name after it. A provider is offered to buyers only while its status is available and merchant_off is false.
| Field | Type | Description |
|---|---|---|
id | string | The provider's id, such as stripe. The same id names it on a started session's providers |
name | string | Its name, as buyers see it |
note | string | How buyers pay with it, as the buyer's list says |
status | string | available, or unavailable while it's down, paused by Railbed or not working. In Live mode, the providers that pay on another network (Apple Pay, Alipay, WeChat Pay, Rampnow and Venmo on Ethereum, Cash App on BNB Chain) stay unavailable until your payout wallet is an ordinary wallet (not a smart contract wallet) |
minimum | object or null | Its smallest payment in its own currency, as { amount, currency }, or null when it isn't known. The providers that pay on Ethereum show today's line, which moves with network costs |
regions | array or null | Where its buyers must be, such as ["US"], or null for no known limit |
merchant_off | boolean | true when you turned it off. Buyers are never offered it, in either mode |
{
"object": "list",
"data": [
{
"id": "stripe",
"name": "Stripe",
"note": "Card, Apple Pay or Google Pay",
"status": "available",
"minimum": {
"amount": "2.00",
"currency": "USD"
},
"regions": [
"US"
],
"merchant_off": false
},
{
"id": "paypal",
"name": "PayPal",
"note": "PayPal balance or card",
"status": "available",
"minimum": {
"amount": "5.00",
"currency": "USD"
},
"regions": [
"US"
],
"merchant_off": true
},
{
"id": "cashapp",
"name": "Cash App",
"note": "Cash App balance or card",
"status": "available",
"minimum": {
"amount": "2.00",
"currency": "USD"
},
"regions": [
"US"
],
"merchant_off": false
}
]
}List payment methods
GET /v1/payment_methods
Returns every card provider in the key's mode. Test mode reads a fixed list, so its answers don't change; Live mode reads the current one.
| Parameter | Type | Description |
|---|---|---|
amount | string | A decimal string from "1.00" to "100000.00". With it, the answer adds offered, not_offered and, when nothing is offered, no_providers |
currency | string | With amount: USD, EUR, GBP, CAD, AUD, INR or SEK. Default USD |
country | string | With amount: the buyer's two-letter country, such as US, if you know it. Never your server's own |
curl "https://pay.railbed.io/v1/payment_methods?amount=25.00¤cy=USD&country=US" \
-H "Authorization: Bearer $RAILBED_SECRET_KEY"const methods = await fetch('https://pay.railbed.io/v1/payment_methods?amount=25.00¤cy=USD&country=US', {
headers: { Authorization: `Bearer ${process.env.RAILBED_SECRET_KEY}` },
}).then((r) => r.json());
// methods.offered: what a buyer paying 25.00 USD from the US would see, best first.methods = requests.get(
"https://pay.railbed.io/v1/payment_methods",
params={"amount": "25.00", "currency": "USD", "country": "US"},
headers={"Authorization": f"Bearer {os.environ['RAILBED_SECRET_KEY']}"},
timeout=15,
).json()With amount, offered is what Smart Routing would offer a buyer for that amount right now, best first, at most eight, each with id, name, note and recommended. It leaves out the providers you turned off and those that can't take the amount, the currency or the buyer's country, and follows your own order when you saved one. Nothing is created and no payment is started. It's a preview, not a promise: starting a session decides again, and the provider decides at hand-off.
{
"object": "list",
"data": [
{
"id": "stripe",
"name": "Stripe",
"note": "Card, Apple Pay or Google Pay",
"status": "available",
"minimum": {
"amount": "2.00",
"currency": "USD"
},
"regions": [
"US"
],
"merchant_off": false
},
{
"id": "paypal",
"name": "PayPal",
"note": "PayPal balance or card",
"status": "available",
"minimum": {
"amount": "5.00",
"currency": "USD"
},
"regions": [
"US"
],
"merchant_off": true
},
{
"id": "cashapp",
"name": "Cash App",
"note": "Cash App balance or card",
"status": "available",
"minimum": {
"amount": "2.00",
"currency": "USD"
},
"regions": [
"US"
],
"merchant_off": false
}
],
"offered": [
{
"id": "stripe",
"name": "Stripe",
"note": "Card, Apple Pay or Google Pay",
"recommended": true
},
{
"id": "coindisco",
"name": "Coindisco",
"note": "Card, through Coindisco",
"recommended": false
},
{
"id": "cashapp",
"name": "Cash App",
"note": "Cash App balance or card",
"recommended": false
}
],
"not_offered": [
{
"id": "paypal",
"reason": "merchant_off"
},
{
"id": "revolut",
"reason": "country"
},
{
"id": "sardine",
"reason": "below_minimum"
}
]
}With amount the answer also says why the other providers are left out:
| Field | Type | Description |
|---|---|---|
not_offered | array | Every provider ruled out for this amount, currency and country, in the list's order, each as { id, reason }. reason is below_minimum, currency (it doesn't take that currency), country, merchant_off (you turned it off) or unavailable (down, paused or not working for now, or in Live a provider your payout wallet can't take). A provider in neither offered nor not_offered only ranked below the eight offered |
no_providers | object | Only when offered is empty: why, as { reason, providers }, the same fields a session start's no_providers error carries. See Why no provider is offered |
{
"offered": [],
"not_offered": [
{ "id": "stripe", "reason": "country" },
{ "id": "coinbase", "reason": "merchant_off" },
{ "id": "banxa", "reason": "below_minimum" }
],
"no_providers": { "reason": "providers_off", "providers": ["coinbase"] }
}Ask this before you show a price to buyers in a new country, or after turning a provider off: an empty offered here is a refused start there. New reasons can be added within v1: treat one you don't know as unavailable.
| Error | Cause |
|---|---|
400 invalid_amount | amount isn't a decimal string from "1.00" to "100000.00", or currency or country was sent without it |
400 invalid_currency | currency isn't one of those seven |
400 invalid_country | country isn't a two-letter code |
Turning providers off
You turn providers off in the dashboard, under Integrations → Card providers, with Offer to buyers. Only the account's owner can change it, and the change applies to both modes and to every way buyers pay: checkout pages, payment links, sessions you create here, Shopify and WooCommerce. At least one card provider stays on.
Checkouts and stores set to send buyers to the provider you're turning off are moved in the same step, to Smart Routing or another provider you choose; keeping the provider on leaves them as they are.
Turning providers off also changes the provider minimums your amounts are checked against: only the providers you offer count, so the smallest payment you can take may rise. A checkout later set to send buyers to one provider you turned off sends them to Smart Routing's pick instead when it falls back, and stops them when it doesn't.
Access
Listing payment methods needs the payments:read scope, which Read only keys have.