Stablecoin Payment API: Integrate USDC and USDT in One Afternoon
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:
| Kind | What it does | Who uses it |
|---|---|---|
| Issuer API | Mint and redeem a stablecoin against dollars | Exchanges, fintechs moving large balances |
| Wallet or infrastructure API | Create wallets, sign and send transactions | Apps that hold user funds |
| Payment API | Price an order, collect payment, confirm it, notify your server | Merchants 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 URL | https://api.orcarail.com/api/v1 |
| Auth | Basic Auth with API key and secret (ak_live_ / ak_test_) |
| Core object | Payment intent |
| Webhooks | HMAC SHA-256, with a timestamped signature for replay protection |
| SDKs | Node.js, PHP, Laravel Cashier |
| Networks | More than 70 mainnets (EVM, Solana, Bitcoin); Tron not yet supported |
| Fee | 0.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
- Subscriptions: OrcaRail subscriptions can send a payment link per cycle or charge renewals on-chain from an allowance. See recurring crypto payments.
- No-code: the WooCommerce plugin uses the same API.
- AI coding agents: the MCP server lets Claude Code, Cursor or Codex create test checkouts for you.
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.
