If you've integrated Stripe, a good crypto payment API should feel instantly familiar: create a session server-side, redirect the customer, act on a signed webhook. The difference is what's underneath — settlement is wallet-to-wallet on-chain, so there's no balance to hold and no percentage to skim.
This guide covers the integration pattern and the crypto-specific details that actually matter.
the core flow
1) Your server calls the API with amount, currency and coins you accept → gets a checkout session URL. 2) You redirect the customer (or embed the page). 3) The customer pays from any wallet. 4) The gateway detects and verifies the payment on-chain and POSTs a signed webhook to your endpoint. 5) You verify the HMAC signature and fulfil the order. crypt.pe's gateway API follows exactly this shape, with test-mode keys for development.
webhooks done right
Verify the HMAC signature on every event — never trust an unsigned payload. Treat events as at-least-once delivery: store the event id and ignore duplicates (idempotency). Respond 2xx fast and do heavy work async. And reconcile: poll the session status API on a schedule as a safety net for missed webhooks.
crypto-specific gotchas
Confirmation depth: small payments can fulfil on 1 confirmation; large ones should wait deeper — a good API exposes the policy so you don't reimplement it. Amount matching: the API locks an exact crypto amount per session, so underpayments never mark paid. Network mix-ups: sessions constrain the chain, which kills the classic 'sent USDT on the wrong network' ticket.
testing before real money
Use test keys to script the full lifecycle — create session, simulate payment, receive webhook, verify signature, fulfil — in CI. Then do one real $2 payment on a cheap chain (Solana or Tron) end-to-end before launch. Total integration effort is typically an afternoon.
frequently asked
Is there a crypto equivalent of the Stripe API?
Yes — non-custodial gateway APIs like crypt.pe's mirror the Stripe pattern: server-side checkout sessions, redirect, signed webhooks, test keys. The difference is settlement goes straight to your own wallet with 0% fees.
How do I secure crypto payment webhooks?
Verify the HMAC signature with your webhook secret on every event, dedupe by event id, respond quickly and reconcile with the status API. The same discipline you'd apply to Stripe webhooks applies here.
Can I test a crypto payment API without real funds?
Yes — test-mode API keys let you create sessions and simulate the full payment lifecycle including webhooks, so the entire integration can run in CI before any real transaction.



