Fiat to Stablecoin (On-Ramp)
Fiat to Stablecoin (On-Ramp) transfers convert fiat currencies into stablecoins in the customer's own wallet. These transfers require the customer to have at least one wallet before initiating the transfer.
Prepare the transfer request
Make sure you have:
- Customer ID: The unique identifier for the customer
- Customer wallet: The customer must have at least one wallet (create via
/customers/{id}/wallets
)
For this guide, we'll use the customer ID cus_cK69MttD5nAUAbud1B
.
Make the API request
Call the POST /v1/transfers
endpoint using the simplified from
/to
structure.
Choose rail
based on your preferred payment method. See our Rails guide for all supported fiat rails.
The amount
denotes the fiat amount to exchange from. In this example, your customer will pay 50 USD
to get approximately 48 USDC
(based on exchange rate + fees).
Destination: On-ramp transfers always go to the customer's own wallet (same identifier in to.identifier
).
Handle the response
The API will return a JSON response containing the transfer details:
Redirect the customer
Once you receive the response, redirect your customer to the url
field. This secure payment page will guide them through completing the transfer.