merchant guides/ 8 min read

crypto payment api: a stripe-style integration guide

checkout sessions, signed webhooks, test keys and idempotency — how to build crypto payments into your product properly.

Crypto Payment API: A Stripe-Style Integration Guide
share whatsapp post

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.

ready to accept crypto?
free page, 0% fees, live in 60 seconds — non-custodial by design.
create your free page
about crypt.pe

Non-custodial by design. Payments settle wallet-to-wallet on-chain, straight from the payer to your own wallet. crypt.pe never holds, freezes or forwards funds — there is no platform balance and no withdrawal step, and every payment gets a verifiable on-chain receipt.

0% transaction fees. Plans are flat subscriptions with a free tier — compare that with the 1–2% charged by custodial processors. One page accepts Bitcoin, USDT, Ethereum, Solana and 20+ coins across 13 chains, with simple pricing and no payout schedule.

Tools merchants actually use. Exact-amount invoices with live tracking, product links, printable QR standees, HMAC-signed webhooks, CSV exports and a Stripe-style API — see the merchant guides or create your free page in about a minute.

How a payment works. You add wallet addresses you already own, share your crypt.pe link or QR code, and the customer pays from their own wallet. crypt.pe locks the amount at invoice time, watches the chain, matches the transaction and issues a receipt both sides can verify on a block explorer — software around the payment, never in the money flow.

Works everywhere by default. Because settlement is on-chain to your own wallet, there is no country list, no bank partnership gating access and no account that can be closed over geography. Merchants use crypt.pe across India, the UAE, Nigeria, the Philippines, Brazil and 100+ other markets — see the country guides.

Stablecoin-first, volatility optional. Accept USDT or USDC and a $100 invoice is still worth $100 when it is paid — no price risk in between. Prefer BTC, ETH or SOL? Amounts are locked at invoice time either way, and your dashboard records the USD value of every payment for clean bookkeeping. Questions? Start with the FAQ or payment help.