A valid request URL is required to generate request examples{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"card_transaction_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"reward_id": "<string>",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123
},
"result": {
"reward": {
"id": "<string>"
},
"quantity": 123,
"material": {
"product": {},
"sku": {}
},
"digital": {
"discount_coupons": [
{
"id": "<string>",
"code": "<string>"
}
],
"gift_vouchers": [
{
"id": "<string>",
"code": "<string>",
"amount": 123,
"balance": 123
}
],
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>",
"card_id": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<string>"
}{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"card_transaction_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"reward_id": "<string>",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123
},
"result": {
"reward": {
"id": "<string>"
},
"quantity": 123,
"material": {
"product": {},
"sku": {}
},
"digital": {
"discount_coupons": [
{
"id": "<string>",
"code": "<string>"
}
],
"gift_vouchers": [
{
"id": "<string>",
"code": "<string>",
"amount": 123,
"balance": 123
}
],
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>",
"card_id": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Purchase a reward with points
⚠️ BETA endpoint
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
Purchases a reward on behalf of the program member, spending points from the member’s loyalty card (the card is resolved from the reward cost’s card definition).
Requires an ACTIVE program, an ACTIVE member, an ACTIVE reward assigned to the program with available stock, a matching reward cost for the customer’s context, and sufficient points within the configured spending limits.
Modes:
TRANSACTION(default) — creates a PENDING reward transaction (and an underlying card transaction) processed asynchronously. Returns HTTP 202.DRY_RUN— simulates the purchase without creating any transaction. Returns HTTP 200 with a SIMULATED transaction payload.
A valid request URL is required to generate request examples{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"card_transaction_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"reward_id": "<string>",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123
},
"result": {
"reward": {
"id": "<string>"
},
"quantity": 123,
"material": {
"product": {},
"sku": {}
},
"digital": {
"discount_coupons": [
{
"id": "<string>",
"code": "<string>"
}
],
"gift_vouchers": [
{
"id": "<string>",
"code": "<string>",
"amount": 123,
"balance": 123
}
],
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>",
"card_id": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<string>"
}{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"card_transaction_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"reward_id": "<string>",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123
},
"result": {
"reward": {
"id": "<string>"
},
"quantity": 123,
"material": {
"product": {},
"sku": {}
},
"digital": {
"discount_coupons": [
{
"id": "<string>",
"code": "<string>"
}
],
"gift_vouchers": [
{
"id": "<string>",
"code": "<string>",
"amount": 123,
"balance": 123
}
],
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>",
"card_id": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique loyalty program identifier (format: lprg_ followed by hexadecimal characters).
Program member ID (format lmbr_[a-f0-9]+).
^lmbr_[a-f0-9]+$Body
Request body for purchasing a reward with points.
Identifier of the reward to purchase (format lrew_...).
Purchase mode. TRANSACTION creates a PENDING reward transaction processed asynchronously (HTTP 202). DRY_RUN only simulates the purchase and returns the calculation result (HTTP 200); no transaction is created. Defaults to TRANSACTION when omitted.
TRANSACTION, DRY_RUN Response
Dry run result (mode DRY_RUN). No transaction was created; the returned transaction has status SIMULATED and no id.
Result of a reward purchase request.
The created (or simulated) reward transaction.
Show child attributes
Show child attributes
Result status. TRANSACTION_CREATED for TRANSACTION mode, DRY_RUN for dry-run mode.
TRANSACTION_CREATED, DRY_RUN Human-readable result message. TRANSACTION mode: "Reward purchase transaction created". DRY_RUN mode: "Dry run mode. No transaction was created. This is only a simulation.".
Was this page helpful?

