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)
| SDK | Package | Guide | Download |
|---|---|---|---|
| Flutter · Android + iOS | razcrypto_checkout (pub.dev) | Flutter SDK → | zip |
| Android · Kotlin / Java | com.razcryptogateway:android-sdk | Android SDK → | zip |
| React Native · Android + iOS | @razcrypto/react-native (npm) | React Native SDK → | zip |
Websites (publishable key or checkout URL)
| SDK | Package | Guide | Download |
|---|---|---|---|
| Browser popup | checkout.js / @razcrypto/checkout (npm) | checkout.js → | zip |
Servers (secret key + webhook signing secret)
| SDK | Package | Guide | Download |
|---|---|---|---|
| PHP 8.1+ · Laravel, any PHP | worldxgrowth/razcrypto-php-sdk (Packagist) | PHP SDK → | zip |
| Node.js 18+ · Express, NestJS | razcrypto-node (npm) | Node.js SDK → | zip |
| Python 3.9+ · Django, Flask, FastAPI | razcrypto (PyPI) | Python SDK → | zip |
Plugins (no code)
| Plugin | Guide | Download |
|---|---|---|
| WooCommerce · store checkout | WooCommerce → | zip |
| WordPress · Pay button / shortcode | WordPress → | 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 building | Server | Client |
|---|---|---|
| Flutter app + Laravel backend | PHP SDK | Flutter SDK |
| Android (Kotlin) app + any backend | PHP / Node.js / Python | Android SDK |
| React Native app + Node backend | Node.js SDK | React Native SDK |
| Website with your own checkout page | PHP / Node.js / Python | checkout.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
- Install the package.
- Initialize it with your key. The SDKs already know the official RazCrypto API.
- Create a payment on your server and send the customer to its
checkout_url, or open checkout in your page or app. - Mark the order paid only from the verified
payment.paidwebhook or a server-sideretrieve().
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:
- Create the payment on your server with a
redirect_urlon your own https domain, for examplehttps://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). - Open the
checkout_urlin an in-app browser tab: Android Custom Tabs (androidx.browser), iOS SFSafariViewController, orurl_launcher/Linking.openURL. Wallet buttons work there without extra code. - After payment the customer is sent to
redirect_urland lands back in your app. Ask your server for the payment status to show the result.
// 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:
| SDK | Option | Environment variable |
|---|---|---|
| Node.js | new RazCrypto(key, { apiBase: "https://staging.example" }) | RAZCRYPTO_API_BASE |
| PHP | new Client($key, ['api_base' => 'https://staging.example']) | RAZCRYPTO_API_BASE |
| Python | RazCrypto(key, api_base="https://staging.example") | RAZCRYPTO_API_BASE |
| checkout.js | open({ payHost }) or data-pay-host on the script/button | — |
| Android | CheckoutOptions.Builder().payHost(…) | — |
| Flutter | CheckoutOptions(…, payHost: …) | — |
| React Native | open({ …, payHost }) | — |
| WooCommerce / WordPress plugins | define( '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,paramandrequest_id(see Errors). Switch oncode, never on the message. - Network errors,
429and5xxare retried twice with backoff. Retries reuse the sameIdempotency-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_…andpayments.simulate(id, "paid")to drive the outcome.
Versioning
- SDKs follow semantic versioning. A minor or patch update never breaks your code.
/v1/checkout.jsalways serves the latest 1.x. Versioned files (checkout.1.0.4.js) never change.- Each release is listed in the changelog.