swig.ramp.onramp— fiat in, crypto to the Swigswig.ramp.offramp— crypto out of the Swig, fiat to the user
Required configuration
Every ramp call requiresenvironment. Options, quotes, and session creation
also require the organization’s MELD configuration id:
The SDK encodes
environment as the MELD enum on the wire, so pass the plain
string.
Quote calls additionally require:
subdivision and paymentMethodType / payment_method_type are optional.
On-ramp
Read the available options first, so currency and payment-method codes come from the API rather than from a hardcoded list.TypeScript
quoteId, serviceProvider, paymentMethodType,
sourceAmount, sourceCurrencyCode, destinationAmount,
destinationCurrencyCode, exchangeRate, and totalFee (snake_case in
Python).
On-ramp session status is one of:
Off-ramp
Off-ramp adds an on-chain step. The customer’s wallet must authorize the transfer to the provider before the session can settle, so the flow is: quote → session → prepare authorization → application-owned signer → submit authorization. It settles on mainnet even whenenvironment is sandbox, so
use mainnet for the quote network.
TypeScript
authorization.display is the human-readable transfer summary to show before
signing: sourceWalletAddress, destinationWalletAddress, sourceAmount,
sourceCurrencyCode, destinationAmount, destinationCurrencyCode,
serviceProvider, and optional paymentMethodType and
providerDestinationAmount.
The prepared authorization follows the same boundary as every other prepared
transaction. Inspect its signature metadata, obtain the required signature
from application-owned signing code, and return only the signed serialized
transaction to the server. The optional
browser signing helpers can assemble that
result. See Server Runtime for the trust
boundary.
Off-ramp session status adds three states to the on-ramp set:
solanaSignature /
solana_signature for the on-chain transfer.
Routes behind the clients
Application delivery
TreatlaunchUrl / launch_url, quotes, and session state as user-scoped
data. If another application runtime needs them, return only the authorized
fields through your own server API. Do not import the Developer SDK’s API
client or expose the Swig API key outside the server. The optional /browser
signing helpers remain limited to local transaction assembly.
