StableOps

Playground

Walk through "create order → wallet payment → confirm → finalize" in your browser.

The widget below calls the StableOps API directly from your browser with the sandbox API key you paste, via @stableops/api-sdk. It creates a sandbox payment order, then uses @stableops/wallet-sdk to open the browser wallet and send a real Base Sepolia USDC transfer. Run the four steps in order to watch one order move from created to finalized:

  1. Create payment order: POST /v1/payment-orders with an Idempotency-Key. The returned payment_instructions list contains the candidate deposit addresses allocated to this order.
  2. Pay on-chain with wallet: the frontend calls sendWalletPayment, and the wallet sends an ERC-20 transfer to the order address.
  3. Wait for confirmed: no manual state push; the UI polls until scanner + confirmations watcher move the order to confirmed.
  4. Wait for finalized: polling continues until the finality threshold is reached; only then do ledger entries and outgoing webhooks become terminal.

Paste your sandbox API key into the widget to begin. It stays in your browser. Use testnet assets only; do not send mainnet funds in the playground. Each step shows the latest order snapshot and activity log so you can compare it with real request/response shapes.

Use a sandbox key. It stays in your browser and is sent directly to the API. In production, call the API from your backend, not the browser.

When on, a deterministic burner sandbox address is imported for this order before creating it — useful when your org has no addresses yet. Turn it off if you want to use only the addresses you manage yourself.

Real wallet transaction on the selected testnet(s) — do not use mainnet funds. Get test funds: Base Sepolia · USDC (testnet)

  1. idle
    1. Create payment order
  2. idle
    2. Pay with wallet on-chain
  3. idle
    3. Wait detected
  4. idle
    4. Wait confirmed
  5. idle
    5. Wait finalized
Activity log
(empty)
The Playground source code is hosted on GitHub: github.com/StableOps/stableops-playground. Feel free to download, try it out, and share feedback.

What happens in production

Step 1 is identical to real usage. Your service calls POST /v1/payment-orders via SDK or REST. Step 2 is a real on-chain deposit: the browser wallet transfers stablecoins to the order address; the scanner pulls logs bucketed by (organizationId, environment, chain, address), normalizes them into normalized_events, and advances any matching order to detected. Steps 3 and 4 are driven by the confirmations watcher, which periodically compares head - block_number against each chain's CONFIRMED_AFTER / FINALIZED_AFTER thresholds and also verifies receipt.blockHash against the originally recorded block to detect reorgs.

The playground calls the StableOps API directly from your browser using the sandbox API key you provide (@stableops/api-sdk); payment, detection, confirmation, and finality all use the real chain path. The playground also runs on testnets only, so Solana/TRON wallet payments connect directly to public RPC nodes (Solana Devnet, TRON Nile). These are free but may occasionally rate-limit; if a payment fails to build or broadcast, wait a moment and retry. In production, Checkout forwards mainnet RPC through StableOps' commercial-node proxy, so this issue does not occur.

Integration checklist

  • Use the Idempotency-Key header. Submitting the same merchant_order_id twice always returns the same order.
  • This playground runs entirely client-side with a sandbox key for demonstration. In production, keep your API key on your backend and never expose a live key in the browser; the frontend should only use @stableops/wallet-sdk for the wallet transfer.
  • Subscribe to payment.detected / payment.confirmed / payment.finalized / payment.reverted webhooks; every delivery is single-flight via an IN_PROGRESS claim, so duplicates won't double-fire your handler.
  • Verify webhook signatures with @stableops/api-sdk/webhooks to defeat replay.

Continue with the Quickstart for runnable code samples.

How is this guide?

Last updated

On this page