मुख्य सामग्री पर जाएँ
REST · Webhooks · SDKs · Test mode

Crypto payment API and SDKs for developers

Crypto payment API with idempotent REST calls, signed webhooks, full test mode and SDKs for Node, PHP, Python, Flutter, React Native and Android.

RazCrypto टीमअपडेट: 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 amount and currency as USD, INR, EUR and others — we convert at a locked rate — or as a coin such as USDT for an exact crypto amount.
  • Idempotency keys. Pass Idempotency-Key on 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, expired and cancelled — with real webhooks and no test coins.
  • Typed errors. Every error has a type, a stable code, the param at fault and a request_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)

  1. Create a payment on your server with your secret key (sk_test_… or sk_live_…). Save the returned id (pay_…) with your order.
  2. Send the customer to checkout — redirect to checkout_url, or open the checkout.js popup with your publishable key (pk_…) and the payment id.
  3. The customer pays the exact quoted amount on the network and coin they pick. Status moves pending → confirming.
  4. We confirm on-chain. When the block is final, the status becomes paid and we POST payment.paid to your webhook URL.
  5. Fulfil the order after verifying the webhook signature, or after a server-side GET /v1/payments/{id}. Ship only on paid.

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

Shell
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.

PlatformInstall
Node.js 18+npm i razcrypto-node
PHP 8.1+ / Laravelcomposer require worldxgrowth/razcrypto-php-sdk
Python 3.9+pip install razcrypto
Browser popupnpm i @razcrypto/checkout or the checkout.js script tag
React Nativenpm i @razcrypto/react-native
Flutterrazcrypto_checkout: ^1.0.0 in pubspec.yaml (pub.dev)
Android (Kotlin/Java)the razcrypto-checkout Gradle module from the SDK download
WooCommerce / WordPressplugin 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

JavaScript
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
<?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

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:

JavaScript
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 2xx within 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.status or 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:

Shell
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.

क्रिप्टो पेमेंट गेटवे की तुलना: कस्टडी, फीस, KYC, Bitcoin और सेटलमेंट
गेटवेRazCryptoNOWPaymentsCoinbase Commerce → BusinessCoinPaymentsBitPayCryptomusBTCPay Server
कस्टडीNon-custodialNon-custodial, optional custodyCustodial (Commerce retired 31 Mar 2026)Custodial balance or auto payoutCustodialCustodialSelf-hosted
हर पेमेंट पर फीस0%1% (0.5% + 0.5% on conversion per their blog)Commerce was 1%; Business fee not confirmed3% + network fees2% + $0.25 (1% + $0.25 above $1M/month)2% for new users (down to 0.4% on request)0% (you pay hosting + network)
मंथली फीस$4.99 / $6$0$0$0$0$0~$10 server
मर्चेंट KYCNot needed to startOnly if a payment is flaggedYesNot confirmedYesYesNo
Bitcoin
सेटलमेंटInstant, to your own walletOwn wallet or custody balanceUSDC in a Coinbase accountBalance, ASAP or nightly payoutDaily fiat payout to bankBusiness wallet, then withdrawYour own wallet
फ्रीज़ का खतराNone — we never hold fundsPossible on custody balanceYes (custodial)Yes (custodial)Yes (custodial)AML holds reported in reviewsNone
फीस हर प्रोवाइडर के पब्लिक प्राइसिंग पेज से ली गई है, आखिरी बार 2026-11-07 को जांची गई। कीमतें बदलती रहती हैं — फैसला लेने से पहले प्रोवाइडर से जांच लें।

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.

अक्सर पूछे जाने वाले सवाल

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.

आज ही क्रिप्टो सीधे अपने वॉलेट में लें

0% ट्रांज़ैक्शन फीस, फ्लैट $4.99 महीना, कुछ ही मिनटों में लाइव। फ्री ट्रायल, कार्ड की ज़रूरत नहीं।

फ्री ट्रायल शुरू करें