pk_...) and the SDK installed.
Accept a payment
RenderPay with the amount you want to receive. The customer picks a wallet and token, OMS quotes how much they need to send, and the widget handles the rest.
to.amount is the exact amount you receive, in human-readable units. to.token and to.chain fix what you are paid in; the customer cannot change them.
Confirm payment before fulfilling
onPaymentSuccess runs in the browser, so treat it as a signal, not proof. Send the intentId to your server and confirm the intent reached SUCCEEDED with GetIntentReceipt before you ship the order.
Choose how the customer pays
OmitpaymentMethod to let the customer choose. Set it to open a specific flow:
CRYPTO_TRANSFER suits in-store and QR checkouts where the customer pays from a phone wallet that is not connected to your site.
Charge a USD price
If you already take card payments through a processor account connected to OMS, you can price the order in US dollars and let customers pay that price in crypto. RenderTrailsWidget with stripe set to the price in cents and your order reference. The destination comes from the armed payment, so do not pass destination props.
137), Base (8453, the default), and Ethereum (1). The widget holds onSuccess until the processor confirms settlement. The browser declares amountCents, so verify the settled amount and order reference against your own order records before fulfilling. This flow must be enabled for your project; contact the team to turn it on.
onPaymentCreated fires once per processor payment, with its settlement details, when the quote creates it and before the customer pays. Re-quotes for the same orderRef reuse the payment. Use it to link the payment to your order. If your processor account uses test keys, set stripe.testMode to true; test payments settle on Base Sepolia (84532).
Brand the checkout
SetappMetadata so wallet connection prompts show your store, and use theme and customCss to match your site. To rename the confirm button or screen titles, pass labels. To require agreement to your terms before paying, pass consentCheckbox; the customer must tick it every session.
Without React
Load the widget from a CDN and render it into any element:0xtrails@1.2.3, so an SDK release cannot change your checkout unannounced.