Creating Fiat Payin With Wallet Transfer

Creating a gaming (Fiat payin with wallet) order (API Link)

  • Minimal payload: If source.paymentCode is not specified, the end user will have the option to make the payment using any of the enabled payment methods.
    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": "payin",
        "purposeCode": "company_expenses",
        "source": {
            "currency": "USD",
            "amount": "10",
            "paymentType": "bank_transfer"
        },
        "destination": {
            "currency": "USDT"
        }
    }'
    {
        "status": "success",
        "data": {
            "flow": "FIAT_PAYIN",
            "orderId": "OR-2509291454262384294",
            "payUrl": "https://sandbox-pay-widget.transfi.com/pay?paytoken=6c237e7e-4a55-4503-81b0-41b348d54a6d"
        },
    }
  • 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": "gaming",
        "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": "USD",
            "amount": "10",
            "paymentType": "bank_transfer",
            "paymentCode": "swift",
            "additionalPaymentDetails": {
                 "phoneCode": "+91",
                 "phone": "12341234123",
                 "street": "abcd",
                 "city": "abcd",
                 "state": "abcd",
                 "documentType": "passport",
                 "documentNumber": "abcde",
                 "dob": "01-01-2000"
              }
        },
        "destination": {
            "currency": "USDT"
        }
    }'
    {
        "status": "success",
        "data": {
            "flow": "FIAT_PAYIN",
            "orderId": "OR-2509291454262384294",
            "payUrl": "https://sandbox-pay-widget.transfi.com/pay?paytoken=6c237e7e-4a55-4503-81b0-41b348d54a6d"
        }
    }



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"
    }
}
  1. Amount is sent in source object: In this case, user needs to do payin of 100 EUR. Amount of USDC that will be updated in the balance will be calculated (~105 USDC). (This is usually preferred)
  2. Amount is sent in destination object: In this case, 100 USDC will be added to the balance and amount of EUR that user needs to send will be calculated (~94.5 EUR).