Skip to main content
Shoppers pay for a tote bag with USDC on Ethereum, LINK on Base or XLM.Shoppers pay for a tote bag with USDC on Ethereum, LINK on Base or XLM.
Embedded checkout Branding Webhooks

The idea

Someone wants your tote bag and has LINK on Base. Card forms, exchange accounts and “send to this address on that network, carefully” are all ways to lose the sale. One Pay with crypto button that opens in your page, speaks their token and tells you when the order is paid keeps it.

How it plays out

1

Checkout starts on your server

Your server totals the cart, creates a funding intent for that amount with the order id as its reference, and returns only the intent’s funding token.
2

The checkout opens in your store

The embedded checkout appears as a modal, wearing your logo and colour. Your API key never reaches the browser.
3

You ship on the webhook

funding.credited marks the order paid. It arrives even if the shopper closes the tab the moment they hit send.

The code

Make it your own

  • Match the shop. appearance sets the colour, logo, corners and font for this checkout only. See Branding.
  • Prefer a page to a modal? Redirect to hosted_funding_url instead. See Hosted checkout.
  • Another framework? @useroutr/checkout-core gives you the same states to render your way. See Custom checkout.

Good to know

  • Price the cart in a stable asset. Shoppers see their own token’s amount in the checkout; you always receive the cart total.
  • Put the cart’s version in the idempotency key. Reusing a key with a different total is refused with IDEMPOTENCY_KEY_REUSED, so a changed cart needs a new key.
  • Use https://sandbox-api.useroutr.com/v1/public as baseUrl while you test with a ur_test_ key.