Skip to content

Configuration

Prop Required Notes
publicKey yes your pk_ key
apiUrl yes https://hub.stablezact.com
isOpen / onClose yes you control visibility
config yes the payment itself, below
onSuccess yes fires on submission, not confirmation
onError recommended called with a message on failure
theme no light or dark
config={{
amount: 49.99,
currency: 'USDC', // USDC or USDT
customerEmail: 'customer@example.com',
callbackUrl: 'https://yourstore.com/webhooks/stablezact',
orderId: 'ORD-1234',
metadata: { basket: 'b-99', channel: 'web' },
}}

currency names the stablecoin the customer pays in, not a fiat currency, and amount is denominated in that token.

Use USDC or USDT. Those are the only two configured on any network. DAI and BUSD pass the initial validation but then fail, because no network carries them:

{ "error": "Currency DAI is not supported on the base network" }

Fiat codes are rejected:

{
"success": false,
"error": "Validation failed",
"message": "Unsupported currency: GBP"
}

If you price in fiat, convert before creating the payment. GET /currency/rates returns the rates used elsewhere in the system.

Your own reference for the purchase. Keep it at the top level, not inside metadata: a top-level orderId is also used to recognise a retry, so a repeated request creates one payment instead of two. An orderId tucked inside metadata is stored, but it does nothing for that. See Retrying safely.

Arbitrary JSON, returned on every read of the payment and included in webhooks. Use it for anything else you want to carry along. It is ignored when deciding whether a request is a retry, which is why the order reference belongs in orderId rather than here.

Where webhooks are delivered for this payment. Set it per payment rather than globally; see Webhooks.

Which chains a customer can pay on is determined by the settlement wallets configured on your merchant account, not by anything in config. A chain with no wallet is not offered, and creating a payment on one directly is rejected:

{
"error": "You haven't set up a wallet address for the Polygon network",
"message": "Please configure a Polygon-specific wallet in your merchant settings before accepting payments on this network.",
"network": "polygon"
}