Redeem Endpoint

Use redeem when staff confirms the booking should be consumed. Redemption is still checked against merchant ownership and booking status.

POST/api/integrations/merchant/bookings/redeem

Redeem a booking for the authenticated merchant.

Request Fields

Field
Type
Required
Description
bookingId
string
Yes
Resolved voucher id.

Response Fields

Field
Type
Description
code
number
Response code.
success
boolean
Present on successful redemption.
message
string
Human-readable summary.
booking
object
Updated booking summary after redemption.
reason
string
Controlled error reason for code 4 responses.

Response Codes

Yuter standardizes the booking integration response into four top-level codes so merchant-side documentation and cashier UI can stay simple.

Code
Meaning
Notes
1
Success
The booking is valid or redeemed successfully.
2
Already redeemed
The booking has already been redeemed before this request.
3
Invalid booking
The booking id is invalid or the booking record cannot be found.
4
Other errors
Authentication failed, booking not redeemable, merchant not allowed, or other controlled failure.

Redeem Example

Example request and response for the redeem endpoint.

cURL example

API_KEY='<raw merchant api key>'
BOOKING_ID='<booking id>'
TIMESTAMP=$(($(date +%s) * 1000))
NONCE=$(uuidgen)
BODY='{"bookingId":"'"$BOOKING_ID"'"}'
PATH='/api/integrations/merchant/bookings/redeem'
PAYLOAD="POST
$PATH
$TIMESTAMP
$NONCE
$BODY"
SIGNATURE=$(printf "%s" "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_KEY" -hex | sed 's/^.* //')

curl -X POST "https://www.yuterwellness.com$PATH" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $API_KEY" \
  -H "x-timestamp: $TIMESTAMP" \
  -H "x-nonce: $NONCE" \
  -H "x-signature: $SIGNATURE" \
  -d "$BODY"

Response Example

{
  "code": 1,
  "success": true,
  "message": "Booking redeemed successfully",
  "booking": {
    "_id": "69ce982e96a5b33a356abab0",
    "programTitle": "Private Merchant Test Event",
    "userName": "Test User",
    "userEmail": "test@example.com",
    "quantity": 1,
    "date": "2026-04-10",
    "status": "redeemed",
    "redeemedAt": "2026-04-10T10:22:16.120Z",
    "redeemedBy": "Merchant API: Merchant Test Key"
  }
}