Local Payment Method
Bank transfer, mobile money, card or local wallet
What this doesYour customer pays with a method they already use — M-Pesa, GCash, PIX, SEPA, cards, and more. You get the money on your TransFi balance in the currency you choose.
Steps
1. Create the 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 from the response. → Create Individual User
2. Find the payment methods for their country
curl -X GET 'https://sandbox-api.transfi.com/v3/config/payment-methods?direction=deposit&country=KE' \
-H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
-H 'mid: YOUR_MID'Use the paymentType and paymentCode from the response in the next step. → List Payment Methods
3. Create the order
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": "order-1001",
"successRedirectUrl": "https://yourapp.com/success",
"failureRedirectUrl": "https://yourapp.com/failure",
"source": {
"currency": "KES",
"amount": "2500",
"paymentType": "local_wallet",
"paymentCode": "MPESA"
},
"destination": {
"currency": "USDT"
}
}'{
"status": "success",
"data": {
"orderId": "OR-2509291454262384294",
"payUrl": "https://sandbox-pay-widget.transfi.com/pay?paytoken=..."
}
}4. Send the customer to payUrl
payUrlThey pay there. When they come back, the payment is not yet confirmed — wait for the status.
5. Wait for the final status
| Status | Meaning | What to do |
|---|---|---|
initiated | Waiting for the customer to pay | Show "pending" |
fund_settled | Done. Money is on your balance | Deliver what they paid for |
fund_failed | Payment didn't arrive, or was declined | Create a new order with a new partnerId |
manual_review | Compliance is reviewing the payment (often a sender-name mismatch) | Show "under review". Don't deliver yet |
Use webhooks to be told when the status changes, or check with Get Order.
Test it
Create the order in sandbox, then set its status with Simulate Order Status.
Related
Updated 23 days ago
Did this page help you?