On-Ramp & Off-Ramp

Let your users buy crypto with local money, or sell crypto for local money.

✅

What this does

Your user buys crypto with their local currency (on-ramp), or sells crypto and gets local currency in their bank account (off-ramp). The money is theirs on both sides — it never touches your balance.

Ways to offer it

You buildTransFi does
WidgetEmbed a ready-made screenEverything
APIYour own screens on the calls belowPayment, conversion, delivery
Fiat onlyThe crypto side yourselfThe local-currency side only

The steps below are the API route.

Before you start

On-ramp — user buys crypto

curl -X POST 'https://sandbox-api.transfi.com/v3/orders' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'mid: YOUR_MID' \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "UX-250930062608488",
    "orderType": "onramp",
    "purposeCode": "personal",
    "partnerId": "onramp-3001",
    "source": {
      "currency": "BRL",
      "amount": "500",
      "paymentType": "bank_transfer",
      "paymentCode": "PIX"
    },
    "destination": {
      "currency": "USDT",
      "network": "polygon",
      "walletAddress": "0xUSER_WALLET"
    }
  }'

You get a payUrl. The user pays there. The crypto is sent to their wallet.

StatusMeaningWhat to do
initiatedWaiting for the user to payShow payUrl
fund_processingPayment made, being confirmedShow "processing"
fund_depositedLocal money receivedShow "sending crypto"
asset_processingCrypto being sentShow "sending crypto"
asset_settledDone. Crypto is in the user's walletShow complete
fund_deposit_failedPayment didn't arriveNew order, new partnerId
asset_settle_failedCrypto couldn't be sentContact support with the orderId

Off-ramp — user sells crypto

curl -X POST 'https://sandbox-api.transfi.com/v3/orders' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'mid: YOUR_MID' \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "UX-250930062608488",
    "orderType": "offramp",
    "purposeCode": "personal",
    "partnerId": "offramp-3002",
    "source": {
      "currency": "USDT",
      "amount": "200",
      "network": "polygon"
    },
    "destination": {
      "currency": "BRL",
      "paymentType": "bank_transfer",
      "paymentCode": "PIX"
    }
  }'

You get a deposit walletAddress and network. The user sends crypto there. Local currency is paid to their account.

StatusMeaningWhat to do
initiatedWaiting for the cryptoShow the address and network
asset_processingCrypto received, convertingShow "processing"
fund_settledDone. Local money paid to the userShow complete
asset_settle_failedCrypto not received in time, or couldn't be convertedNew order
🛑

Network and expiry. The user must send on the network shown. If the address expires before they send, create a new order — never reuse an address.

An off-ramp order can be cancelled while it is still waiting for the crypto. → Cancel Order

APIs used

Create Individual User · Standard KYC · Get Exchange Rates · Create Order · Get Order · Simulate Order Status

Related

Collections · Swaps — convert money you hold


Did this page help you?