Payin Usecases
Minimal Payload
curl --location 'https://sandbox-api.aparatech.io/v1/public/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ==' \
--header 'mid: SAH1N3_NA_NA' \
--data '{
"userId": "OCUX-177875501455648",
"orderType": "payin",
"purposeCode": "company_expenses",
"successRedirectUrl": "https://www.google.com/",
"failureRedirectUrl": "https://www.google.com/",
"headlessMode": true,
"source": {
"currency": "IDR",
"amount": 10,
"paymentType": "local_wallet",
"paymentCode": "shopeepay"
}
}'
{
"status": "success",
"data": {
"flow": "FIAT_PAYIN",
"orderId": "OR-2605120616003238324",
"amount": 1500000,
"payUrl": "https://sandbox-checkout.aparatech.io/iyMDJFJ0d"
}
}
Full Payload
curl --location 'https://sandbox-api.aparatech.io/v1/public/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ==' \
--header 'mid: SAH1N3_NA_NA' \
--data '{
"userId": "OCUX-2123123123123",
"orderType": "payin",
"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"
}
}
}'
{
"status": "success",
"data": {
"flow": "FIAT_PAYIN",
"orderId": "OR-2510031348048279781",
"amount": 10,
"payUrl": "https://sandbox-checkout.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!
Was this page helpful?