Creating Prefund Order
Fiat Prefunding š°(API Link)
To prefund your account with a fiat currency, set the orderType to 'fiat_prefund'. The API response will then provide you with the necessary payment details (like bank account information) for you to complete the transfer.
- 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 '{ "orderType": "fiat_prefund", "purposeCode": "company_expenses", "source": { "currency": "AED", "paymentCode": "bank_transfer", "paymentType": "bank_transfer", "amount": "10000", "additionalPaymentDetails": { "street": "abcd", "city": "abcd", "postalCode": "123123", } }, "destination": { "currency": "USD" } }'{ "status": "success", "data": { "flow": "FIAT_PREFUND", "orderId": "PF-260824093651609422834241208", "feeData": { "depositAmount": 10000, "withdrawAmount": 2586.79, "exchangeRate": 0.27229407760381213, "totalFee": 500 }, "amount": 10000, "payUrl": "https://pay-widget.transfi.com//pay?paytoken=0fae4d37-92c2-4d58-a66f-c052b1803674", "paymentsData": { "accountDetails": { "name": "NEOMONEY INC", "iban": "AE350960000691060002709", "reference": "TXU1AZUUM4EQ7B1OR", "bankName": "Zand Bank PJSC", "beneficiaryType": "Business", "country": "AE" }, "type": "aed_bank_transfer" }, "quoteHistory": { "refreshCount": 0, "orderCreationQuote": { "isRefreshed": false, "usedQuotes": { "sourceCurrency": "AED", "sourceAmount": 10000, "sourceAmountInUsd": 2722.94, "sourceCurrencyType": "fiat", "destinationCurrency": "USD", "destinationAmount": 2586.7937372362153, "destinationAmountInUsd": 2586.79, "destinationCurrencyType": "fiat", "conversionRate": 0.27229407760381213, "minLimit": 20, "maxLimit": 367250, "direction": "forward", "processingFee": 500, "processingFeeRate": 0.05, "customerFee": 0, "customerFeeRate": 0, "rrFeeRate": 0, "discount": 0, "discountRate": 0, "additionalFee": 0, "fixedFee": { "totalFixedFees": 0, "totalFixedTfFees": 0, "totalFixedCxFees": 0, "fixedFeesCurrency": "AED", "fixedFeeDetails": { "baseFeeFixedRate": 0, "tfFeeFixedRate": 0, "cxFeeFixedRate": 0, "currency": "" } }, "totalFee": 500, "feeMode": "percentage", "rateType": "live", "quoteId": "QUOTE-53f58a7e-280627548df17" } } } }, "traceId": "4a41ee22-fee2-4d67-abda-edb3a5eacc04" }
- 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 '{ "orderType": "fiat_prefund", "purposeCode": "company_expenses", "purposeCodeReason": "Monthly balance top-up", "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": "AED", "paymentCode": "bank_transfer", "paymentType": "bank_transfer", "amount": "10000", "additionalPaymentDetails": { "street": "abcd", "city": "abcd", "postalCode": "123123", } }, "destination": { "currency": "USD" } }'{ "status": "success", "data": { "flow": "FIAT_PREFUND", "orderId": "PF-260824093651609422834241208", "feeData": { "depositAmount": 10000, "withdrawAmount": 2586.79, "exchangeRate": 0.27229407760381213, "totalFee": 500 }, "amount": 10000, "payUrl": "https://pay-widget.transfi.com//pay?paytoken=0fae4d37-92c2-4d58-a66f-c052b1803674", "paymentsData": { "accountDetails": { "name": "NEOMONEY INC", "iban": "AE350960000691060002709", "reference": "TXU1AZUUM4EQ7B1OR", "bankName": "Zand Bank PJSC", "beneficiaryType": "Business", "country": "AE" }, "type": "aed_bank_transfer" }, "quoteHistory": { "refreshCount": 0, "orderCreationQuote": { "isRefreshed": false, "usedQuotes": { "sourceCurrency": "AED", "sourceAmount": 10000, "sourceAmountInUsd": 2722.94, "sourceCurrencyType": "fiat", "destinationCurrency": "USD", "destinationAmount": 2586.7937372362153, "destinationAmountInUsd": 2586.79, "destinationCurrencyType": "fiat", "conversionRate": 0.27229407760381213, "minLimit": 20, "maxLimit": 367250, "direction": "forward", "processingFee": 500, "processingFeeRate": 0.05, "customerFee": 0, "customerFeeRate": 0, "rrFeeRate": 0, "discount": 0, "discountRate": 0, "additionalFee": 0, "fixedFee": { "totalFixedFees": 0, "totalFixedTfFees": 0, "totalFixedCxFees": 0, "fixedFeesCurrency": "AED", "fixedFeeDetails": { "baseFeeFixedRate": 0, "tfFeeFixedRate": 0, "cxFeeFixedRate": 0, "currency": "" } }, "totalFee": 500, "feeMode": "percentage", "rateType": "live", "quoteId": "QUOTE-53f58a7e-2" } } } }, "traceId": "4a41ee22-fee2-4d67-abda-edb3a5eacc04" }
Crypto Prefunding šŖ (API Link)
To prefund your account with cryptocurrency, set the orderType to 'crypto_prefund'. The API response will contain a dedicated wallet address. You can then send the specified amount of cryptocurrency to this address to fund your account.
- 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 '{ "orderType": "crypto_prefund", "purposeCode": "company_expenses", "source": { "currency": "USDC", "amount": "20000" }, "destination": { "currency": "USDT" } }'{ "status": "success", "data": { "flow": "CRYPTO_PREFUND", "orderId": "PF-260824094035421968699102135", "amount": 20000, "cryptoCurrency": "USDC", "cryptoNetwork": "ethereum", "walletAddress": "0x172b7207a35d7845eB26E95A9c51A6117b693cb3", "feeData": { "depositAmount": 20000, "withdrawAmount": 19001.243438, "exchangeRate": 1.0000654441130228, "totalFee": 1000 }, "quoteHistory": { "refreshCount": 0, "orderCreationQuote": { "isRefreshed": false, "usedQuotes": { "sourceCurrency": "USDC", "sourceAmount": 20000, "sourceCurrencyType": "crypto", "destinationCurrency": "USDT", "destinationCurrencyType": "crypto", "conversionRate": 1.0000654441130228, "processingFee": 1000, "processingFeeRate": 0.05, "customerFee": 0, "customerFeeRate": 0, "discount": 0, "discountRate": 0, "additionalFee": 0, "additionalFeeRate": 0, "fixedFee": {}, "totalFee": 1000, "feeMode": "percentage", "rateType": "live", "quoteId": "QUOTE-ccf81af1-afc1-48a5-aa8f-f64279d592cb", "networkFee": 0 } } } }, "traceId": "c3e83922-96d6-4d14-a48d-6b70a7bdf5fb" }
- 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 '{ "orderType": "crypto_prefund", "purposeCode": "company_expenses", "purposeCodeReason": "Monthly balance top-up", "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": "USDC", "amount": "20000" }, "destination": { "currency": "USDT" } }'{ "status": "success", "data": { "flow": "CRYPTO_PREFUND", "orderId": "PF-260824094035421968699102135", "amount": 20000, "cryptoCurrency": "USDC", "cryptoNetwork": "ethereum", "walletAddress": "0x172b7207a35d7845eB26E95A9c51A6117b693cb3", "feeData": { "depositAmount": 20000, "withdrawAmount": 19001.243438, "exchangeRate": 1.0000654441130228, "totalFee": 1000 }, "quoteHistory": { "refreshCount": 0, "orderCreationQuote": { "isRefreshed": false, "usedQuotes": { "sourceCurrency": "USDC", "sourceAmount": 20000, "sourceCurrencyType": "crypto", "destinationCurrency": "USDT", "destinationCurrencyType": "crypto", "conversionRate": 1.0000654441130228, "processingFee": 1000, "processingFeeRate": 0.05, "customerFee": 0, "customerFeeRate": 0, "discount": 0, "discountRate": 0, "additionalFee": 0, "additionalFeeRate": 0, "fixedFee": {}, "totalFee": 1000, "feeMode": "percentage", "rateType": "live", "quoteId": "QUOTE-ccf81af1-afc1-48a5-aa8f-f64279d592cb", "networkFee": 0 } } } }, "traceId": "c3e83922-96d6-4d14-a48d-6b70a7bdf5fb" }
Note: Amount to be transferred can be passed in either source or destination.
Examples:
{
"source": {
"currency": "EUR",
"amount": "100"
},
"destination": {
"currency": "USDC"
}
}{
"source": {
"currency": "EUR"
},
"destination": {
"currency": "USDC",
"amount": "100"
}
}- Amount is sent in source object: In this case, customer needs to do prefund-payin of 100 EUR. Amount of USDC that will be updated in the prefunding-balance will be calculated (~105 USDC). (This is usually preferred)
- Amount is sent in destination object: In this case, 100 USDC will be added to the prefunding-balance and amount of EUR that customer needs to send will be calculated (~94.5 EUR).
Updated 22 days ago
Did this page help you?