Getting started
ERA Open Rail is one API for money in, money moving and money out: cards, bank transfers, digital dollars, transfers, payment links and payouts, all on one ledger.
Sandbox address | https://api.eraopenrail.com |
Sandbox keys | start with era_test_ and move test money only |
Format | JSON in, JSON out, HTTPS only |
1. Get a sandbox key in the console (API keys, or step 1 of any path). 2. Call the API from your server with the key. 3. Watch what happened in Webhooks and events.
curl https://api.eraopenrail.com/v1/accounts \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: open-ana-0001" \
-H "Content-Type: application/json" \
-d '{"name": "ana"}'Client libraries with no dependencies: era-rail.mjs for Node 18+ (included in every template) and era_rail.py for Python 3. Download both from Templates in the console.
Keys and scopes
Every call except the public ones needs Authorization: Bearer <key>. A key belongs to one platform and only ever sees that platform's accounts.
read | balances, statements, proofs, addresses, quotes, events |
move | accounts, deposits, transfers, conversions, backers, webhook |
payout | card and crypto payouts, refunds, payout addresses, paying other platforms |
Keys from the console have all three scopes. Make a narrower key with POST /v1/keys, for example a read-only key for a reporting tool.
Security rules: keep keys on your server, never in a web page, mobile app or code repository. If a key may have leaked, revoke it in the console at once and create another. ERA Open Rail keeps only a fingerprint of each key, so a lost key can't be shown again.
Making requests
- Amounts are whole numbers of cents: 2500 is $25.00.
- Account names are 1 to 40 characters: lowercase letters, numbers, - and _. You choose them; use your own customer ids.
- Assets are ERA-USD (US dollars) and ERA-USDC (digital dollars).
- Unknown fields are refused, so a typo never goes unnoticed. Bodies over 16 KB are refused.
- Times are Unix seconds.
Safe retries
Every POST that changes something takes an Idempotency-Key header of 8 to 100 characters. If your request times out, send it again with the same key and the same body: you get the first answer back, with the header Idempotent-Replayed: true, and nothing happens twice.
The same key with a different body is refused with 409. Keys are remembered for 30 days; never reuse one for a different action. A good key names the action: order-1042-payment, payout-7781.
Errors and limits
{"error": {"code": "refused", "message": "there is not enough to send"}}400 refused | the rail refused it; the message says why in plain words |
401 denied | the key is missing, wrong, revoked, or lacks the scope |
409 idempotency_conflict | the same Idempotency-Key with a different body |
413 too_large | the body is over 16 KB |
422 bad_request | a field is missing or has the wrong type; the message names the fields |
429 slow_down | too many requests; wait a moment and retry |
500 internal | our fault; the message has a reference to quote to us |
503 stopped | the rail paused itself for safety; retry shortly |
Each key can make about 600 requests a minute in the sandbox. Retry 429 and 503 after a short wait; never retry 400 without changing something.
Balances and finality
Every balance has three numbers: total, available_to_withdraw and not_yet_final. Money is final when it can no longer be pulled back.
- Bank wires and confirmed crypto deposits are final when credited.
- Card payments are credited when the card network settles, and become final when the dispute window has passed.
- A backer can stand behind a settled card payment (POST /v1/deposits/card/{id}/back). The money is final for the account at once, for the premium; the payment's mark keeps saying not final and names the backer as risk holder until the dispute window closes.
- Not-final money can move between accounts, and stays not final. Only final money can leave as a payout or be converted.
Every deposit carries a finality mark (mark_id): a signed statement from ERA Finality saying whether it is final, how final, and why. Check it with GET /v1/marks/{mark_id}.
Backers
A backer locks money and stands behind card payments that are not final yet, for a premium. The shop gets final money at once; if the payment is disputed, the locked money pays.
- Open a backer (POST /v1/backers) and fund it with USDC at its address.
- Lock money in the same asset as your offers (convert first with POST /v1/backers/{name}/conversions, for example USDC to ERA-USD).
- Post an offer: the most you'll stand behind and your premium in basis points (POST /v1/backers/{name}/offers).
- A platform asks for backing on a settled card payment (POST /v1/deposits/card/{id}/back) with the most premium it accepts.
Events and webhooks
Every change becomes an event, numbered in order (seq) and signed with your platform's signing secret. Set an https address with POST /v1/webhook to receive them, or read them with GET /v1/events?after=<seq>.
{"event": {"id": "evt_..._3", "seq": 3, "type": "deposit.credited", "asset": "ERA-USD",
"account": "ana", "amount": 2500, "final": false, "at": 1800000000},
"signature": "<hex HMAC-SHA256 of the event as JSON with sorted keys>"}Before acting on an event: check its signature with your signing secret (verifyEvent in era-rail.mjs, verify_event in era_rail.py), and keep the highest seq you have handled so a replayed event is refused. Act on each event id once.
Types: deposit.credited, deposit.reversed, transfer.completed, transfer.received, request.paid, payout.started, payout.paid, payout.failed, refund.started, refund.paid, refund.failed, conversion.completed, fee.charged, account.frozen, account.unfrozen, payment.backed, backer.locked, backer.unlocked.
Make a new signing secret any time with POST /v1/signing-secret/rotate. The old one keeps signing for 24 hours, so nothing breaks while you update your app.
Payment links and the pay button
POST /v1/checkouts creates a payment page on ERA Open Rail for one amount and returns checkout_id and url. Send the customer to the url, or put the pay button on your page:
<script src="https://api.eraopenrail.com/era-pay.js" async></script> <button data-era-checkout="req_..."></button>
After paying, the customer returns to your return_url with era_checkout, era_status, era_amount, era_at and era_sig. Check them with verifyCheckout (Node) or verify_checkout (Python), then confirm with GET /v1/requests/{id} or the request.paid event before you deliver.
Paying across platforms
Every account has a pay id (pay_...). Any account on any platform on ERA Open Rail can pay it at once with POST /v1/payments. The receiver learns the amount, whether it's final and the sender's pay id, never the sender's account name or platform.
By default only final money arrives from other platforms. Accept not-final money with POST /v1/receiving. POST /v1/requests asks any account on the rail to pay you once.
Bank transfers
Every account has its own US bank details. GET /v1/accounts/{name}/bank-details gives its routing and account number. Anyone can send money there by ACH or wire, and it lands in that account as ERA-USD.
Wire | final the moment it arrives |
ACH | credited when the bank settles it; an ACH sent back is never credited |
To pay out to a bank: add the bank account once (POST /v1/payouts/bank/accounts), then send money with POST /v1/payouts/bank, method ach or wire. Only final money leaves. It is set aside at once, and comes back to the account if the bank returns the payment.
For safety, a new bank account waits 24 hours before it can receive, belongs to the one account that added it, and is shown afterwards only by its last four digits. Each account also has a daily bank payout limit.
To pull money from a customer's own bank account (ACH debit): show them what will be taken and when, and once they agree, add the account with POST /v1/deposits/bank/accounts and customer_authorized: true. Two small deposits are sent to it; the customer reads them on their statement and you send them back with POST /v1/deposits/bank/accounts/{id}/verify. Then pull with POST /v1/deposits/bank.
Pulled money is credited when the bank settles it, but stays not final for as long as the customer's bank can still claim it back (up to about 60 days for a claim that the pull was not authorized). Until then it can be spent on the rail but cannot be paid out or converted. If the bank claims it back, it is taken back from wherever it went.
Sandbox: send test money in with POST /v1/sandbox/bank-transfer, then settle ACH with POST /v1/sandbox/finish-bank-transfers. Pay out only to the test bank account, routing 123456780 with account 000123456789 (pays) or 000111111116 (returned), and finish with POST /v1/sandbox/finish-bank-payouts. For pulls, read the small deposits with GET /v1/sandbox/micro-deposits, settle with POST /v1/sandbox/finish-bank-pulls, and test a claim-back with POST /v1/sandbox/return-bank-pull. Real bank details are refused.
Crypto: USDC and bitcoin
GET /v1/deposits/crypto/{account}/address?network=... gives an account its own deposit address on a network:
solana | USDC on Solana (base58 address) |
base | USDC on Base (0x address) |
ethereum | USDC on Ethereum (0x address) |
bitcoin | bitcoin, sold for US dollars the moment it is final |
a, b | two plain test networks, sandbox only |
USDC deposits are credited as ERA-USDC after the network's confirmations. All USDC networks share one ERA-USDC ledger, so money in on one network can leave on another.
Bitcoin is never held. Once a bitcoin deposit has its confirmations, it is sold at that moment's price and the account receives final US dollars (ERA-USD). There are no bitcoin payouts: pay out dollars to a bank or card, or USDC. The address answer shows the price in use; the sandbox uses a fixed test price.
To pay out USDC, allow the address first (POST /v1/payouts/crypto/addresses). It must be in that network's own format, so coins can't go to the wrong network by mistake. New addresses wait 24 hours before they can receive, to protect against stolen keys. In the sandbox, skip the wait with POST /v1/sandbox/end-address-wait.
Convert between ERA-USD and ERA-USDC with GET /v1/conversions/quote and POST /v1/conversions. Only final money converts.
Plug in your own rail
No rail of your own? Use ERA Open Rail's: cards, bank transfers and crypto, with ERA Open Rail's sponsor bank behind them. Nothing to set up.
Already run a payment rail (a bank's transfers, a domestic instant payment system, card acquiring)? Plug it in. Your customers' accounts are then credited from your rail, under the same protections as every other way money comes in.
instant | final the moment it arrives: instant payments, wires, domestic instant systems |
returnable | credited at once, can be sent back for about 10 days |
debit | pulls from a customer's account, can be returned for about 60 days |
card | card payments, can be disputed for about 120 days |
1. Register it: POST /v1/rails with a name and its kind. The answer holds the rail's signing secret, once. Keep it on your server.
2. State your reserve: a reserve message says how much you hold for ERA Open Rail's accounts. Nothing is credited beyond it.
3. Send a message when money moves: received (money arrived for one of your accounts), returned (it was sent back), paid_out or payout_failed (for payouts ERA Open Rail asked your rail to make). Sign each one: X-Rail-Timestamp is the time in seconds, X-Rail-Signature is HMAC-SHA256 of "timestamp.body" with the rail's secret. Messages older than 5 minutes are refused; each id counts once, and the same id again returns the same answer, so retries are safe.
const raw = JSON.stringify({ id: "msg-1001", type: "received", ref: "your-ref-1001", account: "ana", amount: 2500 });
const ts = Math.floor(Date.now() / 1000);
const sig = crypto.createHmac("sha256", process.env.ERA_RAIL_SECRET).update(ts + "." + raw).digest("hex");
await fetch("https://api.eraopenrail.com/v1/rails/my-rail/events", { method: "POST", body: raw,
headers: { Authorization: "Bearer " + process.env.ERA_KEY, "Content-Type": "application/json", "X-Rail-Timestamp": String(ts), "X-Rail-Signature": sig } });4. Pay out through your rail: POST /v1/payouts/rail sets the money aside and sends you the event rail_payout.requested. Pay it on your rail, then send paid_out (or payout_failed: the money comes back).
Money on a returnable, debit or card rail is not final until it can no longer be sent back: it can be spent on ERA Open Rail but cannot leave it before then. Switch your rail off at any time with POST /v1/rails/{name}/switch.
Limits and switches
Every flow's rules (which flows are switched on, the limits, the waiting times and the confirmations) are in one list: GET /v1/flows. Read it rather than hard-coding a limit in your app, so a change never surprises you.
ERA Open Rail adjusts these rules over time. A change that makes a flow safer applies at once; a change that loosens one is approved by two people. If a flow is switched off for a while, new requests are refused with a clear message, and money already on its way is still credited.
The sandbox
The sandbox behaves like live, with test money and tools to make the slow parts instant:
4242 4242 4242 4242 | test card that pays |
5555 5555 5555 4444 | test card that pays |
4000 0000 0000 0002 | test card that declines |
POST /v1/sandbox/cards turns a test number into a card token. A card belongs to the first account that pays with it, so give each test customer a holder name. Then: /v1/sandbox/settle (card payments settle), /v1/sandbox/wire (final money at once), /v1/sandbox/bank-transfer and /v1/sandbox/finish-bank-transfers (bank money in), /v1/sandbox/finish-bank-payouts, /v1/sandbox/coins and /v1/sandbox/mine (crypto deposits: USDC in cents, bitcoin in satoshis), /v1/sandbox/finish-card-payouts and /v1/sandbox/finish-refunds, /v1/sandbox/end-address-wait (crypto addresses and bank accounts usable now).
Sandbox data may be reset. Nothing in the sandbox is real money.
Going live
Live keys open at launch after a short review of your business. Your code stays the same: you swap the sandbox key for the live key and the sandbox address for the live address. Availability depends on your market, eligibility, financial partners and applicable approvals; see Supported Markets.
Before you go live, check: keys only on your server; signatures checked on every webhook and payment return; payment confirmed with the API before delivery; an Idempotency-Key on every change; and a way to revoke and replace keys quickly.
Accounts
POST /v1/accounts
Open an account. Creates a wallet for one of your customers or businesses. Every account gets a pay id that anyone on the rail can pay. Scope: move
| Field | Where | Type |
|---|---|---|
kind | body | string |
name required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/accounts" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"kind":"customer","name":"ana"}'Example answer
{
"account": "ana",
"kind": "customer",
"pay_id": "pay_b8855d4c9c1ef00f9bd6ba1b"
}GET /v1/accounts/{name}/balances
Get balances. How much the account holds, how much can leave now, and how much is still settling. Scope: read
| Field | Where | Type |
|---|---|---|
name required | path | string |
curl "https://api.eraopenrail.com/v1/accounts/ana/balances" \ -H "Authorization: Bearer $ERA_KEY"
Example answer
{
"account": "ana",
"balances": {
"ERA-USD": {
"total": 15000,
"available_to_withdraw": 10000,
"not_yet_final": 5000
},
"ERA-USDC": {
"total": 0,
"available_to_withdraw": 0,
"not_yet_final": 0
}
}
}GET /v1/accounts/{name}/history/{a}
Account statement. Every movement in and out, newest last. Add format=csv to download it for a spreadsheet. Scope: read
| Field | Where | Type |
|---|---|---|
name required | path | string |
a required | path | string |
after | query | integer |
limit | query | integer |
format | query | string |
curl "https://api.eraopenrail.com/v1/accounts/ana/history/ERA-USD?after=0&limit=100&format=json" \ -H "Authorization: Bearer $ERA_KEY"
Example answer
{
"lines": [
{
"seq": 23,
"at": 1795964214,
"what": "deposit",
"amount": 10000,
"other": "wire",
"entry": "0xe1cc\u20268862",
"mark_id": "fm_bb78deed690bb891a24ff327"
}
]
}GET /v1/accounts/{name}/pay-id
Get the pay id. The public id other accounts and platforms use to pay this account. Scope: read
| Field | Where | Type |
|---|---|---|
name required | path | string |
curl "https://api.eraopenrail.com/v1/accounts/ana/pay-id" \ -H "Authorization: Bearer $ERA_KEY"
Example answer
{
"pay_id": "pay_9c946f50072cf9e439022d87"
}GET /v1/accounts/{name}/proof/{a}
Balance proof. A signed proof your customer can check at /check that their balance is really held. Scope: read
| Field | Where | Type |
|---|---|---|
name required | path | string |
a required | path | string |
curl "https://api.eraopenrail.com/v1/accounts/ana/proof/ERA-USD" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/accounts/{name}/limits
Set a daily limit. The most this account may send or pay out in one day, in cents. Leave empty to remove your limit. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
daily_out | body | integer |
curl -X POST "https://api.eraopenrail.com/v1/accounts/ana/limits" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"daily_out":50000}'Example answer
{
"account": "ana",
"daily_out": 3000
}POST /v1/accounts/{name}/close
Close an account. Only when it holds nothing. History stays. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
curl -X POST "https://api.eraopenrail.com/v1/accounts/ana/close" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{}'Money in
POST /v1/deposits/card
Card payment into an account. Charges a card and credits the account when the card settles. Make a test card first under Test money. Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
card_token required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/deposits/card" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":2500}'Example answer
{
"deposit": "dev_e29a4fbe655e.order-1042",
"status": "captured",
"amount": 5000,
"asset": "ERA-USD",
"mark_id": "fm_0f21d03513e5564f8b877af3"
}POST /v1/deposits/card/{deposit}/refund
Refund a card payment. Sends money back to the card that paid. Never more than was paid. Scope: payout
| Field | Where | Type |
|---|---|---|
deposit required | path | string |
account required | body | string |
amount required | body | integer |
curl -X POST "https://api.eraopenrail.com/v1/deposits/card/{deposit}/refund" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":500}'POST /v1/deposits/card/{deposit}/back
Make a card payment final now. A backer stands behind the payment so the money is final at once, for a small premium. Scope: move
| Field | Where | Type |
|---|---|---|
deposit required | path | string |
account required | body | string |
max_premium_bps required | body | integer |
curl -X POST "https://api.eraopenrail.com/v1/deposits/card/{deposit}/back" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","max_premium_bps":200}'GET /v1/deposits/crypto/{account}/address
Crypto deposit address. An address for this account. network: solana, base or ethereum (USDC), bitcoin (sold for US dollars the moment it is final, after 3 confirmations), or the test networks a and b. USDC is credited after 12 confirmations. Scope: read
| Field | Where | Type |
|---|---|---|
account required | path | string |
network | query | string |
curl "https://api.eraopenrail.com/v1/deposits/crypto/ana/address?network=solana" \ -H "Authorization: Bearer $ERA_KEY"
Example answer
{
"account": "ana",
"asset": "USDC",
"network": "a",
"address": "0x460987d3337964bca5fcad9965776257b8f7a101",
"confirmations_needed": 12
}GET /v1/accounts/{name}/bank-details
Bank details for ACH and wire. This account's own routing and account number. Money sent there by ACH or wire lands in it: a wire is final at once, an ACH when the bank settles it. Scope: read
| Field | Where | Type |
|---|---|---|
name required | path | string |
curl "https://api.eraopenrail.com/v1/accounts/ana/bank-details" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/deposits/bank/accounts
Authorize bank pulls. Lets you pull money from a customer's own bank account (ACH debit). Send customer_authorized: true only after they agree. Two small deposits are sent to the account to prove it is theirs. Sandbox test account: routing 123456780, account 000123456789 (pays) or 000111111116 (bounces). Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
account_number required | body | string |
account_type | body | string |
customer_authorized | body | boolean |
holder_name required | body | string |
routing_number required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/deposits/bank/accounts" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","account_number":"000123456789","account_type":"checking","customer_authorized":true,"holder_name":"Ana Diaz","routing_number":"123456780"}'POST /v1/deposits/bank/accounts/{debit_account}/verify
Verify the small deposits. The customer reads the two small deposits on their bank statement and you send them back here. A few wrong guesses lock the account. Scope: move
| Field | Where | Type |
|---|---|---|
debit_account required | path | string |
account required | body | string |
amounts required | body | array |
curl -X POST "https://api.eraopenrail.com/v1/deposits/bank/accounts/{debit_account}/verify" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana"}'GET /v1/deposits/bank/accounts
List bank accounts for pulls. The accounts a customer authorized for pulls, by last four digits, with their status. Scope: read
| Field | Where | Type |
|---|---|---|
account required | query | string |
curl "https://api.eraopenrail.com/v1/deposits/bank/accounts?account=ana" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/deposits/bank/accounts/{debit_account}/remove
Stop bank pulls. No new pulls from this bank account. Pulls already sent still settle. Scope: move
| Field | Where | Type |
|---|---|---|
debit_account required | path | string |
account required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/deposits/bank/accounts/{debit_account}/remove" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana"}'POST /v1/deposits/bank
Pull money from a bank. Pulls from a verified bank account (ACH debit). Credited when the bank settles it, and not final until the customer's bank can no longer claim it back, so it can be spent on the rail but cannot leave it until then. Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
debit_account required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/deposits/bank" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":5000}'Move money
POST /v1/transfers
Transfer between your accounts. Instant and free between two accounts on your platform. Scope: move
| Field | Where | Type |
|---|---|---|
amount required | body | integer |
asset | body | string |
from_account required | body | string |
to_account required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/transfers" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":1000,"asset":"ERA-USD","from_account":"ana","to_account":"ben"}'Example answer
{
"from": "ana",
"to": "ben",
"amount": 1000,
"fee": 0,
"asset": "ERA-USD",
"final": true,
"entry": 59
}POST /v1/payments
Pay any account on the rail. Pays a pay id on any platform, instantly. Scope: payout
| Field | Where | Type |
|---|---|---|
amount required | body | integer |
asset | body | string |
from_account required | body | string |
to_pay_id required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payments" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":500,"asset":"ERA-USD","from_account":"ana"}'Example answer
{
"from": "ana",
"to_pay_id": "pay_9c946f50072cf9e439022d87",
"amount": 700,
"fee": 0,
"asset": "ERA-USD",
"final": true,
"entry": 29
}POST /v1/receiving
Accept payments that are not final yet. Off by default: only final money arrives from other platforms. Scope: move
| Field | Where | Type |
|---|---|---|
accept_not_final required | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/receiving" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"accept_not_final":false}'Get paid
POST /v1/checkouts
Create a payment link. A hosted ERA Open Rail payment page for one amount. Send the link, or put the pay button on your site. Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
business_name | body | string |
expires_in | body | integer |
memo | body | string |
return_url | body | string |
curl -X POST "https://api.eraopenrail.com/v1/checkouts" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":1500,"business_name":"Alice's Shop","expires_in":86400,"memo":"Order 1001"}'Example answer
{
"request_id": "req_32db032d1b2b6db72a439519",
"checkout_id": "req_32db032d1b2b6db72a439519",
"pay_id": "pay_a11e\u2026484d",
"amount": 1500,
"asset": "ERA-USD",
"expires": 1796047229,
"url": "/pay/req_32db032d1b2b6db72a439519"
}POST /v1/requests
Request a payment. A request anyone on the rail can pay once. Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
asset | body | string |
expires_in | body | integer |
memo | body | string |
curl -X POST "https://api.eraopenrail.com/v1/requests" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":1500,"asset":"ERA-USD","expires_in":604800,"memo":"Invoice 7"}'Example answer
{
"request_id": "req_44ed63b747d3e47ec5a13449",
"pay_id": "pay_9c946f50072cf9e439022d87",
"amount": 900,
"asset": "ERA-USD",
"expires": 1796569016
}GET /v1/requests/{request_id}
Check a request or link. What was asked and whether it is paid or expired. Scope: read
| Field | Where | Type |
|---|---|---|
request_id required | path | string |
curl "https://api.eraopenrail.com/v1/requests/{request_id}" \
-H "Authorization: Bearer $ERA_KEY"Example answer
{
"request_id": "req_32db032d1b2b6db72a439519",
"pay_id": "pay_a11e\u2026484d",
"amount": 1500,
"asset": "ERA-USD",
"memo": "Order 1042",
"status": "paid",
"expires": 1796047229
}POST /v1/requests/{request_id}/pay
Pay a request. Pays exactly the amount asked, once. Scope: payout
| Field | Where | Type |
|---|---|---|
request_id required | path | string |
from_account required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/requests/{request_id}/pay" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"from_account":"ben"}'Money out
POST /v1/payouts/card
Pay out to a card. Sends final money to a debit card the account paid in with. Scope: payout
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
card_token required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payouts/card" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":500}'Example answer
{
"payout": "dev_e29a4fbe655e.payout-7781",
"status": "sent",
"amount": 500,
"fee": 0,
"asset": "ERA-USD"
}POST /v1/payouts/crypto/addresses
Allow a crypto address. An address must be allowed before it can receive. Usable after 24 hours. It must be in the network's own format (Solana addresses differ from Base and Ethereum ones). Scope: payout
| Field | Where | Type |
|---|---|---|
account required | body | string |
address required | body | string |
network | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payouts/crypto/addresses" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","network":"solana"}'Example answer
{
"account": "ana",
"address": "0xabab\u2026abab",
"network": "a",
"usable_from": 1796050615
}POST /v1/payouts/crypto
Pay out in crypto. Sends USDC to an allowed address on Solana, Base or Ethereum. Large ones wait for ERA Open Rail review. Scope: payout
| Field | Where | Type |
|---|---|---|
account required | body | string |
address required | body | string |
amount required | body | integer |
network | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payouts/crypto" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":500,"network":"solana"}'POST /v1/payouts/bank/accounts
Add a bank account. A bank account to pay out to, usable after 24 hours. Shown afterwards only by its last four digits. Sandbox test account: routing 123456780, account 000123456789 (pays) or 000111111116 (returned). Scope: payout
| Field | Where | Type |
|---|---|---|
account required | body | string |
account_number required | body | string |
account_type | body | string |
holder_name required | body | string |
routing_number required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payouts/bank/accounts" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","account_number":"000123456789","account_type":"checking","holder_name":"Ana Diaz","routing_number":"123456780"}'GET /v1/payouts/bank/accounts
List bank accounts. The bank accounts added for an account, by last four digits. Scope: read
| Field | Where | Type |
|---|---|---|
account required | query | string |
curl "https://api.eraopenrail.com/v1/payouts/bank/accounts?account=ana" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/payouts/bank
Pay out to a bank account. Sends final US dollars by ACH or wire. If the bank returns it, the money comes back to the account. Scope: payout
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
bank_account required | body | string |
method | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payouts/bank" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":1000,"method":"ach"}'Your own rail
POST /v1/rails
Plug in your own rail. Connect a payment rail you already run. kind says how it behaves: instant (final at once), returnable (can be sent back for about 10 days), debit (pulls, returnable for about 60 days) or card. Its signing secret is shown once. Scope: move
| Field | Where | Type |
|---|---|---|
kind required | body | string |
max_cents | body | integer |
name required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/rails" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"instant","max_cents":1000000,"name":"my-rail"}'GET /v1/rails
List your rails. Each rail, how it behaves, its reserve and what it owes. Scope: read
curl "https://api.eraopenrail.com/v1/rails" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/rails/{name}/switch
Switch a rail on or off. Off: new messages and payouts are refused at once; money already credited stays. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
on required | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/rails/my-rail/switch" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"on":true}'POST /v1/rails/{name}/events
Send a message from your rail. Signed with the rail's secret: HMAC-SHA256 of "timestamp.body" in X-Rail-Signature, the time in X-Rail-Timestamp. Types: reserve (what you hold), received, returned, paid_out, payout_failed. Each id counts once. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
curl -X POST "https://api.eraopenrail.com/v1/rails/my-rail/events" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{}'POST /v1/payouts/rail
Pay out through your rail. Sets final money aside and asks your rail to pay (event rail_payout.requested). Closed when your rail sends paid_out. Scope: payout
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
destination required | body | string |
rail required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/payouts/rail" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":1000,"destination":"+221 77 000 00 00","rail":"my-rail"}'Convert
GET /v1/conversions/quote
Get a quote. What you would receive converting between US dollars and digital dollars. Scope: read
| Field | Where | Type |
|---|---|---|
from_asset required | query | string |
to_asset required | query | string |
amount required | query | integer |
curl "https://api.eraopenrail.com/v1/conversions/quote?from_asset=ERA-USD&to_asset=ERA-USDC&amount=1000" \ -H "Authorization: Bearer $ERA_KEY"
Example answer
{
"from": "ERA-USD",
"to": "ERA-USDC",
"amount": 1000,
"fee": 0,
"receive": 1000,
"rate": "1:1"
}POST /v1/conversions
Convert. Converts final money between ERA-USD and ERA-USDC inside an account. Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
from_asset required | body | string |
to_asset required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/conversions" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":1000,"from_asset":"ERA-USD","to_asset":"ERA-USDC"}'Webhooks and events
POST /v1/webhook
Set your webhook address. Where ERA Open Rail sends events. Must be https and public. Scope: move
| Field | Where | Type |
|---|---|---|
url required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/webhook" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/era-webhook"}'GET /v1/events
List events. Everything that happened on your platform, signed and in order. Scope: read
| Field | Where | Type |
|---|---|---|
after | query | integer |
limit | query | integer |
curl "https://api.eraopenrail.com/v1/events?after=0&limit=20" \ -H "Authorization: Bearer $ERA_KEY"
Example answer
{
"data": [
{
"event": {
"id": "evt_dev_\u2026_1",
"seq": 1,
"type": "deposit.credited",
"at": 1795960829,
"asset": "ERA-USD",
"account": "ana",
"amount": 2500,
"final": false,
"door": "card",
"mark_id": "fm_4d8d\u2026e6d5"
},
"signature": "c928\u2026a7e"
}
]
}POST /v1/signing-secret/rotate
Rotate the signing secret. A new secret for checking events. The old one keeps working for 24 hours. Scope: move
curl -X POST "https://api.eraopenrail.com/v1/signing-secret/rotate" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{}'Test money
POST /v1/sandbox/cards
Make a test card. Turns a published test number into a card token. 4242 4242 4242 4242 works, 4000 0000 0000 0002 declines. A card belongs to the first account that pays with it, so give each test customer their own holder name. Scope: read
| Field | Where | Type |
|---|---|---|
holder | body | string |
number required | body | string |
push_eligible | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/cards" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"holder":"ana","number":"4242424242424242","push_eligible":true}'Example answer
{
"card_token": "tok_6c5fab21bda5b9c26bfea07d"
}POST /v1/sandbox/wire
Add money by test wire. Final money arrives in an account at once, as if by bank wire. Scope: move
| Field | Where | Type |
|---|---|---|
account required | body | string |
amount required | body | integer |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/wire" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"account":"ana","amount":10000}'Example answer
{
"account": "ana",
"amount": 10000,
"asset": "ERA-USD",
"final": true
}POST /v1/sandbox/settle
Settle card payments. Runs the card network's daily batch now, so card payments are credited. Scope: read
curl -X POST "https://api.eraopenrail.com/v1/sandbox/settle" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{}'POST /v1/sandbox/close-dispute-windows
Check card statements. Reads the card network's statements. Settled card money becomes final once its dispute window has passed. Scope: read
curl -X POST "https://api.eraopenrail.com/v1/sandbox/close-dispute-windows" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{}'POST /v1/sandbox/end-address-wait
Skip the 24-hour waits. Your allowed crypto addresses and added bank accounts become usable now. Live keeps the 24-hour wait. Scope: payout
curl -X POST "https://api.eraopenrail.com/v1/sandbox/end-address-wait" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{}'POST /v1/sandbox/bank-transfer
Send a test bank transfer. Money arrives at an account's bank details from outside. method wire: final at once; ach: waits for Finish bank transfers. Scope: move
| Field | Where | Type |
|---|---|---|
account_number required | body | string |
amount required | body | integer |
method | body | string |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/bank-transfer" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":10000,"method":"ach"}'POST /v1/sandbox/finish-bank-transfers
Finish bank transfers. The bank settles your waiting ACH transfers (ok true), or sends them back (ok false). Scope: move
| Field | Where | Type |
|---|---|---|
ok | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/finish-bank-transfers" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"ok":true}'GET /v1/sandbox/micro-deposits
See the small deposits. The two small deposits, as your customer would see them on their bank statement. Scope: read
| Field | Where | Type |
|---|---|---|
account required | query | string |
debit_account required | query | string |
curl "https://api.eraopenrail.com/v1/sandbox/micro-deposits?account=ana" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/sandbox/finish-bank-pulls
Finish bank pulls. The bank settles your waiting pulls (ok true), or they bounce (ok false). Scope: move
| Field | Where | Type |
|---|---|---|
ok | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/finish-bank-pulls" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"ok":true}'POST /v1/sandbox/return-bank-pull
Return a bank pull. Weeks later, the customer's bank claims a pull back. The money is taken back from wherever it went. Scope: move
| Field | Where | Type |
|---|---|---|
debit required | body | string |
reason | body | string |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/return-bank-pull" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"the customer says they did not authorize it"}'POST /v1/sandbox/finish-bank-payouts
Finish bank payouts. The bank sends your waiting bank payouts (ok true), or returns them (ok false). Scope: move
| Field | Where | Type |
|---|---|---|
ok | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/finish-bank-payouts" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"ok":true}'POST /v1/sandbox/finish-card-payouts
Finish card payouts. Completes waiting card payouts, as paid or failed. Scope: read
| Field | Where | Type |
|---|---|---|
ok | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/finish-card-payouts" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"ok":true}'POST /v1/sandbox/finish-refunds
Finish refunds. Completes waiting refunds. Scope: read
| Field | Where | Type |
|---|---|---|
ok | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/finish-refunds" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"ok":true}'POST /v1/sandbox/coins
Send test coins. Sends test USDC (in cents) or test bitcoin (in satoshis: 100,000,000 is one bitcoin) to a deposit address. Then confirm blocks. Scope: read
| Field | Where | Type |
|---|---|---|
address required | body | string |
amount required | body | integer |
network | body | string |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/coins" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":1000,"network":"solana"}'POST /v1/sandbox/mine
Confirm blocks. Adds blocks so crypto deposits are confirmed and credited. Scope: read
| Field | Where | Type |
|---|---|---|
blocks | body | integer |
network | body | string |
curl -X POST "https://api.eraopenrail.com/v1/sandbox/mine" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"blocks":12}'Keys
GET /v1/keys
List keys. Your platform's keys by id, plus ERA Open Rail's public signing keys. Scope: read
curl "https://api.eraopenrail.com/v1/keys" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/keys
Make a narrower key. A key limited to some scopes, for example read only. Shown once. Scope: move
| Field | Where | Type |
|---|---|---|
scopes required | body | array |
curl -X POST "https://api.eraopenrail.com/v1/keys" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"scopes":["read"]}'Example answer
{
"key": "era_test_\u2026",
"scopes": [
"read"
]
}DELETE /v1/keys/{key_id}
Revoke a key. The key stops working at once. Scope: move
| Field | Where | Type |
|---|---|---|
key_id required | path | string |
curl -X DELETE "https://api.eraopenrail.com/v1/keys/{key_id}" \
-H "Authorization: Bearer $ERA_KEY"Backers
POST /v1/backers
Open a backer. A backer stands behind card payments so they are final at once, and earns a premium. Scope: move
| Field | Where | Type |
|---|---|---|
name required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/backers" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"name":"fund1"}'Example answer
{
"backer": "fund1"
}GET /v1/backers/{name}/address
Backer funding address. Fund a backer with USDC. Scope: read
| Field | Where | Type |
|---|---|---|
name required | path | string |
network | query | string |
curl "https://api.eraopenrail.com/v1/backers/fund1/address?network=a" \ -H "Authorization: Bearer $ERA_KEY"
POST /v1/backers/{name}/conversions
Backer conversion. Convert a backer's funds. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
amount required | body | integer |
from_asset required | body | string |
to_asset required | body | string |
curl -X POST "https://api.eraopenrail.com/v1/backers/fund1/conversions" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":1000,"from_asset":"ERA-USDC","to_asset":"ERA-USD"}'POST /v1/backers/{name}/lock
Lock backer funds. Sets funds aside to stand behind payments. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
amount required | body | integer |
asset | body | string |
curl -X POST "https://api.eraopenrail.com/v1/backers/fund1/lock" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":1000,"asset":"ERA-USDC"}'POST /v1/backers/{name}/unlock
Unlock backer funds. Frees funds no longer standing behind payments. Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
amount required | body | integer |
asset | body | string |
curl -X POST "https://api.eraopenrail.com/v1/backers/fund1/unlock" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":1000,"asset":"ERA-USDC"}'POST /v1/backers/{name}/offers
Make an offer. How much the backer will stand behind, and for what premium (0 to 2,000 basis points). Scope: move
| Field | Where | Type |
|---|---|---|
name required | path | string |
asset | body | string |
max_amount required | body | integer |
premium_bps required | body | integer |
curl -X POST "https://api.eraopenrail.com/v1/backers/fund1/offers" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Idempotency-Key: your-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"asset":"ERA-USD","max_amount":100000,"premium_bps":150}'Finality marks
GET /v1/marks/{mark_id}
Get a finality mark. Whether a deposit is final, signed by ERA Finality. Scope: read
| Field | Where | Type |
|---|---|---|
mark_id required | path | string |
curl "https://api.eraopenrail.com/v1/marks/{mark_id}" \
-H "Authorization: Bearer $ERA_KEY"POST /v1/marks/verify
Verify a mark. Checks a mark is genuine and unchanged. Paste the mark exactly as given. No key needed
| Field | Where | Type |
|---|---|---|
mark required | body | object |
signature required | body | object |
curl -X POST "https://api.eraopenrail.com/v1/marks/verify" \
-H "Content-Type: application/json" \
-d '{}'POST /v1/marks/open-search
Open search. Lets anyone look up your marks by id. Scope: move
| Field | Where | Type |
|---|---|---|
open_search required | body | boolean |
curl -X POST "https://api.eraopenrail.com/v1/marks/open-search" \
-H "Authorization: Bearer $ERA_KEY" \
-H "Content-Type: application/json" \
-d '{"open_search":false}'GET /v1/record
Track record. How many marks were called final and how many were later pulled back. No key needed
curl "https://api.eraopenrail.com/v1/record"
Rail status
GET /v1/health
Health. Is the rail up. No key needed
curl "https://api.eraopenrail.com/v1/health"
Example answer
{
"ok": true
}GET /v1/reserves
Reserves. Money held against money in use, per asset. No key needed
curl "https://api.eraopenrail.com/v1/reserves"
Example answer
{
"ERA-USD": {
"held": 38500,
"in_use": 38500,
"covered": true
},
"ERA-USDC": {
"held": 2000,
"in_use": 2000,
"covered": true
}
}GET /v1/seal/{a}
Latest signed seal. The book's latest signed total. No key needed
| Field | Where | Type |
|---|---|---|
a required | path | string |
curl "https://api.eraopenrail.com/v1/seal/ERA-USD"
GET /v1/pricing
Rate card. Prices at live launch. Scope: read
curl "https://api.eraopenrail.com/v1/pricing" \ -H "Authorization: Bearer $ERA_KEY"
GET /v1/fees
Fee table. Fees by operation. Scope: read
curl "https://api.eraopenrail.com/v1/fees" \ -H "Authorization: Bearer $ERA_KEY"
GET /v1/flows
Flow rules in force. Every flow's current rules: what is switched on, limits, waiting times and confirmations. Read it so a limit is never a surprise. Scope: read
curl "https://api.eraopenrail.com/v1/flows" \ -H "Authorization: Bearer $ERA_KEY"