Indirect products, the option to hide the price on the voucher itself.
Gift options
Every cart item accepts five gift fields:
After payment, D-EDGE emails the voucher to the beneficiary and the purchase confirmation to the shopper. Nothing to build on your side beyond the form.
Add a gift to the cart
The examples send the
X-API-KEY header introduced in the Quick start. Replace {sessionId} with your session, and the productId and amount with a product from your catalogue. The example adds an Indirect product (a spa session), where hidePrice takes effect; the amount is required and must equal the product’s Fixed price.201 returns the created item identifiers:
quantity: 3 returns three identifiers, and each item carries its own message, recipient, and price visibility, edited separately with Update a cart item.
Shopper form
The confirmation step needs the shopper’s own details, including a country, and can carry a phone code. Two localisation endpoints feed that form: Get country names, translated into the session’s culture, and Get phone codes.Tips
- Validate the beneficiary’s email twice. It is where the voucher lands; a typo is a lost gift and a support ticket. An email confirmation field is worth the friction here.
- Offer
hidePriceonIndirectgifts only. WhensendToisBeneficiary, most buyers expect the amount of a service to stay private. On aDirectproduct the flag has no effect: the API accepts it, then keeps the price visible, so a toggle there would silently do nothing. - Cap the message length in your form. The
commentis printed on the voucher document; a short, well-displayed message beats a truncated one. - Keep
Shopperone click away. Some buyers want to print the voucher and hand it over themselves;sendTo: "Shopper"covers them with the same cart.
Related
Add a cart item
Full schema for the cart item and its gift options.
Confirm the cart
The shopper’s details and the payment hand-off.