Place Order API

The PlaceOrderAPI enables the client to place an order for vouchers available with Xoxoday

For orders placed with realtime products, the maximum response time is 120 seconds

A unique reference ID needs to be sent for every unique order in the "poNumber" parameter

We strongly recommend storing the request and response of every "PlaceOrderAPI" call

Request Schema

ParameterTypeDescription
productIdIntUnique ID of the product to be ordered.
quantityIntNumber of units to be ordered.
denominationFloatValue/amount of the voucher or reward.
emailStringRecipient’s email address.
contactStringRecipient’s contact number.
poNumberStringPurchase Order number to avoid duplicate orders.
tagStringCustom tag to identify or categorize the order.
notifyAdminEmailInt (0/1)Flag to notify admin via email (1 = Yes, 0 = No).
notifyReceiverEmailInt (0/1)Flag to notify recipient via email (1 = Yes, 0 = No).

Response Schema

PathTypeDescription
dataobjectRoot response object.
data.placeOrderobjectContainer for the place order result.
data.placeOrder.statusnumberAPI execution status (1 = success).
data.placeOrder.dataobjectFull order details.
data.placeOrder.data.orderIdnumberUnique order ID generated by Xoxoday.
data.placeOrder.data.orderTotalnumberOrder total before applying discounts.
data.placeOrder.data.orderDiscountstringDiscount amount
data.placeOrder.data.discountPercentstringDiscount percentage
data.placeOrder.data.currencyCodestringCurrency code for the order.
data.placeOrder.data.currencyValuenumberCurrency conversion multiplier (usually 1).
data.placeOrder.data.amountChargednumberFinal amount charged to the customer.
data.placeOrder.data.orderStatusstringOverall status of the order (e.g., complete).
data.placeOrder.data.deliveryStatusstringDelivery status (e.g., delivered).
data.placeOrder.data.tagstringCustom tag passed from the request.
data.placeOrder.data.quantitynumberNumber of vouchers ordered.
data.placeOrder.data.vouchersarrayList of delivered voucher objects.
data.placeOrder.data.vouchers[].productIdnumberProduct ID for the voucher.
data.placeOrder.data.vouchers[].orderIdnumberOrder ID associated with the voucher.
data.placeOrder.data.vouchers[].voucherCodestringVoucher code delivered.
data.placeOrder.data.vouchers[].pinstringPIN of the voucher.
data.placeOrder.data.vouchers[].validitystringVoucher validity/expiry date.
data.placeOrder.data.vouchers[].amountnumberVoucher amount/value.
data.placeOrder.data.vouchers[].currencystringCurrency code for the voucher.
data.placeOrder.data.vouchers[].countrystringCountry code where voucher is valid.
data.placeOrder.data.vouchers[].typestringVoucher type (codePin, etc.).
data.placeOrder.data.vouchers[].currencyValuenumberFX conversion multiplier for voucher value.
data.placeOrder.data.voucherDetailsarraySummary of voucher products in the order.
data.placeOrder.data.voucherDetails[].orderIdnumberOrder ID.
data.placeOrder.data.voucherDetails[].productIdnumberProduct ID.
data.placeOrder.data.voucherDetails[].productNamestringProduct name.
data.placeOrder.data.voucherDetails[].currencyCodestringProduct currency code.
data.placeOrder.data.voucherDetails[].productStatusstringDelivery status for this product.
data.placeOrder.data.voucherDetails[].denominationnumberVoucher denomination.

Implementation Notes

  1. To avoid facing an error while placing an order, please pass the valid productID and denomination
  2. The maximum order quantity allowed for the majority of the products is 10 unless mentioned otherwise in the "orderQuantityLimit" parameter in the GetVouchersAPI
  3. Certain brands require a phone number to process the order. You can refer to the "isPhoneNumberMandatory" parameter in the GetVouchersAPI to identify the products with this mandate
  4. Should you wish to notify the recipient via email, please pass "1" in the "notifyReceiverEmail" parameter
  5. We recommend you store the "poNumber" that you pass in the request and the "orderID" you receive in the response
  6. The "type" parameter indicates the type in which the voucher is delivered. The 4 types are as follows:
    1. code
    2. codePin
    3. url
    4. urlPin
  7. Should you get a 5xx error from the PlaceOrderAPI, please call GetOrderDetails and confirm if an order exists using the poNumber. If there's no order against the poNumber, you can go ahead and place another order

Learn how to manage webhooks to receive order status updates for delayed product types.

Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!