Gaming Usecases
Minimal Payload
curl --location 'https://sandbox-api.aparatech.io/v3/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ==' \
--header 'mid: SAH1N3_NA_NA' \
--data '{
"userId": "UX-2123123123123",
"orderType": "gaming",
"purposeCode": "company_expenses",
"successRedirectUrl": "https://yourapp.com/success",
"failureRedirectUrl": "https://yourapp.com/failure",
"source": {
"currency": "USD",
"amount": "10",
"paymentType": "bank_transfer"
},
"destination": {
"currency": "USDCSOL"
}
}'
{
"status": "success",
"data": {
"flow": "FIAT_PAYIN",
"orderId": "OR-2509291454262384294",
"payUrl": "https://sandbox-pay-widget.aparatech.io/pay?paytoken=6c237e7e-4a55-4503-81b0-41b348d54a6d"
},
}
Full Payload
curl --location 'https://sandbox-api.aparatech.io/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": "john.doe@example.com"
},
"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": "USDCSOL"
}
}'
{
"status": "success",
"data": {
"flow": "FIAT_PAYIN",
"orderId": "OR-2510031348048279781",
"amount": 10,
"payUrl": "https://sandbox-pay-widget.aparatech.io/pay?paytoken=123123-123-123-123-123123",
"paymentsData": {
"accountDetails": {
"beneficiaryName": "John d",
"beneficiaryBankName": "JP Morgan Chase",
"bankAddress": "383 MADISON AVENUE, NEW YORK, NY, 10179",
"beneficiaryBankAccountNumber": "1234123123123",
"beneficiaryAccountType": "checking",
"swiftCode": "ABCDABCD",
"beneficiaryAddress": "abc,abc,asd,IN"
},
"type": "bankTransfer",
"extra": {
"accountId": "eab6881e-123-123-123-123123"
}
},
}
}
In the successful response from the api-call you will get the paymentUrl, to which you need to redirect your user to complete the payment. After redirecting, there's nothing to do but wait!
Note: Amount to be transferred can be passed in either source or destination.
Example:-
{
"source": {
"currency": "EUR",
"amount": "100"
},
"destination": {
"currency": "USDC"
}
}
{
"source": {
"currency": "EUR"
},
"destination": {
"currency": "USDC",
"amount": "100"
}
}
Amount Handling
Amount can be passed in either source or destination.
Amount in source object:
In this case, the user needs to pay 100 EUR. The amount of USDC credited to the balance will be calculated (approximately 105 USDC).
Amount in destination object:
In this case, 100 USDC will be credited to the balance, and the amount of EUR the user needs to pay will be calculated (approximately 94.5 EUR).
Was this page helpful?