Swipelux
Transfers

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.

curl https://wallet.swipelux.com/v1/transfers \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_API_KEY' \
  --data '{
    "from": {
      "identifier": "cus_cK69MttD5nAUAbud1B",
      "amount": "50",
      "rail": "card",
      "currency": "USD"
    },
    "to": {
      "identifier": "cus_cK69MttD5nAUAbud1B",
      "currency": "USDC"
    }
  }'

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:

Success Response
{
  "id": "tr_nEZHWur1pBSAKY7NlV",
  "from": {
    "identifier": "cus_cK69MttD5nAUAbud1B",
    "amount": "50",
    "rail": "card",
    "currency": "USD"
  },
  "to": {
    "identifier": "cus_cK69MttD5nAUAbud1B",
    "currency": "USDC"
  },
  "state": "awaiting_funds",
  "url": "https://track.swipelux.com?specificSettings={...}",
  "createdAt": "2025-04-29T10:54:08.724Z",
  "updatedAt": "2025-04-29T10:54:08.724Z"
}

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.

On this page