Skip to content

Reserve value against an online order

POST /redemption-holds

For a stamps card’s reward, a points card’s points or reward, or a prepaid card’s deduction, spent by the card itself or an external_id linked with it, as POST /redemptions is. What is held is out of reach of every other spend, the till’s included, until it is confirmed, released, or lapses 15 minutes after it was made. A hold that lapsed spends nothing.

Scope: redemptions:write. The key’s connection must hold it; see the reference’s introduction.

Replace the CAPITALS, and set PASSKAAR_KEY to a key from the portal.

Terminal window
curl -X POST "https://api.passkaar.com/integrations/v1/redemption-holds" \
-H "Authorization: Bearer $PASSKAAR_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"card": {
"card_id": "CARD_ID"
},
"reference": "ORDER-1003",
"spend": {
"type": "reward"
}
}'
Name In Type Required What it is
Idempotency-Key header string Any 1–255 visible ASCII characters, a UUID by preference. A retry with the same key within 24 hours answers the first result. reference is what guards a resend after that.
Field Type Required What it is
card object yes Exactly one of serial, card_id, phone, email or external_id. A phone or email that matches several customers answers 409 ambiguous. Spending accepts only serial, card_id, or an external_id linked with the card.
reference string yes The order the value is held for.
spend object (SpendReward) or object (SpendPoints) or object (SpendDeduction) or object (SpendCoupon) or object (SpendSession) yes What is spent. The card’s type decides which it may be.
branch string (uuid) A branch’s id from GET /branches. Omitted, the connection’s branch if it has one, otherwise none.

A replay of a reference already used.

Field Type Required What it is
id string (uuid) yes
reference string yes The caller’s invoice, order or refund number, 1–64 visible ASCII characters. Unique per connection for ever within its kind (awards, redemptions, reversals, holds): the same reference again, at any age, answers the first result with replayed: true.
card object (CardIds) yes The card’s id and, where shown, its printed card ID.
card.id string (uuid) yes
card.card_id string or null yes The printed card ID, only when the call named the card by serial or card_id, the call made the card (a created sign-up), or this connection’s external_id was linked with the card. Null when the card was found by phone, email or an unproven link.
status open, confirmed, released, expired yes
held object (Value) yes An amount in the card’s own units. Only the keys its type counts in are present; a check-in is {}.
held.stamps integer
held.rewards integer Stamp-card rewards.
held.points integer
held.rupees number A prepaid card’s own rupees.
held.bonus_rupees number A prepaid top-up’s bonus, on top of rupees.
held.value_rupees number What points spent on a cash-back points card are worth off the bill, for the caller’s discount line.
held.sessions integer
held.deals integer Coupon deals.
held.qualifying integer Towards a VIP card’s tier, in the card’s measure: visits, or whole rupees of spend.
held.paid_through string (date) A membership renewed to this day.
expires_at string (date-time) yes When an open hold lapses: 15 minutes after it was made.
available object yes The balance less every open hold.
redemption object or null yes Once confirmed, the redemption it became.
redemption.id string (uuid) yes
created_at string (date-time) yes RFC 3339. Answers are in UTC; requests may carry any offset.
replayed boolean yes True when this answers a reference or idempotency key already used.

Held.

Field Type Required What it is
id string (uuid) yes
reference string yes The caller’s invoice, order or refund number, 1–64 visible ASCII characters. Unique per connection for ever within its kind (awards, redemptions, reversals, holds): the same reference again, at any age, answers the first result with replayed: true.
card object (CardIds) yes The card’s id and, where shown, its printed card ID.
card.id string (uuid) yes
card.card_id string or null yes The printed card ID, only when the call named the card by serial or card_id, the call made the card (a created sign-up), or this connection’s external_id was linked with the card. Null when the card was found by phone, email or an unproven link.
status open, confirmed, released, expired yes
held object (Value) yes An amount in the card’s own units. Only the keys its type counts in are present; a check-in is {}.
held.stamps integer
held.rewards integer Stamp-card rewards.
held.points integer
held.rupees number A prepaid card’s own rupees.
held.bonus_rupees number A prepaid top-up’s bonus, on top of rupees.
held.value_rupees number What points spent on a cash-back points card are worth off the bill, for the caller’s discount line.
held.sessions integer
held.deals integer Coupon deals.
held.qualifying integer Towards a VIP card’s tier, in the card’s measure: visits, or whole rupees of spend.
held.paid_through string (date) A membership renewed to this day.
expires_at string (date-time) yes When an open hold lapses: 15 minutes after it was made.
available object yes The balance less every open hold.
redemption object or null yes Once confirmed, the redemption it became.
redemption.id string (uuid) yes
created_at string (date-time) yes RFC 3339. Answers are in UTC; requests may carry any offset.
replayed boolean yes True when this answers a reference or idempotency key already used.

Every error is a Problem Details answer with a stable code.

Status Code
400 invalid_request
401 unauthorized
404 not_found
409 request_in_progress
409 ambiguous
422 idempotency_key_reused
422 reference_reused
422 card_required
422 card_not_active
422 operation_not_allowed
422 insufficient_balance
429 rate_limited
500 internal_error
503 unavailable