RazCrypto TeamUpdated 2026-11-07
The RazCrypto crypto payment API lets you create a payment with one REST call, send the customer to a hosted checkout or a popup, and fulfil the order from a signed webhook. Payments in USDT, USDC, BNB, ETH and SOL go straight to your own wallet, and official SDKs cover Node.js, PHP/Laravel, Python, the browser, Flutter, React Native and Android. There is no per-transaction fee.
What you get with the crypto payment API
The API is designed like the card-payment APIs most developers already know, so there is little new to learn:
- REST and JSON. One main resource,
/v1/payments, with create, retrieve, list, cancel, quote and (in test mode) simulate. - Fiat or coin pricing. Send
amountandcurrencyasUSD,INR,EURand others — we convert at a locked rate — or as a coin such asUSDTfor an exact crypto amount. - Idempotency keys. Pass
Idempotency-Keyon create. The same key never creates a second payment, so network retries are safe. - Signed webhooks. Events follow the open Standard Webhooks spec, are signed with HMAC-SHA256, and are retried for about 3 days.
- Unique-amount matching. Each open payment on an address gets a unique exact amount, so transfers are matched on-chain to the right order.
- Full test mode. Test keys, test wallets that activate instantly, and a simulate endpoint for
paid,underpaid,overpaid,expiredandcancelled— with real webhooks and no test coins. - Typed errors. Every error has a
type, a stablecode, theparamat fault and arequest_id. - Open source. The gateway is AGPL-3.0; the SDKs are MIT.
Because RazCrypto is a non-custodial crypto payment gateway, your code never deals with balances or withdrawals. The money is in the merchant's wallet when the status turns paid.
How a payment works (5 steps)
- Create a payment on your server with your secret key (
sk_test_…orsk_live_…). Save the returnedid(pay_…) with your order. - Send the customer to checkout — redirect to
checkout_url, or open thecheckout.jspopup with your publishable key (pk_…) and the payment id. - The customer pays the exact quoted amount on the network and coin they pick. Status moves
pending→confirming. - We confirm on-chain. When the block is final, the status becomes
paidand we POSTpayment.paidto your webhook URL. - Fulfil the order after verifying the webhook signature, or after a server-side
GET /v1/payments/{id}. Ship only onpaid.
Building your own payment page? Send chain and coin on create and the response already contains the quote: address, exact amount, payment_uri and a ready-made QR image URL. One call, no second request.
Create a payment with curl
curl https://razcryptogateway.com/v1/payments \
-H "Authorization: Bearer $RAZCRYPTO_SECRET_KEY" \
-H "Idempotency-Key: order_1042" \
-H "Content-Type: application/json" \
-d '{
"amount": "25.00",
"currency": "USD",
"reference_id": "order_1042",
"redirect_url": "https://shop.example/thanks"
}'The response is 201 with id, status: "pending", checkout_url and expires_at (30 minutes by default, configurable from 5 minutes to 7 days with expires_in).
Install an SDK
Every SDK already knows the official API, retries network errors, 429 and 5xx twice with the same idempotency key, and raises typed errors.
| Platform | Install |
|---|---|
| Node.js 18+ | npm i razcrypto-node |
| PHP 8.1+ / Laravel | composer require worldxgrowth/razcrypto-php-sdk |
| Python 3.9+ | pip install razcrypto |
| Browser popup | npm i @razcrypto/checkout or the checkout.js script tag |
| React Native | npm i @razcrypto/react-native |
| Flutter | razcrypto_checkout: ^1.0.0 in pubspec.yaml (pub.dev) |
| Android (Kotlin/Java) | the razcrypto-checkout Gradle module from the SDK download |
| WooCommerce / WordPress | plugin zip, no code |
The secret key and the webhook signing secret (whsec_…) stay on your server. Browsers and mobile apps only ever get the publishable key or the checkout_url. All downloads and checksums are on the SDKs page.
Node.js
import { RazCrypto } from 'razcrypto-node';
const rc = new RazCrypto(process.env.RAZCRYPTO_SECRET_KEY);
const payment = await rc.payments.create(
{
amount: '49.00', // decimal string
currency: 'USD', // or INR, EUR …; converted to crypto at checkout
reference_id: 'order_1042', // your order id
redirect_url: 'https://shop.example/thanks',
},
{ idempotencyKey: 'order_1042' }, // a retry never creates a duplicate
);
const p = await rc.payments.retrieve(payment.id); // server truth
if (p.status === 'paid') { /* fulfil */ }PHP / Laravel
<?php
require 'vendor/autoload.php';
$rc = new \RazCrypto\Client(getenv('RAZCRYPTO_SECRET_KEY'));
$payment = $rc->payments()->create([
'amount' => '49.00',
'currency' => 'USD',
'reference_id' => $order->id,
'redirect_url' => 'https://shop.example/thanks',
], 'order_' . $order->id); // idempotency key
header('Location: ' . $payment['checkout_url']);Python
import os
from razcrypto import RazCrypto
rc = RazCrypto(os.environ["RAZCRYPTO_SECRET_KEY"])
payment = rc.payments.create(
amount="49.00",
currency="USD",
reference_id=str(order.id),
redirect_url="https://shop.example/thanks",
idempotency_key=f"order_{order.id}",
)
# redirect the customer to payment["checkout_url"]More: Node.js SDK, PHP SDK, Python SDK.
Webhooks you can trust
We POST events such as payment.confirming, payment.paid, payment.underpaid, payment.expired, payment.cancelled and payment_link.completed. Each request carries webhook-id, webhook-timestamp and webhook-signature headers.
The SDKs verify them in one line. In Express, use the raw body on this route only:
import express from 'express';
import { webhooks } from 'razcrypto-node';
app.post('/webhooks/razcrypto', express.raw({ type: 'application/json' }), async (req, res) => {
let event;
try {
event = webhooks.verify(req.body, req.headers, process.env.RAZCRYPTO_WEBHOOK_SECRET);
} catch {
return res.sendStatus(400);
}
const payment = event.data.object;
if (event.type === 'payment.paid') await markOrderPaid(payment.reference_id, payment.id);
res.sendStatus(200);
});Delivery rules worth knowing:
- Respond
2xxwithin 10 seconds and do slow work afterwards. - Failures are retried 10 times over about 3 days (30 s, 2 min, 10 min … 24 h). Retries reuse the same
webhook-id, so store it and skip repeats. - Order is not guaranteed — rely on
data.object.statusor fetch the payment. - The dashboard keeps a 90-day delivery log with a Resend button. Rolling the secret signs with both old and new secrets for 24 hours.
Hand-written verification for Node, PHP and Python is in the webhooks guide.
Test every outcome before going live
In test mode, drive a payment to any final state and receive the real webhook:
curl https://razcryptogateway.com/v1/payments/pay_…/simulate \
-H "Authorization: Bearer sk_test_…" -H "Content-Type: application/json" \
-d '{"outcome":"underpaid"}'The SDKs expose the same call as payments.simulate(id, "paid").
How the API compares
Per-transaction fees as published on each provider's pricing page as of November 2026 — check their pricing page before deciding.
| Gateway | RazCrypto | NOWPayments | Coinbase Commerce → Business | CoinPayments | BitPay | Cryptomus | BTCPay Server |
|---|---|---|---|---|---|---|---|
| Custody | Non-custodial | Non-custodial, optional custody | Custodial (Commerce retired 31 Mar 2026) | Custodial balance or auto payout | Custodial | Custodial | Self-hosted |
| Fee per payment | 0% | 1% (0.5% + 0.5% on conversion per their blog) | Commerce was 1%; Business fee not confirmed | 3% + network fees | 2% + $0.25 (1% + $0.25 above $1M/month) | 2% for new users (down to 0.4% on request) | 0% (you pay hosting + network) |
| Monthly fee | $4.99 / $6 | $0 | $0 | $0 | $0 | $0 | ~$10 server |
| Merchant KYC | Not needed to start | Only if a payment is flagged | Yes | Not confirmed | Yes | Yes | No |
| Bitcoin | |||||||
| Settlement | Instant, to your own wallet | Own wallet or custody balance | USDC in a Coinbase account | Balance, ASAP or nightly payout | Daily fiat payout to bank | Business wallet, then withdraw | Your own wallet |
| Freeze risk | None — we never hold funds | Possible on custody balance | Yes (custodial) | Yes (custodial) | Yes (custodial) | AML holds reported in reviews | None |
Many of these gateways support more coins than we do, including Bitcoin, and some settle in fiat. RazCrypto supports BNB Smart Chain, Ethereum, Solana and VDChain (USDT, USDC, BNB, ETH, SOL, VDC) with no Bitcoin, no Tron and no fiat payout. If your integration needs those, pick another provider. If you want stablecoins to the merchant's own wallet with a 0% fee and a modern API, we are a strong fit.
Who it is for
- SaaS and subscription products billing in USD or INR from their own backend.
- Marketplaces and platforms that run several stores — the Max plan allows up to 50 apps.
- Mobile apps using Flutter, React Native or Android with a Laravel, Node or Python backend.
- Agencies building checkouts for clients who want payments to land in the client's wallet.
Pricing
- Pro — $4.99/month ($35/year): unlimited API and checkout payments, webhooks, all SDKs and the WooCommerce plugin, plus 1 payment link, 1 button and 1 product page.
- Max — $6/month ($50/year): everything in Pro with unlimited links, buttons and product pages, file delivery, up to 50 apps and 10 team members.
- 0% per-transaction fee, 7-day free trial. The customer pays the network fee. See pricing.
Start building
Create a free account, make a test app, and take your first test payment in about 30 minutes. Start your 7-day free trial.
Frequently asked questions
Is there a sandbox for the crypto payment API?
Yes. Switch the dashboard to Test mode, use `sk_test_…` keys, and simulate `paid`, `underpaid`, `overpaid`, `expired` or `cancelled` outcomes. Test mode sends real webhooks and never moves real money.
How do I stop duplicate payments when a request is retried?
Send an `Idempotency-Key` header, for example your order id. The same key never creates a second payment, however many times the request is sent. The SDKs reuse the key on their automatic retries.
Which crypto payment SDK should I use?
Most integrations use one server SDK (Node.js, PHP or Python) to create payments and verify webhooks, plus one client: `checkout.js` for websites, or the Flutter, React Native or Android SDK for apps. WooCommerce and WordPress stores can use the plugins with no code.
Can I build my own checkout page?
Yes. Create the payment with `chain` and `coin`, and the response includes the address, the exact amount, a payment URI and a QR image. Show those with a timer, then follow the status by webhook or by polling.
Does the API support Bitcoin or TRC20?
No. Supported networks are BNB Smart Chain, Ethereum, Solana and VDChain. A request for an unsupported chain returns a clear `method_not_available` error, so nothing is left open.
Accept crypto into your own wallet today
0% transaction fees, flat $4.99 a month, live in minutes. Free trial, no card needed.
Start free trial