executable: true can be used to execute a transaction.
Get a quote
Parameters
client.getQuote() takes a single input object. The shape matches the Get quotes API request body — see that page for the complete field reference.
This method does not require a separate auth token. The client uses stored credentials from an active connection.
Payment method types
paymentMethod.type accepts the payment methods available to the connected customer, including bank transfers. See the Get a quote API reference for the full list.
The fiat currencies each method supports come from
getPaymentMethods (capabilities.supportedCurrencies); sepa is EUR only.
For bank transfers, quote with paymentMethod.type set to "sepa" (EUR), then execute the quote with the same headless Buy frame you use for cards. See Bank transfer.
Bank transfers are a floating payment method: the quote is an estimate, and the exact amount is set when the customer’s funds settle. Bank-transfer quotes return exchangeRateType: "floating"; card and wallet methods return exchangeRateType: "fixed". When exchangeRateType is "floating", render the estimated crypto amount with a tilde (for example, ~0.2345 BTC) and tell the customer the final amount is set when the transfer settles. See Exchange rate type.
Quote for a SEPA bank transfer
Fee behavior
feeBehavior controls whether fees are taken out of source.amount or added on top of it. It only applies when you quote by source.amount.
"inclusive"(default): the customer pays exactlysource.amount, and fees are carved out of it. Less of the source amount is converted, so the customer receives less crypto. This is the existing behavior, so omittingfeeBehaviorkeeps quotes unchanged."exclusive": fees are added on top ofsource.amount, so the customer payssource.amountplus fees. The fullsource.amountis converted, so the customer receives more crypto than the inclusive quote for the same input.
destination.amount, MoonPay ignores feeBehavior and the quote is always fees-inclusive. The response always echoes the effective feeBehavior: the value you requested for source-amount quotes, or "inclusive" for destination-amount quotes.
Quote with fees added on top
Result
client.getQuote() returns a Result<{ data: Quote }, GetQuoteError>.
Result envelope
Result<{ data: Quote }, GetQuoteError>
Quote
A quote includes a signature you use to execute a transaction, plus fees and limits. See the API reference for the full shape.
Exchange rate type
exchangeRateType tells you whether the quoted amount is final or an estimate, and pairs with the exchangeRate field. Bank transfers (SEPA) are a floating payment method: the quote is an estimate, and the exact amount is confirmed when the customer’s funds settle. These quotes return exchangeRateType: "floating". Card and wallet methods lock the rate at quote time and return exchangeRateType: "fixed".
When exchangeRateType is "floating", render the estimated crypto amount with a tilde (for example, ~0.2345 BTC) and tell the customer the final amount is set when the transfer settles. When it is "fixed", the quoted amount is final.
Branch on exchangeRateType when you format the amount the customer receives, so floating quotes always render with a tilde:
Render the crypto amount
GetQuoteError
GetQuoteError is the standard MoonPay Platform API error shape, DevPlatformApiError.
TS Definition
TS Definition
types.ts