Apara API - Payin Creating Cards Transfer

Cards 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-17806373984037304",
    "orderType": "payin",
    "purposeCode": "company_expenses",
    "successRedirectUrl": "https://www.aparatech.io/",
    "failureRedirectUrl": "https://www.aparatech.io/",
    "headlessMode": true,
    "deviceDetails": {
        "ipInfo": {
            "ip": "186.228.23.255"
        },
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7; rv:118.0) Gecko/20100101 Firefox/118.0"
    },
    "source": {
        "currency": "USD",
        "amount": 65,
        "paymentType": "card",
        "paymentCode": "credit_card_direct",
        "additionalPaymentDetails": {
            "name": "John Doe",
            "email": "john.doe@example.com",
            "cardHolderName": "John Doe",
            "cardNumber": "4111111111111111",
            "cardExpiryMonth": "12",
            "cardExpiryYear": "2030",
            "cvv": "123",
            "browserDetails": {
                "language": "en-US",
                "colorDepth": 24,
                "screenHeight": 1080,
                "screenWidth": 1920,
                "screenTZ": -330,
                "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
                "javaEnabled": false,
                "javaScriptEnabled": true
            },
            "phone": "14155550123",
            "street": "123 Main Street",
            "city": "New York",
            "postalCode": "10001",
            "dob": "15-05-1995"
        }
    }
}
}'
{
    "status": "success",
    "data": {
        "flow": "FIAT_PAYIN",
        "orderId": "OR-2605120616003238324",
        "amount": 1500000,
        "payUrl": "https://sandbox-checkout.aparatech.io/iyMDJFJ0d"
    }
}

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.