Skip to main content
The Ramp API exposes the MELD-backed fiat on-ramp and off-ramp used by Swig wallet integrations. Routes are split by direction; there is no generic ramp endpoint.

Auth

Use an API key:

Routes

Required fields

Every ramp request requires an environment. Options, quotes, and session creation also require the organization’s MELD configuration id: On options routes these values are query parameters. On quote and session creation routes they are body fields. Session reads and off-ramp authorization actions identify the session in the route path and require only environment from this table. Quote requests additionally require externalCustomerId, swigConfigAddress, and network.

Get options

GET /wallet/api/ramp/onramp/options GET /wallet/api/ramp/offramp/options Query parameters: Both directions return countries (each with countryCode, countryName, and subdivisions), fiatCurrencyCodes, and paymentMethodTypes. On-ramp adds cryptoCurrencyCodes; off-ramp adds cryptoCurrencies, each with currencyCode, currencyName, iconUrl, and contractAddress. Read options first so currency and payment-method codes come from the API rather than from a hardcoded list.

Quote

On-ramp quote

POST /wallet/api/ramp/onramp/quote

Off-ramp quote

POST /wallet/api/ramp/offramp/quote Off-ramp reverses the currency direction: the source is the crypto asset being sold and the destination is fiat. It settles on mainnet even in the MELD sandbox environment, so network must be NETWORK_MAINNET.
subdivision and paymentMethodType are optional. Take currency and payment method values from the matching options response. The response returns quotes, each with quoteId, serviceProvider, paymentMethodType, sourceAmount, sourceCurrencyCode, destinationAmount, destinationCurrencyCode, exchangeRate, and totalFee.

Create a session

POST /wallet/api/ramp/onramp/session POST /wallet/api/ramp/offramp/session
The response returns sessionId and launchUrl.
A launchUrl is a user-specific session URL. Return it only to the customer who owns the session, and keep it out of logs and analytics.

Read a session

GET /wallet/api/ramp/onramp/session/{session_id} GET /wallet/api/ramp/offramp/session/{session_id} Query parameters: On-ramp sessions return sessionId, status, createdAt, and updatedAt. Status values are:
Off-ramp sessions return the same base fields plus sourceAmount, sourceCurrencyCode, destinationAmount, destinationCurrencyCode, serviceProvider, and optional paymentMethodType, solanaSignature, and providerDestinationAmount. Off-ramp adds three states:

Off-ramp authorization

Off-ramp requires an on-chain transfer from the Swig to the provider before the session can settle.

Prepare

POST /wallet/api/ramp/offramp/session/{session_id}/prepare
The response returns authorizationId, a preparedTransaction, and a display object describing the transfer: sourceWalletAddress, destinationWalletAddress, sourceAmount, sourceCurrencyCode, destinationAmount, destinationCurrencyCode, serviceProvider, and optional paymentMethodType and providerDestinationAmount. Show display to the customer before signing.

Submit

POST /wallet/api/ramp/offramp/session/{session_id}/submit
The response returns solanaSignature.

SDK equivalent

The Developer SDKs wrap these routes as swig.ramp.onramp and swig.ramp.offramp, and accept sandbox / production as plain strings while encoding the MELD enum for you. See Add and Withdraw Funds.