Choose an integration path
This page covers the Platform API. For the widget, see the
widget Gateway integration.
Why use Gateway
- Add a network, get its tokens. Coverage is by network, not token by token. Once a network is live for you, every token on it that meets the token safeguards becomes buyable, including tokens that launch later. There is no per-token integration work.
- No exchange listing. Gateway doesn’t wait for a centralised exchange to list a token.
- One checkout. Customers pick a token, pay, and receive it. They don’t deposit funds or buy a bridge asset first.
- In your UI. The purchase happens inside your app, with MoonPay’s payments, compliance, and settlement underneath.
- Itemized fees. The quote itemizes the fees for the purchase, including the swap fee when the quote itemizes it.
Enable Gateway
A Platform integration doesn’t include Gateway by default. Gateway is a separate capability from your integration method. MoonPay enables it for your account, so contact your MoonPay account team. Until Gateway is enabled, List assets still returns DeFi tokens, but quoting one returns a503. See
Capability enablement.
Integrate Gateway
Before you start, you need:- Gateway enabled for your account. See Enable Gateway.
- A customer in a supported region.
- A connected customer, not a guest. See Choose an onboarding path.
- A server that can call the Platform API with your secret API key.
1
Discover tokens (server)
Call List assets. Pass
source=defi to return only DeFi tokens. Each token has a caip19
identifier, its CAIP-19 asset ID.2
Request a quote (server or client)
Call Get a quote with the
token’s
destination.asset.caip19 and the amount in source.amount.
Quoting by destination amount isn’t supported for DeFi tokens. The quote
includes the estimated token amount, fees, slippageBps (see
Slippage), and the gateway-token disclosure in
paymentDisclosures. In the SDK, call
client.getQuote().
The sample uses the SDK on the client. To quote from your server, send the
same fields to the endpoint.3
Show the required disclosures (client)
Display the slippage and the
gateway-token disclosure before the customer
confirms, plus the swap fee (fees.defi) when the quote includes it. See the Gateway Going Live
requirements.4
Present a payment button (client)
Use an existing payment button: Apple
Pay, Google
Pay, or the buy
button. MoonPay completes the
purchase and the token arrives in the customer’s wallet. You don’t
build any on-chain infrastructure. The payment button needs a
session for your
customer.
The Gateway catalog changes as tokens and networks evolve. Use List assets as
the source of truth instead of hardcoding availability.
Test your integration
Test mode doesn’t support Gateway DeFi tokens. To test your checkout, use a testnet asset from Test mode. Contact your MoonPay account team about testing DeFi tokens before you go live.Networks and availability
Gateway supports tokens on:- Ethereum
- Solana
- Base
Slippage
Tokens come from on-chain liquidity, so the amount of token delivered can move slightly between quote and settlement as market conditions change. Slippage is the difference between the expected price and the final executed price. The quote returns the tolerance asslippageBps and promises a minimum amount
of the token based on it. The swap only executes if the final price stays within
that tolerance. Show slippageBps before the customer confirms.
See Fees and slippage for
the exact text to show.
Token safeguards
Gateway applies safeguards to filter out likely scam tokens. A token becomes buyable once it has enough liquidity and trading volume and isn’t flagged as a likely scam. A token missing from List assets is held back by these safeguards. Once it clears them, it appears automatically. List assets doesn’t check whether a token can be routed. If a quote for a listed token fails with a400, the token can’t be bought right now.
Payment methods and limits
- Payment methods: Gateway purchases work with Apple Pay, Google Pay, and card. Bank transfers don’t support DeFi tokens. See Payment methods.
- KYC and limits: Gateway adds no verification requirements or limits. Customers follow the limits of their verification tier, region, and payment method.
- Asset types: Gateway supports crypto tokens only.
Frequently asked questions
Does Gateway use an exchange?
Does Gateway use an exchange?
No. The token comes from on-chain DEX liquidity instead of a centralised
exchange.
What happens if the swap can't complete?
What happens if the swap can't complete?
The swap only executes if the final price stays within the slippage
tolerance, so the customer doesn’t receive less than the quoted minimum.
Contact your MoonPay account team about how failed purchases are handled.
Next steps
Going Live requirements
The disclosures and line items to show for Gateway purchases.
Pay with the buy button
Present a payment button and handle the purchase events.