One API for card in, crypto in, card out and crypto out.

Accounts, balances you can prove, instant transfers, payouts that close on confirmation, and signed events. Sandbox keys and test money.

Quickstart

Open two accounts, take $50 by card, pay a shop $18 inside ERA, read the signed events. Amounts are always whole cents.

Pythonera_rail.py
from era_rail import Rail, verify_event

rail = Rail("era_test_...", base="https://api.eragc.com")
rail.open_account("maya")
rail.open_account("bakery", kind="business")

card = rail.test_card()                                   # live: the card form gives you this token
rail.card_deposit("maya", card, 5000, idem="order-1001")
rail.test_settle()                                        # live: the provider settles at day end
rail.transfer("maya", "bakery", 1800, idem="pay-1001")

print(rail.balances("bakery"))
for e in rail.events():
    assert verify_event(SIGNING_SECRET, e["event"], e["signature"])
JavaScript (your server, never a web page)Node 18+
import { Rail } from "./era-rail.mjs";
const rail = new Rail(process.env.ERA_KEY, "https://api.eragc.com");
await rail.openAccount("maya");
await rail.cardDeposit("maya", cardToken, 5000, "order-1001");

Keys and scopes

Send Authorization: Bearer era_test_… on every call. Keys are shown once and stored by ERA only as a hash. A key reaches only its own platform's accounts.

ScopeAllows
readbalances, proofs, addresses, quotes, events
moveaccounts, deposits, transfers, conversions, backers, webhook address
payoutcard and crypto payouts, withdrawal addresses

Give each part of your system the smallest scope it needs. A key used by a reporting job needs only read.

A key with every scope can make narrower keys (POST /v1/keys), list them by id and revoke them (DELETE /v1/keys/{id}), and rotate the signing secret: the old one keeps signing alongside the new one for 24 hours.

Safe retries

Every POST that changes something takes an Idempotency-Key of 8 to 100 characters. Use your own order or request id. The same key with the same body returns the first answer again, with Idempotent-Replayed: true. The same key with a different body is refused with 409. A timeout is never a reason to guess: send the same request again.

Accounts and balances

MethodPathWhat it does
POST/v1/accountsname (1 to 40 of a-z 0-9 - _), kind customer or business
GET/v1/accounts/{name}/balancesper asset: total, available_to_withdraw, not_yet_final
GET/v1/accounts/{name}/proof/{asset}the balance, the book's signed seal, and a private proof that it is counted in the total ERA signed. Hand it to your customer: they check it at /check in any browser, or offline with python -m rail.watch balance. No one else's balance or address is in it
GET/v1/accounts/{name}/history/{asset}the account's statement, read from the book; every line names the entry that proves it. Add ?format=csv for a spreadsheet

available_to_withdraw is the part that is final. Card money becomes final when its dispute window has closed and the provider's statement confirms it, or at once if a backer stands behind it.

Money in

MethodPathWhat it does
POST/v1/deposits/cardaccount, card_token, amount. Captured now, credited when it settles
POST/v1/deposits/card/{id}/refundaccount, amount. Back to the card that paid, never more than was paid
GET/v1/deposits/crypto/{account}/addressnetwork (a or b). A USDC address for this account on that network; credited after 12 confirmations

ERA never takes a card number. The card provider's own form returns a token; anything that looks like a card number is refused. A card belongs to the first account that uses it.

Money inside

MethodPathWhat it does
POST/v1/transfersfrom_account, to_account, amount, asset. Instant; whether the money is final travels with it

Paying another platform

Every account has a pay id. Any account on any platform on the rail can pay it, at once, with no card network or bank in the middle. By default only final money arrives from other platforms, so another platform's chargebacks can never reach your customers; you can choose to accept money that is not final yet. The receiver sees the amount and the sender's pay id, never the sender's name or platform.

MethodPathWhat it does
GET/v1/accounts/{name}/pay-idthe account's pay id, to share
POST/v1/paymentsfrom_account, to_pay_id, amount, asset. Payout scope
POST/v1/receivingaccept_not_final true or false (off by default)

Money out

MethodPathWhat it does
POST/v1/payouts/cardto a card the account has paid in with; final money only
POST/v1/payouts/crypto/addressesaccount, address, network. Usable after 24 hours, on that network only
POST/v1/payouts/cryptoone daily limit across networks; above $100 a second person at ERA approves

The money is set aside first. It leaves the account for good only when the payout is confirmed, and comes back only when the provider shows the payout failed.

Conversions

MethodPathWhat it does
GET/v1/conversions/quotefrom_asset, to_asset, amount
POST/v1/conversionsaccount, from_asset, to_asset, amount. Final money only

ERA-USD and ERA-USDC are separate books. Conversion goes through ERA's own capped float and creates nothing.

Backers

