Integration guide

Accept crypto payments on your website

A practical guide: pick an integration, create an order with one API call, confirm the payment by webhook. Works for any stack — from a static site to a custom checkout.

In short

The simplest integration is one server-side call: create an order for the cart total, redirect the buyer to the returned checkout_url, and mark the order paid when your webhook receives payment.succeeded. The crypto goes straight to your wallet; UTOPAY keeps 1.5%.

Integration time
About an hour
Languages
Any (REST + JSON)
Checkout
Hosted page or your own
Confirmation
Signed webhooks
Test mode
Yes, with test keys

Choose how the buyer pays

OptionBest forEffort
Hosted payment page — redirect to checkout_urlAny site, fastest launch. Shows amount, network, address, QR and live statusOne API call
Your own checkout — show crypto.address and crypto.amount_coinCustom UX, the buyer never leaves your domainAPI call + your UI
CMS — WooCommerce, ShopifyStores on a platformSee the sections below

Step 1 — create an order on your server

Never create orders from the browser with a secret key. Call the API from your backend with the cart total and the coin the buyer chose:

curl -X POST https://api.utopay.app/v1/crypto/payments \
  -H "Authorization: Bearer utopay_sk_live_..." \
  -H "content-type: application/json" \
  -d '{ "coin": "bep20/usdt", "amount": 49.90, "currency": "EUR",
        "description": "Order #1042",
        "success_url": "https://shop.example/thanks",
        "cancel_url": "https://shop.example/cart" }'

With an account the payout wallet comes from your project settings. Without an account use POST /v1/crypto/pay and pass payout_address. The list of coins and networks — with minimum amounts — is at GET /v1/crypto/coins.

Step 2 — send the buyer to pay

  • Redirect to checkout_url: the page shows the exact amount, network, QR code and a live status, then returns the buyer to your success_url.
  • Or render crypto.address and crypto.amount_coin yourself and poll GET /v1/payments/:id while the buyer is on the page.

Step 3 — confirm the payment by webhook

Do not trust the redirect alone. Mark the order paid when your endpoint receives a signed payment.succeeded event; handle payment.underpaid if less arrived than requested. Verify the x-utopay-signature header with your whsec_… secret — examples for Node.js, PHP and Python are in the webhook docs.

<?php // PHP: verify a UTOPAY webhook
$raw = file_get_contents("php://input");
parse_str(str_replace(",", "&", $_SERVER["HTTP_X_UTOPAY_SIGNATURE"]), $sig);
$expected = hash_hmac("sha256", $sig["t"] . "." . $raw, getenv("UTOPAY_WHSEC"));
if (!hash_equals($expected, $sig["v1"] ?? "") || abs(time() - (int)$sig["t"]) > 300) {
  http_response_code(400); exit;
}
$event = json_decode($raw, true);
if ($event["event"] === "payment.succeeded") { /* mark $event["data"]["id"] as paid */ }
http_response_code(200);

WordPress and WooCommerce

There is a ready UTOPAY plugin for WooCommerce — see plugins. Without the plugin, a WooCommerce store integrates through the API: create the order in the woocommerce_checkout_order_processed hook, redirect to checkout_url, and complete the order from the webhook handler.

Shopify

Shopify only lets approved payment apps appear as a checkout gateway. The practical setup is a manual payment method (for example “Pay with crypto”) plus a UTOPAY payment page: when the order is placed, your app or automation creates a UTOPAY order for the total and emails the buyer the checkout_url. The webhook then marks the Shopify order as paid.

Go-live checklist

  • Test the full flow with test keys (utopay_sk_test_…) — test orders never touch the blockchain.
  • Check the payout wallet supports every network you offer.
  • Show the network name next to the amount — wrong-network transfers are the most common support issue.
  • Store the UTOPAY order id with your order and de-duplicate webhooks by it.
  • Decide your policy for underpaid orders before launch.

Updated · UTOPAY team

FAQ

Accepting crypto on a website — FAQ

Can I accept crypto without a developer?

You need one server-side API call and a webhook handler — a few dozen lines in any language. Without any code, you can create an order with one curl command and send the buyer the checkout_url.

Which coins can my customers use?

Today: USDT, ETH, BNB, POL, DAI and other tokens on EVM networks (Ethereum, BNB Smart Chain, Polygon, Base, Optimism, Arbitrum, Avalanche, Linea). Bitcoin, Tron, Solana and TON are being connected. The live list is GET /v1/crypto/coins.

Where does the money go?

Straight to your wallet. Each payment is forwarded on-chain as soon as it arrives; UTOPAY keeps 1.5% and never holds the funds.

Can I also accept cards?

Yes. The card gateway works from the same account: buyers pay by card, Apple Pay or other methods and you receive crypto.

Is there a WooCommerce plugin?

Yes, it is available in plugins. Without the plugin, use the API flow described above.

Keep reading

Add crypto checkout to your site

Create a free account for API keys, webhooks and Telegram alerts — or call the no-account endpoint with just your wallet address.