Skip to main content

Stablecoin Payment API: Integrate USDC and USDT in One Afternoon

· 6 min read
OrcaRail
Crypto payment rails for web2 apps

A stablecoin payment API lets your backend charge customers in USDC or USDT without running blockchain nodes or matching transfers to orders by hand. You create a payment, send the customer to a pay page, and get a webhook when the money arrives.

This guide explains what such an API does, what to check before you pick one, and how to integrate the OrcaRail API end to end. If you already have a backend with an order table, the whole flow fits in an afternoon.

What is a stablecoin API​

"Stablecoin API" covers three different kinds of product:

KindWhat it doesWho uses it
Issuer APIMint and redeem a stablecoin against dollarsExchanges, fintechs moving large balances
Wallet or infrastructure APICreate wallets, sign and send transactionsApps that hold user funds
Payment APIPrice an order, collect payment, confirm it, notify your serverMerchants and SaaS that want to get paid

If you sell something and want to be paid in USDC or USDT, you need the third kind: a stablecoin payment API, also called a crypto payment API. The rest of this post is about that.

What a stablecoin payment API should handle​

  • Pricing: turn a USD order total into an exact token amount, with an expiry.
  • Network choice: USDC and USDT live on many chains. The API should let you choose what you receive and let customers pay from what they hold.
  • Confirmation: watch the chain and decide when a payment is final.
  • Webhooks: signed, retried and replay-protected, so you can trust them.
  • Settlement: send funds to wallets you control, or tell you clearly who holds them.
  • Testing: a testnet mode with the same API, so CI never touches real money.
  • Recurring billing, if you sell subscriptions.

OrcaRail API at a glance​

Base URLhttps://api.orcarail.com/api/v1
AuthBasic Auth with API key and secret (ak_live_ / ak_test_)
Core objectPayment intent
WebhooksHMAC SHA-256, with a timestamped signature for replay protection
SDKsNode.js, PHP, Laravel Cashier
NetworksMore than 70 mainnets (EVM, Solana, Bitcoin); Tron not yet supported
Fee0.5% per completed transaction, first 1,000 free (pricing)

When we checked the live API on 29 October 2026, USDC was listed on 43 networks and USDT on 30. The current list is on Networks and tokens.

How to integrate USDC and USDT payments with OrcaRail​

1. Get sandbox keys​

Sign up at app.orcarail.com and open a sandbox organization. Create an API key; the key starts with ak_test_ and the secret is shown once. Sandboxes run on testnets only.

2. Pick the token and network you receive​

curl -s "https://api.orcarail.com/api/v1/payments/networks?testnet=true"
curl -s "https://api.orcarail.com/api/v1/payments/networks/<networkId>/tokens"

Save the networkId and tokenId, for example USDC on Base Sepolia while testing. Customers can still pay with another token or network on the pay page; the quote adds a bridge fee that they pay, and you receive the full amount.

3. Create and confirm a payment intent​

With the Node SDK:

import OrcaRail from '@orcarail/node'

const orcarail = new OrcaRail(process.env.ORCARAIL_API_KEY!, process.env.ORCARAIL_API_SECRET!)

const intent = await orcarail.paymentIntents.create({
amount: '49.00',
currency: 'usd',
payment_method_types: ['crypto'],
tokenId: process.env.RECEIVE_TOKEN_ID!,
networkId: process.env.RECEIVE_NETWORK_ID!,
return_url: 'https://yourapp.com/success',
cancel_url: 'https://yourapp.com/cancel',
metadata: { order_id: '12345' },
})

const confirmed = await orcarail.paymentIntents.confirm(intent.id, {
client_secret: intent.client_secret!,
})
// Redirect the customer to the hosted pay URL from `confirmed`.

The PHP SDK (composer require orcarail/orcarail-php) has the same calls: $orcarail->paymentIntents->create([...]). Both wrap the REST endpoints.

4. Verify the webhook and fulfill the order​

app.post('/webhooks/orcarail', express.raw({ type: 'application/json' }), (req, res) => {
const event = orcarail.webhooks.constructEventFromHeaders(req.body, req.headers, process.env.ORCARAIL_API_SECRET!)
if (event.type === 'payment_intent.completed') {
// In production, also require event.livemode === true.
// Mark order event.data.object.metadata.order_id as paid (idempotently).
}
res.sendStatus(200)
})

constructEventFromHeaders checks the HMAC signature and rejects deliveries older than 5 minutes. Sandbox events have livemode: false; never ship real goods for them. See Webhook signatures and events.

5. Test, then go live​

In the sandbox, click Simulate payment or call orcarail.paymentIntents.simulate(id) to complete a payment without a wallet (Simulate payments). You can also pay with test tokens from testnet faucets. When the flow works, switch to a live organization and an ak_live_ key.

Beyond one-time payments​

FAQ​

Is there a free stablecoin payment API?​

The OrcaRail hosted API charges 0.5% per completed transaction after the first 1,000 free transactions. The self-hosted version has no OrcaRail fee. Network fees still apply.

Can I accept USDC and USDT with one integration?​

Yes. You pick one token and network to receive. The pay page lets customers pay with USDC, USDT or other tokens on supported networks.

Which networks does the API support?​

More than 70 mainnets, including Ethereum, Base, Polygon, Arbitrum, Optimism, Solana and Bitcoin. Tron is not supported yet. See Networks and tokens.

How do I test without real money?​

Use a sandbox organization with an ak_test_ key. It runs on testnets and can simulate payments.

How does this compare to Stripe or Coinbase stablecoin APIs?​

Stripe settles stablecoin payments to fiat in your Stripe balance. Coinbase Business keeps funds in a Coinbase account. OrcaRail sends funds to wallets you control. See Coinbase Commerce alternatives and the crypto payment gateways list.


Get sandbox keys · API reference · Pricing