Creating an Offramp Transfer
Creating offramp order (API link):
- Minimal payload:
curl --location 'https://sandbox-api.transfi.com/v3/orders' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic ==' \ --header 'mid: SAH1N3_NA_NA' \ --data '{ "userId": "UX-2123123123123", "orderType": "offramp", "purposeCode": "company_expenses", "source": { "currency": "USDTPOLYGON" }, "destination": { "currency": "EUR", "paymentType": "bank_transfer", "paymentCode": "sepa_bank", "amount: "200" "additionalPaymentDetails": { "iban": "BE68539007547034", "bic": "DEUTBE21XXX", "street": "abcd", "city": "abcd", "postalCode": "123123" } } }'{ "status": "success", "data": { "flow": "OFFRAMP", "orderId": "OR-2510010702057129005", "cryptoAmount": 119.282956, "fiatAmount": 99.35, "walletAddress": "0xbd09d65597b27626b23cd2e2d7664943df007293" } }
- Full payload
curl --location 'https://sandbox-api.transfi.com/v3/orders' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic ==' \ --header 'mid: SAH1N3_NA_NA' \ --data '{ "userId": "UX-2123123123123", "orderType": "offramp", "purposeCode": "company_expenses", "purposeCodeReason": "Personal payment", "successRedirectUrl": "https://yourapp.com/success", "failureRedirectUrl": "https://yourapp.com/failure", "sourceUrl": "https://yourapp.com/source" "partnerId": "1234567890", "customerMetaData": { "customerId": "1234567890", "customerName": "John Doe", "customerEmail": "[email protected]" }, "deviceDetails": { "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)", "ipInfo": { "ip": "123.123.123.123", "countryCode3": "IND" } }, "source": { "currency": "USDTPOLYGON", "walletAddress": "0x123123123890ABCDEF1234567890ABCDEF" }, "destination": { "currency": "EUR", "paymentType": "bank_transfer", "paymentCode": "sepa_bank", "amount: "200" "additionalPaymentDetails": { "iban": "BE68539007547034", "bic": "DEUTBE21XXX", "street": "abcd", "city": "abcd", "postalCode": "123123" } } }'{ "status": "success", "data": { "flow": "OFFRAMP", "orderId": "OR-2510010702057129005", "cryptoAmount": 119.282956, "fiatAmount": 99.35, "walletAddress": "0xbd09d65597b27626b23cd2e2d7664943df007293" } }
In response you will receive walletAddress with amount to be transferred. Once the user transfers the crypto to that wallet, we will initiate the fiat transfer.
Note: Amount to be transferred can be passed in either source or destination.
Examples:
{
"source": {
"currency": "USDC",
"amount": "100"
},
"destination": {
"currency": "EUR"
}
}{
"source": {
"currency": "USDC"
},
"destination": {
"currency": "EUR",
"amount": "100"
}
}- Amount is sent in source object: In this case, user needs to do payin of 100 USDC. Amount of EUR that will be sent to user will be calculated (~94.5 EUR). (This is usually preferred)
- Amount is sent in destination object: In this case, amount of USDC that user needs to send will be calculated (~105 USDC) and 100 EUR will be sent to user.
Updated 5 days ago