Payments: the checkout
Early access. In decane-connect-kit 2.34.0 and later. Checkouts are created on your server with decane-node 1.7.0+ (see the server docs); this page is the customer side.
A checkout is a payment request for an exact amount that settles to your project’s address. Your server creates it and gets back an id and a hosted url. On the client you either send the customer to that URL, or embed the same flow with <DecaneCheckout>. The customer picks the network they pay from, then a token (anything Dextopus routes on that network), and sends the exact amount shown before the countdown ends. They are never asked for a refund address: a payment that cannot settle is refunded to your address on their network.
Embed it
import { DecaneCheckout } from "decane-connect-kit";
<DecaneCheckout
sessionId={checkoutId} // from your server's createCheckout
onPaid={(view) => showReceipt(view)}
// optional: a connected EVM wallet gets a one-tap "Approve"
evm={{ provider, account }}
// optional: render a QR for the deposit address
renderQr={(address) => <MyQr value={address} />}
/>Headless
import { createCheckoutClient, formatCheckoutAmount, payCheckoutWithEvmWallet } from "decane-connect-kit";
const checkout = createCheckoutClient(checkoutId);
const view = await checkout.get(); // amount, status, expiry
const options = await checkout.payOptions(); // { chainId, chainName, asset, symbol, decimals, logoUrl, label }[]
const quoted = await checkout.quote({ payChainId: 8453, payAsset: USDC_BASE });
formatCheckoutAmount(quoted.amountIn, quoted.payAssetInfo); // "25.075 USDC"
// Pay it from a connected EVM wallet yourself (EVM only):
const hash = await payCheckoutWithEvmWallet(provider, {
from: account,
depositAddress: quoted.depositAddress!,
amountIn: quoted.amountIn!,
payAsset: quoted.payAsset!,
});
await checkout.submit(hash); // settles faster than polling
await checkout.status(); // "pending" → "paid"payCheckoutWithEvmWallet sends an ERC-20 transfer (or a value send for the native coin) to the deposit address. It moves real funds; try it with a small payment in your app first.