Redeem

Redemption Workflow:
The redemption process follows these steps:

  1. Validate the voucher exists and is active
  2. Check redemption eligibility (not already redeemed, not expired)
  3. Mark voucher as "booking" to prevent concurrent redemption
  4. Publish redemption event for downstream processing
  5. Return acceptance confirmation

Concurrency Control:
The system implements optimistic concurrency control by immediately updating the voucher
status to "booking" upon redemption request. This prevents double-spending scenarios
in high-concurrency environments.

Event-Driven Processing:
The actual redemption processing occurs asynchronously through domain events. This allows
for complex business logic, external service integration, and proper error handling
without blocking the API response.

Validation Rules:

  1. Voucher must exist in the system
  2. Voucher cannot be already redeemed
  3. Voucher must not be expired or voided
  4. Operator must have appropriate permissions

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Responses
200

OK

202

Redemption request accepted and processing initiated.

400

Invalid request data or voucher already redeemed.

401

Authentication token is missing, invalid, or expired.

404

Specified voucher does not exist in the system.

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!