Find a product’s fields
Every product inGET /b2b/products and GET /retailer/v1/catalog, and in the single-product endpoints, carries a requiredFields array. If it is missing, null, or empty, the product needs nothing extra.
Product (trimmed)
requiredFields describes one input:
A
select field looks like this:
Field names and formats come from our suppliers and can change when the catalog syncs. Read
requiredFields from the catalog when you build your order form instead of hardcoding them per product, and refresh your copy of the catalog at least daily.Send the values
Add arequiredFields object to each order item. B2B orders take it on POST /b2b/orders; retailer checkouts take it on POST /retailer/v1/checkouts. The object maps each field’s name to the customer’s value.
- Every value is a JSON string, including IDs and phone numbers that look numeric. Send
"userId": "5123456789", not"userId": 5123456789. A number is rejected. - Send every field the product defines, each with a non-blank value.
- Send only the keys the product defines, with surrounding whitespace removed.
- One set of values covers the whole line. With
"quantity": 3, all three units go to the same player or phone number. To send to different accounts, add one item per account. - Omit
requiredFieldsfor products that define none.
playstorePolicy: "required_fields_hidden", but that flag only changes how the Wizzgift mobile app collects fields. API orders must always include the values when you create them.
Validate before you order
When you create the order or checkout, the API checks that:requiredFieldsis an object whose values are all strings.- every field the product defines is present and not blank.
regex or options at that point. The supplier checks the value when it fulfills the order. A value in the wrong format is accepted and paid for, and then the item fails. You can refund the failed item, but your customer still waits for nothing.
A value in the right format that belongs to the wrong account is worse: the top-up usually goes through to that account and cannot be reversed. Ask your customer to confirm the value before you place the order.
Check each value against the product’s definition before you send it:
^…$ anchors. Most engines accept them unchanged. In Python, use re.search(field["regex"], value), which behaves like JavaScript’s test. In JSON the backslashes arrive escaped, so "^\\+?[1-9][0-9]{6,14}$" is the pattern ^\+?[1-9][0-9]{6,14}$.
Common fields
These are the fields currently in the catalog. Always go by the product’s own definition, because formats differ between products that share a field name.Read the values back
Retailer checkout responses repeat what you sent asitems[].requiredFields, so you can show your customer the account a checkout will top up. B2B order responses do not include the values, so keep your own copy with your order record.
Errors
A required-field problem at order time returns400 VALIDATION_ERROR. The message names the product and the fields:
When the supplier rejects a value after payment, the order still exists, but the item ends in
failed. Its fulfillments carry errorMessage: "The provided details could not be processed. Please verify them and contact support." Fix the value, place a new order, and refund the failed item. See errors for the full error envelope.