Test your integration
Validate payments safely with simulate and testnet modes
Hosted Checkout supports a fund-free simulate mode and a testnet mode that uses test tokens. Start with simulate to test the complete redirect and confirmation flow.
Hosted Checkout
Gateway orders accept three modes: live (the default), testnet, and simulate.
| Mode | Use case | How to complete it |
|---|---|---|
live | Production | Send mainnet USDC or USDT |
testnet | Onchain testing | Send Sepolia or Amoy test tokens (testnet token contracts are USDC only; selecting usdt still returns the USDC testnet contract) |
simulate | Fund-free smoke test | Use Hosted Checkout or the simulation endpoint |
Orders created against staging (Fireblocks sandbox) with mode omitted or mode: "live" are created as testnet; check the response's mode.
SDK 0.5.0 can run the flow from order creation through simulated deposit.
const order = await gatewayClient.gateway.createOrder({
orderId: "test-1",
amount: 1000,
country: "JP",
mode: "simulate",
returnUrl: "https://shop.example/thanks",
});
if (order.status !== "ok") {
throw new Error(order.reason);
}
const checkoutToken = new URL(order.checkoutUrl)
.pathname.split("/").filter(Boolean).at(-1)!;
await gatewayClient.gateway.selectAsset(checkoutToken, {
token: "usdc",
network: "ethereum",
});
await gatewayClient.gateway.acceptTos(checkoutToken);
const completed =
await gatewayClient.gateway.simulateDeposit(checkoutToken);For a normal redirect integration, Hosted Checkout handles asset selection and ToS acceptance. The direct calls above are intended for automated smoke tests. You can also complete the order with the “Simulate payment” button.
This endpoint only accepts simulate orders. It rejects live and testnet orders.
PaymentIntent
PaymentIntents default to simulate. Use a test secret key (sk_test_…) to create, confirm, and simulate a deposit. An intent created with sk_live_… has livemode: true and simulateDeposit rejects it with payment_intent_unexpected_state (400).
const paymentIntent = await paymentIntentClient.paymentIntents.create({
paymentLinkToken: "<share_token>",
mode: "simulate",
idempotencyKey: "simulate-order-42",
});
await paymentIntentClient.paymentIntents.confirm(paymentIntent.id, {
stablecoin: "usdc",
network: "ethereum",
});
const succeeded =
await paymentIntentClient.paymentIntents.simulateDeposit(paymentIntent.id);simulateDeposit(id, { amount }) accepts a positive amount, but the current implementation advances to succeeded without distinguishing underpayment or overpayment. Use Gateway orders to test amount matching: passing a short amount to the Gateway simulateDeposit(token, { amount }) yields confirmed: false / underpaid: true in checkoutStatus.
PaymentIntent testnet and live limitations
- Testnet supports USDC on Ethereum Sepolia and Polygon Amoy
confirmreturns faucet details and deposit instructions- The current production release does not automatically connect onchain deposits to PaymentIntents
- There is no
submit_txendpoint
Use Gateway testnet when your end-to-end test must include an onchain transfer.