Skip to main content
POST
/
v1
/
redemptions
/
{id}
/
reverse
Reverse a redemption
curl --request POST \
  --url https://api.scrip.dev/v1/redemptions/{id}/reverse \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "reason": "Customer refund request",
  "amount": "500.00",
  "idempotency_key": "reverse-12345",
  "quantity": 1
}
'
{
  "amount": "500.00",
  "created_at": "2024-01-15T10:30:00Z",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "journal_entry_id": "550e8400-e29b-41d4-a716-446655440002",
  "quantity": 1,
  "reason": "Customer refund request",
  "redemption_id": "550e8400-e29b-41d4-a716-446655440001"
}
Reverses a redemption, either fully or partially. To reverse the full amount, omit the amount and quantity fields. For a partial reversal, specify the amount (for raw and AMOUNT_BASED redemptions) or quantity (for UNIT_BASED catalog redemptions) to reverse. The reason field is required and must be between 1 and 500 characters. For UNIT_BASED catalog items, reversals decrement the reward’s redeemed_count, which means a reward that was OUT_OF_STOCK can transition back to ACTIVE if the reversal brings the count below max_total. For assets configured in LOT mode, reversals restore the specific lots that were consumed, following LIFO (last-in, first-out) order. Multiple partial reversals are allowed on a single redemption. The cumulative reversed amount cannot exceed the original redemption amount. Check reversed_amount on the redemption to verify headroom before issuing a partial reversal.
For usage patterns and examples, see the Redemptions guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Redemption ID

Body

application/json

Reversal details

reason
string
required

Why this reversal is being made (1-500 chars)

Required string length: 1 - 500
Example:

"Customer refund request"

amount
string

Amount to reverse for raw or AMOUNT_BASED redemptions (omit for full reversal, decimal string)

Example:

"500.00"

idempotency_key
string

Prevents duplicate reversals when retrying requests

Example:

"reverse-12345"

quantity
integer

Units to reverse for UNIT_BASED catalog redemptions (omit for full reversal)

Example:

1

Response

Duplicate request (idempotency key matched, returns existing record)

amount
string

Amount credited back to the participant's balance (decimal string)

Example:

"500.00"

created_at
string<date-time>

When this reversal was created

Example:

"2024-01-15T10:30:00Z"

id
string<uuid>

Unique identifier for this reversal

Example:

"550e8400-e29b-41d4-a716-446655440000"

journal_entry_id
string<uuid>

The ledger journal entry created by this reversal

Example:

"550e8400-e29b-41d4-a716-446655440002"

quantity
integer

Units reversed (UNIT_BASED catalog redemptions only)

Example:

1

reason
string

Why this reversal was made

Example:

"Customer refund request"

redemption_id
string<uuid>

The redemption that was reversed

Example:

"550e8400-e29b-41d4-a716-446655440001"