easyway
Create account

Crypto payments for e-commerce

Add crypto as a payment method next to cards. Your store creates one easyway invoice per order, sends the customer to a hosted payment page where they pay in any of 23 coins on 12 networks, and ships when a signed webhook says the order is paid.

How a crypto checkout works

At checkout your server creates an invoice for the order total and redirects the customer to its payment_url. The customer picks a coin and network there; the coin amount is fixed at that moment's rate, so a dollar price stays a dollar price while they pay. When the payment is confirmed on-chain, easyway posts invoice.paid to your webhook and the payment page shows a button back to your success_url. Your store never handles wallets, addresses or block confirmations.

curl https://api.easyway.cash/v1/invoices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-10482-129.90" \
  -d '{
    "amount": "129.90",
    "currency": "USD",
    "order_id": "10482",
    "description": "Order #10482",
    "customer_email": "buyer@example.com",
    "allowed_assets": ["USDT_TRC20", "USDT_BEP20", "USDC_ERC20"],
    "success_url": "https://shop.example.com/order/10482/thanks",
    "cancel_url": "https://shop.example.com/cart",
    "lifetime": 60
  }'

order_id is your order number (up to 128 characters); it comes back in every webhook and you can list invoices by it. allowed_assets is optional — leave it out to accept every enabled coin, or keep it to stablecoins if you do not want to hold volatile coins. lifetime is how long the invoice can be paid, from 5 to 1,440 minutes (default 60).

Order states and webhooks

Map each invoice status to an order state in your store. Decide on the status in the webhook, never on the redirect: a customer can close the tab before returning to your site.

Invoice statusWebhookWhat the store does
pending—Order waits for payment; reserve the stock
confirminginvoice.confirmingShow “payment received, confirming” — do not ship yet
paidinvoice.paidMark the order paid and ship, once (handlers must be idempotent)
underpaidinvoice.underpaidHold the order; the customer can send the rest from the same page
expiredinvoice.expiredRelease the stock but keep the order — a late payment can still arrive
cancelledinvoice.cancelledYou cancelled it (cart changed or order abandoned)

Once a coin is chosen its address is watched until 7 days after the invoice expires, and cancelling does not stop that: a transfer that still arrives turns the invoice paid or underpaid with the normal webhook. The underpaid and late payments guide has a handler for every case, and verifying webhook signatures shows how to check that a delivery is genuine.

When the cart changes

An invoice is for one amount. If the customer goes back and edits the cart, cancel the old invoice with POST /v1/invoices/:id/cancel — possible only while it is pending — and create a new one. Building the Idempotency-Key from the order id and the total, as above, makes a retried request return the same invoice while a new total always gets a new one. In your invoice.paid handler, compare the invoice amount with the order total before you ship, in case an old invoice was paid after the cart changed.

Fees, balance and refunds

Each paid invoice costs a flat 0.5% platform fee; there is no monthly plan and no setup fee. Payments arrive in the coin the customer chose and are not converted. easyway holds your balance until you withdraw it to a wallet address you have whitelisted; withdrawal fees and minimums per coin are on the pricing page.

Crypto payments have no chargebacks, and there is no refund button. To refund an order, ask the customer for an address on the same network and send a payout from your balance — in live mode payouts only go to whitelisted addresses, so add theirs first. The payouts API guide covers both steps.

No developer? Use a payment link

If your store cannot call an API, create a payment link in the dashboard and paste it into the order confirmation e-mail. For files, licence keys or gift codes, a product link delivers the item after payment — see selling digital products.

Start in test mode

Test keys create invoices that never touch a blockchain. Place a test order, press Simulate payment in the dashboard and check that your store marks the order paid; simulate a smaller amount to see the underpaid path. The sandbox guide walks through it, and the crypto payment API overview and the invoice reference list every field.

Create a merchant accountRead the API docs
Crypto payments for e-commerce | easyway