DEV Community

poetic
poetic

Posted on

How to Accept USDT Payments in Your Store or SaaS App

If you run a cross-border store, SaaS product, digital download business or Telegram-based service, card payments are not always the cleanest option.

Stripe and PayPal are excellent products, but they are not equally available to every merchant, every country, or every product category. Some merchants deal with chargebacks. Some sell to customers who already prefer stablecoins. Some simply need a second payment rail when card payments fail.

That is where USDT and USDC checkout can be useful.

This article walks through the simplest integration model: create a payment order, send the buyer to a hosted checkout page, receive a signed webhook, and mark your own order as paid.

The example uses ChainPay, a stablecoin checkout product I am building, but the architecture applies to most crypto payment gateways.

When stablecoin checkout makes sense

Stablecoin checkout is not a replacement for card payments in every business. It works best when your customers already understand crypto, or when the alternative payment options are painful.

Good examples:

  • Cross-border ecommerce stores with buyers in multiple regions
  • SaaS products serving developers, Web3 users or global customers
  • Digital products where chargebacks are a major risk
  • Telegram sellers who already settle manually in USDT
  • AI tools, API products or automation platforms that need programmable checkout

The main benefit is final settlement. Once a USDT or USDC payment is confirmed on-chain, there is no card-network chargeback flow. The tradeoff is user education: the customer must know how to pay with a wallet or exchange account.

Three ways to add USDT checkout

1. Use a plugin

If you run WooCommerce, this is the fastest path. Install a payment gateway plugin, paste your API keys, run a sandbox test, and enable the payment method at checkout.

This is the best option for store owners who do not want to write code.

2. Use a hosted checkout API

This is the best option for SaaS products, custom stores and developer-led businesses.

Your backend creates a payment order through an API. The payment gateway returns a checkout URL. The customer pays on that hosted page. Your backend receives a webhook when the order is paid.

This feels similar to integrating a normal payment gateway, except the settlement happens on-chain.

3. Build your own wallet infrastructure

You can run nodes, generate addresses, monitor blockchains and sweep funds yourself. This gives maximum control, but it is usually not worth it unless crypto payment infrastructure is your core business.

For most merchants, hosted checkout is the fastest safe path.

The integration flow

The core flow looks like this:

  1. Your customer places an order.
  2. Your backend calls POST /v1/orders.
  3. ChainPay returns a payment_url.
  4. You redirect the customer to the hosted checkout page.
  5. The customer pays USDT or USDC.
  6. ChainPay sends a signed webhook to your callback_url.
  7. Your backend verifies the signature and marks the order as paid.

The important part is that your system should trust the webhook only after verifying the signature. Do not mark an order paid just because a random HTTP request says it is paid.

A minimal create-order request

A create-order request contains four required fields:

  • merchant_order_no: your own unique order ID
  • chain: TRON, BSC or POLYGON
  • token: USDT or USDC
  • amount: the payment amount as a string, for example "100.00"

In a real integration, you should also send:

  • callback_url: where ChainPay should send status updates
  • success_url: where the hosted checkout should send the buyer after payment
  • cancel_url: where the buyer should go if they cancel
  • Idempotency-Key: usually the same value as merchant_order_no

That last field matters. If your backend retries the request, the idempotency key prevents duplicate payment orders.

Webhook handling

When the customer pays, ChainPay sends a webhook with fields such as:

  • event: order.paid
  • order_no: the ChainPay system order number
  • merchant_order_no: your original order ID
  • chain
  • token
  • amount
  • status
  • tx_hash
  • paid_at

Your webhook handler should do four things:

  1. Read the raw request body.
  2. Verify the X-ChainPay-Signature header using your webhook secret.
  3. Check that the amount and merchant_order_no match your internal order.
  4. Mark the order paid only when status is paid.

This is the difference between a demo integration and a production-ready one. Signature verification is not optional.

Why stablecoins instead of any crypto?

Many crypto payment products advertise support for dozens of coins. That sounds good, but most merchants do not actually want to manage dozens of assets.

For practical commerce, stablecoins are usually enough.

USDT and USDC avoid the volatility problem at checkout. A buyer pays 100 USDT; the merchant expects roughly 100 dollars of value. There is no need to explain why a DOGE, SHIB or BTC amount changed during checkout.

This is why ChainPay is intentionally focused on USDT and USDC instead of trying to support every token.

WooCommerce path

For WooCommerce stores, the fastest path is the plugin flow:

  1. Install the ChainPay for WooCommerce plugin.
  2. Create a test API key in ChainPay.
  3. Paste the API key, API secret and webhook secret into WooCommerce settings.
  4. Run the end-to-end sandbox test.
  5. Switch to a live key when the test order and webhook work.

The sandbox step is important. It lets you test order creation, simulated payment and webhook delivery before accepting real funds.

Common mistakes

Wrong chain

A customer might send BEP20 USDT to a TRON address, or vice versa. Your checkout page should make the selected chain obvious.

Wrong amount

Do not fulfill an order until the exact expected amount is confirmed. If the buyer underpays, keep the order pending and ask them to complete the payment.

Trusting webhooks without verification

Always verify the webhook signature against the raw body. Never parse JSON and re-stringify it before checking the signature, because the byte sequence may change.

No idempotency

Network retries happen. Your create-order endpoint should be safe to call more than once with the same merchant order number.

Who should try this?

Stablecoin checkout is a good fit if:

  • Your customers already use USDT or USDC
  • You sell globally and card acceptance is inconsistent
  • You want a backup rail beside Stripe or PayPal
  • You sell digital products where chargebacks are painful
  • You are a developer and want a simple API + webhook model

It is not a good fit if your customers have never touched crypto and you do not want to educate them.

Final thought

A good crypto checkout should feel boring. Create order, redirect, receive webhook, fulfill order. The blockchain part should be hidden behind a reliable payment flow.

That is the direction I am building ChainPay toward: stablecoins only, hosted checkout, WooCommerce support, API-first integration, Telegram Bot, and MCP / OpenAPI for AI-assisted workflows.

You can try the API and sandbox here:
https://chainpay.to/docs?utm_source=devto&utm_medium=article&utm_campaign=api-stablecoin-2026-07&utm_content=footer-cta

WooCommerce plugin guide:
https://chainpay.to/integrations/wordpress?utm_source=devto&utm_medium=article&utm_campaign=woocommerce-plugin-2026-07&utm_content=footer-cta

Top comments (1)

Collapse
 
chainpaytopoetic profile image
poetic

Update: ChainPay is now pre-launching on Product Hunt. If this checkout flow is useful for your store, SaaS app, Telegram business, or AI-agent workflow, I would really appreciate a follow and feedback here:

producthunt.com/products/chainpay?...

I am especially looking for feedback from WooCommerce store owners and developers who have had to support cross-border payment methods.