Create Prefunding for Payouts
Prefunding
To initiate payouts in any supported currency, your account must first have a sufficient balance. You can fund your account by prefunding it using either fiat currencies (e.g., USD, EUR) or cryptocurrencies (e.g., BTC, ETH). TransFi supports both fiat and crypto funding methods, allowing you to maintain the required balance for processing payouts.
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.
Example Request: Fiat Prefunding
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": "fiat_prefund",
"purposeCode": "other",
"purposeCodeReason": "Monthly balance top-up",
"successRedirectUrl": "https://yourapp.com/success",
"failureRedirectUrl": "https://yourapp.com/failure",
"deviceDetails": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"ipInfo": {
"ip": "123.123.123.123",
"countryCode3": "IND"
}
},
"source": {
"currency": "EUR",
"paymentCode": "sepa_bank",
"paymentType": "bank_transfer",
"amount": "200",
"additionalPaymentDetails": {
"street": "abcd",
"city": "abcd",
"postalCode": "123123",
}
},
"destination": {
"currency": "EUR"
}
}'{
"status": "success",
"data": {
"flow": "FIAT_PREFUND",
"orderId": "PF-2510031418182421713",
"amount": 200,
"payUrl": "https://sandbox-pay-widget.transfi.com/pay?paytoken=db7300d2-a49d-411c-8b14-1f8fdab1fb1a",
"paymentsData": {
"accountDetails": {
"beneficiaryName": "John d",
"beneficiaryBankName": "JP Morgan Chase",
"bankAddress": "383 MADISON AVENUE, NEW YORK, NY, 10179",
"beneficiaryBankAccountNumber": "123123123123",
"beneficiaryAccountType": "checking",
"swiftCode": "CHASUS33",
"beneficiaryAddress": "abc,abc,abc,IN"
},
"type": "bankTransfer",
"extra": {
"accountId": "a2ab45c3-123-1234-1234-1234-1234"
}
}
}
}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.
Example Request: Crypto Prefunding
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": "crypto_prefund",
"purposeCode": "other",
"purposeCodeReason": "Monthly balance top-up",
"deviceDetails": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"ipInfo": {
"ip": "123.123.123.123",
"countryCode3": "IND"
}
},
"source": {
"currency": "USDC",
"amount": "10"
},
"destination": {
"currency": "USDT"
}
}'{
"status": "success",
"data": {
"flow": "CRYPTO_PREFUND",
"orderId": "PF-2510030851533851158",
"amount": 10,
"walletAddress": "dummy_asdfasdfasdfasdfasdf1234"
}
}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 about 1 month ago