Crypto payment API for developers
easyway is a crypto payment gateway you drive from your own code: create an invoice, send the customer to the hosted checkout, get a signed webhook when it is paid. The customer pays straight to your own wallet; easyway never holds the money. 75 coins on 15 networks, no fee on payments (a free plan, and paid plans for more volume), and a sandbox that behaves like production.
The whole API on one screen
JSON over HTTPS at https://api.easyway.cash, authenticated with Authorization: Bearer sk_…. Each key carries only the scopes you tick when you create it.
POST /v1/invoicesGET /v1/invoicesGET /v1/invoices/{id}POST /v1/invoices/{id}/cancelGET /v1/transactions/unmatchedGET /v1/accountGET /v1/assetsGET /v1/rates| Endpoint | Scope | What it does |
|---|---|---|
POST /v1/invoices | invoices:write | Create an invoice in USD or a coin; returns payment_url for the hosted checkout |
GET /v1/invoices | invoices:read | List invoices, newest first; filter by order_id or a date range |
GET /v1/invoices/{id} | invoices:read | One invoice with its status, amounts and coin |
POST /v1/invoices/{id}/cancel | invoices:write | Cancel an invoice while it is still pending (no payment seen) |
GET /v1/transactions/unmatched | transactions:read | Transfers to your wallet that could not be tied to one invoice |
GET /v1/account | any key | Your plan and this month's live-invoice usage |
GET /v1/assets | any key | Coins and networks open now, with confirmations, minimums and whether you have a wallet for each |
GET /v1/rates | any key | Current USD price of every coin |
The same contract is published as an OpenAPI 3.1 file at /openapi.json, so you can import it into Postman or Insomnia or generate a typed client. Field-by-field reference and samples are in the API docs.
Your first call
curl -X POST https://api.easyway.cash/v1/invoices \
-H "Authorization: Bearer $EASYWAY_API_KEY" \
-H "Idempotency-Key: order-1042" \
-H "Content-Type: application/json" \
-d '{"amount":"49.90","currency":"USD","order_id":"1042","success_url":"https://shop.example/thanks"}'The same request from Node.js:
// A 49.90 USD invoice; the customer picks a coin on the hosted checkout
const res = await fetch("https://api.easyway.cash/v1/invoices", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EASYWAY_API_KEY}`,
"Idempotency-Key": "order-1042",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": "49.90",
"currency": "USD",
"order_id": "1042",
"success_url": "https://shop.example/thanks"
}),
});
if (!res.ok) throw new Error(`easyway ${res.status}: ${(await res.json()).error}`);
const data = await res.json();The answer has an id to save with your order and a payment_url to redirect to. The customer picks a coin and network there; the coin amount (pay_amount) is fixed when they pick it. On TRON, EVM chains and Solana it can be a hair above the quote, because the exact amount tells invoices to your one address apart, so always show the customer pay_amount. Leave out allowed_assets to offer every coin you have a wallet for, or list asset ids to offer only those. The USDT TRC-20 guide walks through the full flow in Node.js, PHP and Python.
Conventions you can rely on
"49.9"), never floats, in requests and responses400 validation_error with the names of the bad fieldserror code in every error body; match on it, not on the messageIdempotency-Key (8–128 characters) on POSTs; a repeat with the same body returns the first answer with Idempotent-Replayed: true, a different body under the same key gets 422, a repeat while the first is still running gets 409page and pageSize (up to 100), newest first, with total; from / to take whole UTC days409 no_wallets_configured / 409 wallet_not_configured. Past your plan's monthly allowance, 402 plan_invoice_limit_reached: do not retry it blindly. Test mode has neither.429 rate_limited with standard RateLimit headerssk_test_ and sk_live_ keys hit the same URLs; the key decides the mode and a test key never sees live data| Topic | How it works |
|---|---|
| Amounts | Decimal strings ("49.9"), never floats, in requests and responses |
| Validation | Unknown fields are rejected, not ignored: 400 validation_error with the names of the bad fields |
| Errors | A stable machine-readable error code in every error body; match on it, not on the message |
| Retries | Send Idempotency-Key (8–128 characters) on POSTs; a repeat with the same body returns the first answer with Idempotent-Replayed: true, a different body under the same key gets 422, a repeat while the first is still running gets 409 |
| Paging | page and pageSize (up to 100), newest first, with total; from / to take whole UTC days |
| Live prerequisites | A receiving wallet for the network (dashboard → Wallets), else 409 no_wallets_configured / 409 wallet_not_configured. Past your plan's monthly allowance, 402 plan_invoice_limit_reached: do not retry it blindly. Test mode has neither. |
| Rate limit | 300 requests per minute per key; 429 rate_limited with standard RateLimit headers |
| Test and live | sk_test_ and sk_live_ keys hit the same URLs; the key decides the mode and a test key never sees live data |
Webhooks
Subscribe an HTTPS endpoint to invoice.confirming, invoice.paid, invoice.underpaid, invoice.overpaid, invoice.expired, invoice.cancelled and transaction.unmatched (plus invoice.created). Each delivery is signed with HMAC-SHA256 over the timestamp and the raw body (X-Webhook-Signature: t=…,v1=…), times out after 10 seconds and is retried up to 8 times over about 45 hours; an endpoint that fails 25 times in a row is switched off until you turn it back on. Verify webhook signatures has working code for Node.js, PHP, Python and Next.js.
Running several shops on one account? Give each its own API key: invoice events of that key can go to the key's own webhook, and the checkout can show that shop's name and support e-mail instead of the account's. The store-side flow (order → invoice → webhook → ship) is laid out in crypto payments for e-commerce.
Keys and funds
Keys are stored only as a keyed hash, can be limited to a list of IP addresses and can be revoked at any time. There are no funds behind the API: customers pay straight to the wallet you set in the dashboard, and easyway never asks for your private key or seed phrase, so neither easyway nor a leaked key can move, reverse or refund a payment. Replacing a wallet needs 2FA and is e-mailed to you. The security page explains the rest.
What the API does not do (yet)
So you can plan around it rather than find out later:
| Not available | What to do instead |
|---|---|
| An SDK package | Use the cURL / Node.js / PHP / Python samples in the docs or generate a client from /openapi.json |
| Refund endpoint | Send the refund from your own wallet to the customer's address (see underpaid and late payments) |
| Recurring billing | Create a new invoice per billing period from your own scheduler (see crypto payments for SaaS subscriptions) |
| Conversion to another coin or to fiat | Payments arrive in your wallet in the coin the customer paid with; convert them on an exchange of your choice if you want |
Where to go next
Test crypto payments in the sandbox, handle underpaid and late payments, the guide index, and the pricing page for plans and every coin's confirmations and minimum.
Language walkthroughs with the full invoice and webhook code: Java (java.net.http and javax.crypto), PHP (cURL and hash_hmac), Go (standard library only), Python (urllib and hmac, no pip install) and Node.js (fetch and node:crypto, no npm install). When a call fails, which crypto payment API errors to retry and which to fix sorts every error code.