A backer locks money in advance and stands behind card payments that are not final yet, for a premium. The shop can then withdraw at once; if the payment is disputed, the locked money pays. How backers join

MethodPathWhat it does
POST/v1/backersopen a backer
POST/v1/backers/{name}/locklock final money; unlock only what no longer stands behind payments
POST/v1/backers/{name}/offersmax_amount, premium_bps (0 to 2,000)
POST/v1/deposits/card/{id}/backaccount, max_premium_bps. Final now if an offer fits

Events and webhooks

Every change becomes an event, numbered in order and signed with your platform's signing secret (HMAC-SHA256 over the event as JSON with sorted keys). Read them with GET /v1/events?after= or set an https address with POST /v1/webhook: delivered in order, once, retried with back-off.

An eventdeposit.credited
{"event": {"id": "evt_acme_3", "seq": 3, "type": "deposit.credited",
           "asset": "ERA-USD", "account": "maya", "amount": 5000,
           "final": false, "door": "card", "at": 1800000000},
 "signature": "9c1f…"}

Types: deposit.credited, deposit.reversed, transfer.completed, payout.started, payout.paid, payout.failed, conversion.completed, payment.backed, fee.charged, account.frozen, account.unfrozen.

Errors and limits

StatusMeaning
400refused; the message says why
401no key, wrong key, or a key without that scope
409an idempotency key reused for a different request
413body over 16 KB
422unknown or wrongly typed fields; amounts must be whole numbers
429too many requests; wait a moment
503the rail paused itself for safety; try again shortly

Checking ERA's records

Every entry is sealed into a signed record. GET /v1/seal/{asset} and GET /v1/reserves are public. Outside watchers redo every entry and co-sign what they checked; their signatures come with each balance proof.

Finality marks and the open search

Every deposit carries an ERA Finality mark: final, not final yet, or reversed; a level from 0 to 100; the basis once final; and when it becomes final by time. Card deposits return a mark_id at once; crypto deposits name it in their deposit.credited event. A mark holds no amount, account or reference of yours, and is signed so anyone can check it offline.

MethodPathWhat it does
GET/v1/marks/{mark_id}with your key: your marks, always. Without a key: only if you opened the search
POST/v1/marks/open-searchopen_search true or false; off until you turn it on
POST/v1/marks/verifypublic: is this mark genuine and unchanged
GET/v1/keyspublic: the key that signs marks
GET/v1/recordpublic: marks called final, and how many were later pulled back

Public pages: /marks (look up a mark by id) and /verify (paste a mark to check it).

Nothing built yet

Start from one of five ready-made apps: Memberships & Subscriptions, Bookings & Appointments, Dues & Group Collections, Shop & Tickets, Donations & Tips. Add a name, logo, colour and prices, and publish. Its payments, renewals and refunds run on the rail into your own account, with finality marks.

When you are ready for code, get a rail API key from the same dashboard: it reaches the same account your apps are paid into.

Already have payments

Keep your card processor and your own app. Add ERA Open Rail beside them for three jobs: payments to and from other apps, balances your customers can prove, and payouts that only use final money.

  1. Open an account for each customer or business: POST /v1/accounts.
  2. Bring money in the way you do today. If your processor sits behind ERA Open Rail's card door, its payments land in the account; or top the account up by card or USDC through ERA Open Rail.
  3. Let customers pay anyone on another app by pay id: GET /v1/accounts/{name}/pay-id and POST /v1/payments. It arrives at once; only final money crosses unless the receiver accepts otherwise.
  4. Give each customer their balance proof (GET /v1/accounts/{name}/proof/{asset}); they check it themselves at /check.
  5. Pay out with available_to_withdraw only: card or crypto out never uses money that can still be pulled back.
  6. Listen for signed events to keep your app in step: transfer.received, deposit.credited, payout.paid.

Your existing ledger can stay the place your app reads from; ERA Open Rail's statements and daily reconciliation let you check the two agree.

Connectors

Ready-made ways in, from two lines on a page to a full plug-in. Every one is tested against a live ERA Open Rail in the sandbox.

