मुख्य सामग्री पर जाएँ

SDKs

SDKs & downloads

Official libraries for every part of a crypto checkout. Pick your platform below: each SDK has its own page with the download, install (registry, local and development), keys setup, code examples and a full integration.

SDKs are MIT-licensed; the plugins are GPL-2.0-or-later (WordPress rules).

Pick your SDK

Mobile apps (publishable key or checkout URL)

SDKPackageGuideDownload
Flutter · Android + iOSrazcrypto_checkout (pub.dev)Flutter SDK →zip
Android · Kotlin / Javacom.razcryptogateway:android-sdkAndroid SDK →zip
React Native · Android + iOS@razcrypto/react-native (npm)React Native SDK →zip

Websites (publishable key or checkout URL)

SDKPackageGuideDownload
Browser popupcheckout.js / @razcrypto/checkout (npm)checkout.js →zip

Servers (secret key + webhook signing secret)

SDKPackageGuideDownload
PHP 8.1+ · Laravel, any PHPworldxgrowth/razcrypto-php-sdk (Packagist)PHP SDK →zip
Node.js 18+ · Express, NestJSrazcrypto-node (npm)Node.js SDK →zip
Python 3.9+ · Django, Flask, FastAPIrazcrypto (PyPI)Python SDK →zip

Plugins (no code)

PluginGuideDownload
WooCommerce · store checkoutWooCommerce →zip
WordPress · Pay button / shortcodeWordPress →zip

Versions and SHA-256 checksums of every file: manifest.json.

Which ones do I need?

Most integrations use one server SDK + one client:

You are buildingServerClient
Flutter app + Laravel backendPHP SDKFlutter SDK
Android (Kotlin) app + any backendPHP / Node.js / PythonAndroid SDK
React Native app + Node backendNode.js SDKReact Native SDK
Website with your own checkout pagePHP / Node.js / Pythoncheckout.js or a redirect to checkout_url
WordPress / WooCommerce store—Plugin

Rule of thumb: the secret key (sk_…) and the webhook signing secret (whsec_…) stay on your server. Browsers and apps only ever get the publishable key (pk_…) or the checkout_url your server received.

How every SDK works

  1. Install the package.
  2. Initialize it with your key. The SDKs already know the official RazCrypto API.
  3. Create a payment on your server and send the customer to its checkout_url, or open checkout in your page or app.
  4. Mark the order paid only from the verified payment.paid webhook or a server-side retrieve().
JavaScript
const rc = new RazCrypto(process.env.RAZCRYPTO_SECRET_KEY);
const payment = await rc.payments.create({ amount: "25.00", currency: "USD", reference_id: "order_1042" });

Get your keys in Dashboard → API apps. Use sk_test_… while building. Test mode never moves real money.

Mobile apps: how the SDKs open checkout

The mobile SDKs push a full-screen native screen that hosts the RazCrypto checkout in a WebView, the same way card-gateway mobile SDKs work. There is no address bar, the merchant's logo and colours are applied, wallet buttons open the wallet app, Back asks before leaving, and the result comes back to your code as a typed value. New coins, networks and design updates reach every app without an app update.

Mobile app without an SDK

Any app can take crypto payments with only the checkout_url from your server:

  1. Create the payment on your server with a redirect_url on your own https domain, for example https://shop.example/app/payment-done. Register that URL as an Android App Link / iOS Universal Link so it opens your app (live mode accepts only https URLs).
  2. Open the checkout_url in an in-app browser tab: Android Custom Tabs (androidx.browser), iOS SFSafariViewController, or url_launcher / Linking.openURL. Wallet buttons work there without extra code.
  3. After payment the customer is sent to redirect_url and lands back in your app. Ask your server for the payment status to show the result.
Kotlin
// Android, no SDK: implementation("androidx.browser:browser:1.8.0")
CustomTabsIntent.Builder().build().launchUrl(context, Uri.parse(checkoutUrl))

Using your own WebView instead? Open every link that is not on the checkout host (metamask://, trust://, wc:, other sites) outside the WebView, or the wallet buttons will not work. The SDKs already do this. checkout.js is for web pages; inside a native app use an SDK or the checkout_url.

Custom environment (optional)

Not needed for normal use. Only for a staging server or a self-hosted RazCrypto gateway:

SDKOptionEnvironment variable
Node.jsnew RazCrypto(key, { apiBase: "https://staging.example" })RAZCRYPTO_API_BASE
PHPnew Client($key, ['api_base' => 'https://staging.example'])RAZCRYPTO_API_BASE
PythonRazCrypto(key, api_base="https://staging.example")RAZCRYPTO_API_BASE
checkout.jsopen({ payHost }) or data-pay-host on the script/button—
AndroidCheckoutOptions.Builder().payHost(…)—
FlutterCheckoutOptions(…, payHost: …)—
React Nativeopen({ …, payHost })—
WooCommerce / WordPress pluginsdefine( 'RAZCRYPTO_API_BASE', 'https://staging.example' ); in wp-config.php—

The SDK adds /v1/… itself; a trailing / or /v1 is removed. A checkout_url already carries its host.

Errors and retries

  • API errors raise a typed error with status, code, param and request_id (see Errors). Switch on code, never on the message.
  • Network errors, 429 and 5xx are retried twice with backoff. Retries reuse the same Idempotency-Key, so a retry never creates a second payment.
  • Pass your own idempotency key (for example your order id) to make retries safe across processes too.
  • Test mode: use sk_test_… and payments.simulate(id, "paid") to drive the outcome.

Versioning

  • SDKs follow semantic versioning. A minor or patch update never breaks your code.
  • /v1/checkout.js always serves the latest 1.x. Versioned files (checkout.1.0.4.js) never change.
  • Each release is listed in the changelog.