The idea
Your shop sells 500 gems for 4.99 USDC. Your players hold ETH on Base, XLM, or the USDC they won last tournament. Every one of them can tap Top up and pay with what they have, and your game only ever sees 4.99 USDC arrive. Nobody has to visit an exchange first.How it plays out
1
The player picks a bundle
Your server creates a funding intent for the bundle’s price and tags it with the player and
the bundle.
2
They pay in their own token
The embedded checkout opens inside your game. If they pay with
something other than USDC, a quote works out exactly how much
of their token covers 4.99 USDC.
3
The gems land
When the
funding.credited webhook arrives, your server adds the gems. The checkout’s
onSuccess is for the celebration animation, not for granting anything.The code
Level up
- Make it look like your game. Pass
appearanceto the checkout for your colour, logo, corners and font. See Branding. - First top-up bonus. You know every credited order, so doubling the first one is a check in your own database.
- Season passes. A pass is one more bundle: same flow, different metadata.
- Keep the money on Base. Ask for
asset_usdc_baseinstead and it settles to your address there. See A treasury on any chain.
Good to know
- Price bundles in a stable asset so 500 gems always cost the same. The quote does the conversion; you never handle exchange rates.
- An intent takes payment for 30 minutes by default and 24 hours at most. Create it when the player taps Top up, not when the shop opens.
- Grant on
funding.credited, keyed by your order id. A webhook can be delivered more than once, and your handler should shrug it off. - Which tokens players can pay with depends on the network and the environment; the sandbox lists
fewer than production. Read them from
useroutr.assets.list().