ConnectorWhereWhat it does
Pay buttonPOST /v1/checkouts, /era-pay.jsA payment page on ERA Open Rail for one amount; the button opens it; the customer returns to your return_url with era_checkout, era_status, era_amount, era_at and era_sig. Check with verify_checkout / verifyCheckout; ship on the request.paid event.
Keep your processorrail/connectors/processor_mirror.pyReceives your processor's signed events (standard signed-webhook format) and credits the customer named in the payment's metadata (era_account) from your float, once per event; refunds and disputes go back to the float.
Online store plug-inplug-in packagePay with ERA Open Rail at checkout. Set your notification address to https://your-shop/?wc-api=era_open_rail. An order is marked paid only by a signed notification for its exact amount.
Notification kitsrail/connectors/kits/receiver.py, receiver.mjsCopy into your app. Checks ERA-Signature (and ERA-Signature-Previous during a rotation), refuses events at or below the last handled, saves its place safely.
Command linepython -m rail.cliopen, balance, pay, pay-id, move, statement --csv, proof --save, checkout, events. Reads ERA_RAIL_KEY from the environment; asks before moving money.
Clientsrail/clients/era_rail.py, era-rail.mjsEvery endpoint, idempotency keys added for you, verify_event and verify_checkout helpers.
Scan to pay/pay/{id}, /pay/{id}/qr.svgEvery payment page shows a QR code of its own address; the printable QR is its own file for counters and invoices. Any app on ERA Open Rail can also pay by the checkout id.
Verified balance badge/era-badge.js<span data-era-proof="/your/proof-endpoint"></span> on your page; your endpoint returns the signed-in customer's proof. The customer's browser checks it against /v1/keys (readable from any site) and shows Verified or Not verified.
Shadow moderail/connectors/era_app_shadow.pyFor an app already running payments (the ERA app first): replay a day's exported transactions on a sandbox ERA Open Rail and get a report of every balance that agrees or differs, and every transaction the rail would refuse. Read only toward your app; sandbox only.
Postman collectionrail/docs/era-open-rail.postman.jsonEvery /v1 call, ready to try. Set the variables base and key in Postman; each POST gets a fresh Idempotency-Key.
Fund a float (sandbox)POST /v1/sandbox/wireYour money arrives by bank wire into one of your accounts, final once credited. Use it to fund the float the processor connector pays from.

The two lines for any web page:

<script src="https://api.eragc.com/era-pay.js" async></script>
<button data-era-checkout="req_..."></button>

Sandbox

Test money only. Test cards: 4242 4242 4242 4242 and 5555 5555 5555 4444 succeed, 4000 0000 0000 0002 is declined.

MethodPathWhat it does
POST/v1/sandbox/cardsa token for a test card
POST/v1/sandbox/settlesettle captured card payments
POST/v1/sandbox/close-dispute-windowslet card money become final
POST/v1/sandbox/finish-card-payoutscomplete or fail pending card payouts
POST/v1/sandbox/finish-refundscomplete or fail pending refunds
POST/v1/sandbox/coinssend test USDC to an address
POST/v1/sandbox/mineadd blocks to the test chain

Clients

One file each, no dependencies: era_rail.py for Python and era-rail.mjs for JavaScript. Both send an idempotency key on every POST and check event signatures in constant time.

What is live

The full rail is open in the sandbox today: every endpoint on this page, with test money. Live access opens with launch partners, capability by capability, as each one completes its approvals.

Security, settlement and safeguards

Know what's settled, what's available, and what's still at risk.

Every incoming payment carries a settlement status from ERA Finality. Card payments can be disputed long after they clear; payouts draw only on funds that are available under ERA's rules.

Only final money leaves

A card payment that can still be disputed can be spent inside ERA, but cannot be paid out or turned into crypto.

Disputes are traced

A chargeback is followed to wherever its money went, or paid by a backer who locked funds behind it.

Payouts close on proof

Money is set aside before a payout and comes back only when the provider shows it failed, never on a timer.

Two people for large moves

Large withdrawals and moving coins out of offline storage each need a second person at ERA.

What is built, what is tested, and what we will prove with partners.

Built

The whole rail, in the sandbox

Ledger, finality checks, treasury, all four doors against test providers and two test chains, refunds, account statements, the API, staff approvals, and a journal that rebuilds the rail exactly after a restart.

Tested by us

444 automated tests, run on every change

Over half a million random operations with outages, chargebacks, chain reorganisations and forged notices thrown in. 24,000 hostile requests against every route. A busy server shut down without warning, again and again, losing nothing it had confirmed.

With launch partners

From sandbox to live money

Build and prove your product in the sandbox, then go live with ERA as each capability opens in your market.

Where each capability stands.

Every capability runs in the sandbox today. Live access opens with launch partners, and we update this as each one goes live.

CapabilitySandboxLive
Ledger, balances, transfers and balance proofsAvailableOpening with launch partners
Five ready-made apps paid on the rail, and ERA Finality marks with an open searchAvailableOpening with launch partners
API, signed events, webhooks, Python and JavaScript clientsAvailableOpening with launch partners
Crypto in and out on ERA-run walletsAvailableOpening with launch partners
Card inAvailableOpening with launch partners
Card out (push to card)AvailableOpening with launch partners

Before any live money: an independent reserve attestation and an outside security review.

Free on the rail. Simple at the edges.

Moving money on the rail is free. You pay only where money comes in by card, goes out, or changes currency. Your full rate card is in your developer account and at GET /v1/pricing with your key.

Developer sandbox

Free

Transfers on the rail

Free

Card in and card out

At or below leading processors

Crypto in

Free

Crypto out and conversion

One clear percentage

Enterprise

Custom