OrdersCreate Order

Create Order

curl -X POST "https://sandbox-api.aparatech.io/v1/public/orders" \
  -H "Content-Type: application/json" \
  -H "MID: example_string" \
  -d '{
  "cxOrderId": "customerOrderId12",
  "userId": "OCUX-17787550145567248",
  "purposeCode": "company_expenses",
  "orderType": "payin",
  "successRedirectUrl": "https://www.google.com/",
  "failureRedirectUrl": "https://www.google.com/",
  "headlessMode": true,
  "settlementPreference": "settlement",
  "source": {
    "currency": "IDR",
    "amount": 3.14,
    "paymentCode": "shopeepay",
    "paymentType": "local_wallet"
  }
}'
{
  "status": "success",
  "data": {
    "flow": "FIAT_PAYIN",
    "orderId": "OR-2605011419019599696",
    "amount": 150000,
    "payUrl": "https://sandbox-checkout.aparatech.io/7mg51OPD-"
  }
}
POST
/v1/public/orders
POST
Base URLstring

Target server for requests. Edit to use your own host.

Content-Typestring
Required

The media type of the request body

Options: application/json
header
MIDstring
Required

Merchant ID for authentication.

cxOrderIdstring

Optional customer order identifier.

userIdstring
Required

ID of the user associated with the order.

Options: OCUX-17787550145567248
purposeCodestring
Required

Purpose code for the transaction.

Options: company_expenses
orderTypestring
Required

Type of order — payin, payout, or fiat_prefund.

Options: payin, payout, fiat_prefund
successRedirectUrlstring
Required

URL to redirect the user on successful payment.

failureRedirectUrlstring
Required

URL to redirect the user on failed payment.

headlessModeboolean
Required

If true, the response returns a payUrl for headless checkout; if false, a hosted checkout page is used.

settlementPreferencestring

Settlement preference — settlement or prefund.

Options: settlement, prefund
Request Preview
Response

Response will appear here after sending the request

Headers

MIDstring
Required

Merchant ID for authentication.

Body

application/json
cxOrderIdstring

Optional customer order identifier.

Example:
customerOrderId12
userIdstring
Required

ID of the user associated with the order.

Allowed values:OCUX-17787550145567248
purposeCodestring
Required

Purpose code for the transaction.

Allowed values:company_expenses
orderTypestring
Required

Type of order — payin, payout, or fiat_prefund.

Allowed values:payinpayoutfiat_prefund
successRedirectUrlstring
Required

URL to redirect the user on successful payment.

Example:
https://www.google.com/
failureRedirectUrlstring
Required

URL to redirect the user on failed payment.

Example:
https://www.google.com/
headlessModeboolean
Required

If true, the response returns a payUrl for headless checkout; if false, a hosted checkout page is used.

Example:
true
settlementPreferencestring

Settlement preference — settlement or prefund.

Allowed values:settlementprefund
sourceobject
Required

Responses

statusstring
dataobject