Skip to main content

Introduction

Buy crypto with fiat and deliver it to a Swig wallet. This flow covers route selection and order creation; the customer completes the provider checkout. Query Ramp options first to populate supported country, currency, asset, and payment-method choices. Use Client setup and the provider configuration. Sandbox is a provider environment, not a Solana devnet setting; sell transfers use mainnet even in sandbox.

SDK examples

Required configuration

TypeScript and Python use the configured swig client. Rust binds the provider configuration to a separate client.

Quote a buy

Get current buy offers for the selected asset, amount, and location.
An empty list means no offer is available. Present the returned route and details for selection; the next example uses the customer-approved selectedRoute / selected_route. Quotes have no ID and are re-priced at order creation.

Create a buy order

Create checkout using the selected quote route and the same amount, asset, and location. Supply a previously saved request ID.
Give the returned launch URL only to the customer who owns the order. It is a private checkout session, not a loggable transaction identifier.

Flow

Input

Output

Use order status to follow settlement. Quotes are re-priced at order creation. Python uses snake_case; Rust returns native typed variants.

Errors