Skip to main content
Value vouchers close the loop with direct bookings: bought on the hotel’s website, spent on the hotel’s booking engine. The Gift Shop API is the sales side of that loop; redemption is already built into the payment page D-EDGE hosts, so there is nothing to wire on the booking side.

Sell the right products

Only products whose usage is Direct are spendable online. Filter the catalogue on that field and present these as the “spend on your next stay” offer:
A Range price fits gift cards well: the buyer picks the amount, between the shop’s minAmount and maxAmount.

What the beneficiary does with the code

After payment, the voucher code travels to the beneficiary by email. To spend it, they book on the hotel’s (or group’s) booking engine and enter the code on the payment page. The code deducts its value from the total, and D-EDGE marks the voucher as spent. If you build the booking funnel yourself with the Booking Engine API, the loop stays closed with zero extra work. Accepting the quote redirects the guest to the same D-EDGE-hosted payment page, where the voucher field lives.

Read the order and its codes

The examples send the X-API-KEY header introduced in the Quick start. Replace {sessionId} with the session that confirmed the purchase.
Once the shopper has paid, Get the order returns each voucher with its code, expiry, and status:
status starts at Active (paid, still redeemable) and becomes Spent on redemption, or Expired past the product’s validity. Two more values exist: Refund when the item has been refunded, and Unknown when the state could not be determined. Handle all five in your interface, so a refunded voucher does not display as spendable.

Tips

  • Say where the card is spendable, at purchase time. “To use on our booking site” on the product page prevents the beneficiary from showing up at the desk with an online-only card.
  • A gift card always shows its value. hidePrice has no effect on Direct products: the API accepts the flag and keeps the price visible. Reserve the price-hiding option for Indirect service vouchers.
  • Treat the code as money. Store and display voucher codes with the same care as credentials, as covered in Best practices.
  • Track redemption in the D-EDGE platform, not the API. The order endpoint is scoped to the purchase session; the hotelier follows the life of the voucher afterwards (who spent it, when, and on which booking) in the platform’s Orders page. Do not build a redemption poller on the API.
  • Group shops widen the loop. A card sold by a group shop is spendable on the booking engines of the group’s hotels. See Hotel shop or group shop.

Get the order

Full schema for the order, its vouchers, and their statuses.

Booking Engine API

Build the direct booking funnel the card is spent on.