Skip to main content
You can directly test the API from API reference tab above, we recommend checking that as it includes API calls in detail and you can also do live testing there.

Click Me

Click me if you want to directly check API reference for Placing Orders

Create Checkout / Place Order

Endpoint
POST /b2b/place-order
Creates a checkout for one or more products. The response returns a checkoutId that must be used in /b2b/place-order/doPayment to complete the order.

Request Body

{
  "data": [
    {
      "slug": "t-mobile-united-states",
      "skuItemId": "US_TM_10_100",
      "quantity": 1,
      "amount": 10,
      "requiredFields": [
        {
          "name": "mobile",
          "value": "1203256458"
        }
      ]
    }
  ],
 "emailNotification":false
}

Top-level fields

FieldTypeRequiredDescription
dataarray of objectsYesList of items to include in this order. Maximum 10 items per request.
emailNotificationbooleanNoIf set to false No emails sent regarding Order updates. Default true.

data[] item fields

Each object inside data represents one product (SKU) in the order.
FieldTypeRequiredDescription
slugstringYesProduct identifier (also known as product id). You can obtain this from the Products API.
skuItemIdstringYesUnique identifier of the SKU item.
quantityintegerYesNumber of units of this SKU to purchase. Maximum 25 per item.
amountnumberYesOrder amount per unit in USD for this SKU, or total amount for this line item (as defined by your pricing logic).
requiredFieldsarray of objectsConditionallyAdditional required input for this product (e.g., mobile number). Required only if the product defines required fields. Omit this if the product has no required fields.

requiredFields[] object

FieldTypeRequiredDescription
namestringYesName/key of the required field (e.g., "mobile").
valuestringYesValue for the required field (e.g., the customerโ€™s mobile number).
Constraints
  • Maximum 10 items in data per request.
  • Maximum 25 quantity per item.
  • requiredFields is optional, but when a product defines required fields, they must be provided here.

Success Response

{
  "id": "chk_1234567890",
  "status": "pending",
  "data": [
    {
      "slug": "t-mobile-united-states",
      "skuItemId": "US_TM_10_100",
      "quantity": 1,
      "amount": 10,
      "requiredFields": [
        {
          "name": "mobile",
          "value": "1203256458"
        }
      ]
    }
  ],
  "totalPrice": {
    "USD": 10.199918400652795,
    "EUR": 8.853611949827732,
    "GBP": 7.7947545845553785,
    "AUD": 15.810804806874797,
    "CAD": 14.394141552871512,
    "INR": 909.0295185196178,
    "LTC": 0.12227918720437372,
    "BTC": 0.00011855065091697267,
    "USDC": 10.199918400652795,
    "USDT": 10.205276170642382,
    "XRP": 4.918112008800981,
    "XLM": 41.81896915684
  },
  "totalAmount": 10
}

Response fields

FieldTypeDescription
idstringThe checkoutId that uniquely identifies this checkout. Use this value in /b2b/place-order/doPayment.
statusstringCurrent status of the checkout (e.g., "pending").
dataarrayEcho of the items you submitted in the request, with their details.
totalPriceobjectObject containing the total price converted into multiple currencies and crypto assets (keys like USD, EUR, BTC, USDT, etc.). Values are numbers.
totalAmountinteger/numberTotal order amount in USD.
Note: id in this response is the same as checkoutId used in the payment endpoint.

Complete Payment

Endpoint
POST /b2b/place-order/doPayment
Confirms and processes payment for an existing checkout created via /b2b/place-order. On success, the order will proceed to delivery. A callback will be sent to your callback_url once the order is completed.

Request Body

{
  "checkoutId": "chk_1234567890",
  "callback_url": "https://your-domain.com/webhooks/wizzgift",
  "meta_data": {
    "orderReference": "YOUR_INTERNAL_ORDER_ID",
    "userId": "12345"
  }
}

Fields

FieldTypeRequiredDescription
checkoutIdstringYesThe checkout id returned as id from /b2b/place-order.
callback_urlstringYesHTTPS URL where WizzGift will send a POST callback when the order is completed.
meta_dataobjectOptionalArbitrary JSON object you can use to attach your own data (e.g., user ID, internal order reference). This object will be returned unchanged in the callback request.

Success Response

{
  "success": true
}
FieldTypeDescription
successbooleantrue if the payment was successful.

Error Responses

Examples of possible error responses:
{
  "error": "Insufficient balance"
}
{
  "error": "Checkout not found"
}
{
  "error": "Checkout/Order not found, make sure valid checkout/order id is provided"
}

Error field

FieldTypeDescription
errorstringDescription of the error that occurred.

Callback Behaviour

Once /b2b/place-order/doPayment succeeds and the order is processed:
  • WizzGift will send a POST request to your callback_url.
  • The callback will include:
    • Final order status.
    • Order details.
    • The same meta_data object you passed in the /doPayment request, allowing you to correlate the order with your internal systems.