Make Your First Call

From credentials to a paid test order in ten minutes

Four calls. Each one builds on the last.

1. Check your credentials

curl -X GET 'https://sandbox-api.transfi.com/v3/mids' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'mid: YOUR_MID'

Returns your MIDs → you're authenticated. → List MIDs

2. Create a customer

curl -X POST 'https://sandbox-api.transfi.com/v3/users/individual' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'mid: YOUR_MID' \
  -H 'Content-Type: application/json' \
  -d '{
    "firstName": "Asha",
    "lastName": "Kamau",
    "email": "[email protected]",
    "phone": "0712345678",
    "phoneCode": "+254",
    "country": "KE",
    "date": "15-06-1990"
  }'

Save the userId. → Create Individual User

3. Create a payment

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": "payin",
    "purposeCode": "company_expenses",
    "partnerId": "first-order-001",
    "source": { "currency": "KES", "amount": "2500", "paymentType": "local_wallet", "paymentCode": "MPESA" },
    "destination": { "currency": "USDT" }
  }'

You get an orderId and a payUrl. → Create Order

4. Make it succeed

curl -X POST 'https://sandbox-api.transfi.com/v3/simulation/order' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'mid: YOUR_MID' \
  -H 'Content-Type: application/json' \
  -d '{ "orderId": "OR-...", "status": "fund_settled" }'

Check it: GET /v3/orders/OR-... now shows fund_settled. That's a complete collection.

📘

Next: set up a webhook so you're told when this happens, then pick your flow guide.


What’s Next

Did this page help you?