A valid request URL is required to generate request examples{
"transaction": {
"id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"card_id": "<string>",
"card_definition_id": "<string>",
"card_transaction_id": "<string>",
"order_id": "<string>",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {
"amount_limit": 123,
"points_limit": 123
},
"payment": {
"id": "<string>",
"amount": 123,
"points_spent": 123,
"exchange_ratio": 123
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<string>"
}{
"transaction": {
"id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"card_id": "<string>",
"card_definition_id": "<string>",
"card_transaction_id": "<string>",
"order_id": "<string>",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {
"amount_limit": 123,
"points_limit": 123
},
"payment": {
"id": "<string>",
"amount": 123,
"points_spent": 123,
"exchange_ratio": 123
}
},
"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>"
}Pay for an order 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.
Pays for an order using points from the specified member loyalty card. The payment amount
and points to spend are calculated from the card definition’s pay-with-points exchange
ratio formula, capped by the card balance and the optional payment_limit.
Requires an ACTIVE program, an ACTIVE member, and a card definition with pay-with-points enabled and a configured exchange ratio formula.
Modes:
TRANSACTION(default) — creates a PENDING order transaction (and an underlying card transaction) processed asynchronously. Returns HTTP 202.DRY_RUN— simulates the payment without creating any transaction. Returns HTTP 200 with a SIMULATED transaction payload.
curl --request POST \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"card_id": "<string>",
"order": {
"id": "<string>",
"source_id": "<string>"
},
"payment_limit": {
"points_limit": {
"max": 2
},
"amount_limit": {
"max": 2
}
}
}
'{
"transaction": {
"id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"card_id": "<string>",
"card_definition_id": "<string>",
"card_transaction_id": "<string>",
"order_id": "<string>",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {
"amount_limit": 123,
"points_limit": 123
},
"payment": {
"id": "<string>",
"amount": 123,
"points_spent": 123,
"exchange_ratio": 123
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<string>"
}{
"transaction": {
"id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"card_id": "<string>",
"card_definition_id": "<string>",
"card_transaction_id": "<string>",
"order_id": "<string>",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {
"amount_limit": 123,
"points_limit": 123
},
"payment": {
"id": "<string>",
"amount": 123,
"points_spent": 123,
"exchange_ratio": 123
}
},
"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 paying for an order with points.
Identifier of the member's loyalty card to spend points from (format lcrd_...).
Reference to the order being paid. At least one of id or source_id must be provided.
Show child attributes
Show child attributes
Optional payment limit. When omitted, the default CARD_BALANCE limit is applied (spend up to the card balance).
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Payment mode. TRANSACTION creates a PENDING order transaction processed asynchronously (HTTP 202). DRY_RUN only simulates the payment and returns the calculation result (HTTP 200); no transaction is created. Defaults to TRANSACTION when omitted or null.
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 pay-with-points request.
The created (or simulated) order 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: "Pay with points transaction created". DRY_RUN mode: "Dry run mode. No transaction was created. This is only a simulation.".
Was this page helpful?

