Reverse Redeemed Points

Lets you reverse a set of points that are redeemed in a transaction. For example, you can use this API to reverse points redeemed for a transaction if the transaction is returned.

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

Reverses points that were redeemed in a transaction. Use this API to restore points to a customer's wallet when a transaction is returned or a redemption is cancelled. For cross-member group redemptions, points are restored to each source member's wallet in the amounts originally drawn.

What this API supports

  • Reverse redeemed points for an individual customer's wallet.
  • Reverse a cross-member group redemption, restoring points to each source member's wallet in the amounts originally drawn.
  • Per-source-member breakdown in the response (crossMemberReversalBreakup[]) showing exactly whose points were restored and how much was expired at the time of reversal.
  • Backward compatible: for individual (non-group) reversals, crossMemberReversalBreakup is absent from the response and all existing fields are unchanged.

Example request

curl --location 'https://eu.api.capillarytech.com/v2/points/reverse' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkaMjU2YQ==' \
--header 'Cookie: _cfuvid=7165ECtxDm51hFGZ_zSJYF7reiBXgk4OldF_d7_82Iw-1761202117837-0.0.1.1-604800000' \
--data '{
    "redemptionId": "gWpna6",
    "pointsToBeReversed": 2,
    
    "identifier": {
        "type": "ID",
        "value": "564847023"
    }
}'
curl --location 'https://eu.api.capillarytech.com/v2/points/reverse' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkaMjU2YQ==' \
--header 'Cookie: _cfuvid=7165ECtxDm51hFGZ_zSJYF7reiBXgk4OldF_d7_82Iw-1761202117837-0.0.1.1-604800000' \
--data '{
    "externalReferenceNumber": "ORD-2024-98765",
    "pointsToBeReversed": 2,
    "identifier": {
        "type": "ID",
        "value": "564847023"
    }
}'

Prerequisites

The following configurations are required for points/reverse API

  • Enable Allow_points_redemption_reversal config on EMF settings. Only the back-end team has access to this page. Please raise a ticket to enable the config. For more information on this feature, click here.
  • Enable V2 API as points reversal is supported only V2.0.

Body parameters

FieldTypeRequiredDescription
redemptionIdStringConditionalThe unique identifier returned in the response of the Redeem Points API. Provide either redemptionId or externalReferenceNumber, not both.
externalReferenceNumberStringConditionalThe reference number you provided when the points were redeemed using the Redeem Points API. Provide either externalReferenceNumber or redemptionId, not both.
pointsToBeReversedNumberOptionalNumber of points to be reversed. If not provided, all redeemed points are reversed.
identifierObjectRequiredObject containing customer identification details.
.typeStringRequiredType of customer identifier. Must be one of: ID, PHONE, EMAIL.
.valueStringRequiredUnique value of the customer identifier.

API Quick Reference

POST /v2/points/reverse
   ├─ redemptionId (string, conditional)
   ├─ externalReferenceNumber (string, conditional)
   ├─ pointsToBeReversed (number)
   └─ identifier (object)
       ├─ type (string)
       └─ value (string)

Response
   ├─ orgId (number)
   ├─ identifier (object)
   │   ├─ type (string)
   │   └─ value (string)
   ├─ customerId (number)
   ├─ redemptionId (string)
   ├─ externalReferenceNumber (string)
   ├─ reversalId (string)
   ├─ pointsToBeReversed (number)
   ├─ pointsReversed (number)
   ├─ pointsReversedDetails (object)
   │   ├─ available (number)
   │   └─ expired (number)
   ├─ crossMemberReversalBreakup (array)
   │   ├─ memberId (long)
   │   ├─ pointsRestored (number)
   │   ├─ pointsExpiredByReversal (number)
   │   ├─ expiryBatchDate (string)
   │   └─ status (string)
   ├─ warnings (array)
   └─ errors (array)

Example response

{
    "orgId": 100737,
    "identifier": {
        "type": "ID",
        "value": "564847023"
    },
    "customerId": 564847023,
    "redemptionId": "gWpna6",
    "pointsToBeReversed": 2.0,
    "pointsReversed": 2.0,
    "pointsReversedDetails": {
        "available": 2.0,
        "expired": 0.0
    },
    "warnings": []
}
{
    "orgId": 100737,
    "identifier": {
        "type": "ID",
        "value": "564847023"
    },
    "customerId": 564847023,
    "redemptionId": "gWpna6",
    "externalReferenceNumber": "ORD-2024-98765",
    "pointsToBeReversed": 2.0,
    "pointsReversed": 2.0,
    "pointsReversedDetails": {
        "available": 2.0,
        "expired": 0.0
    },
    "warnings": [],
    "errors": []
}
{
    "orgId": 100737,
    "identifier": {
        "type": "ID",
        "value": "564847023"
    },
    "customerId": 564847023,
    "redemptionId": "gWpna6",
    "pointsToBeReversed": 350.0,
    "pointsReversed": 350.0,
    "pointsReversedDetails": {
        "available": 330.0,
        "expired": 20.0
    },
    "crossMemberReversalBreakup": [
        {
            "memberId": 564847024,
            "pointsRestored": 100.0,
            "pointsExpiredByReversal": 0.0,
            "expiryBatchDate": "2026-04-10T00:00:00Z",
            "status": "REVERSED"
        },
        {
            "memberId": 564847025,
            "pointsRestored": 250.0,
            "pointsExpiredByReversal": 20.0,
            "expiryBatchDate": "2026-03-15T00:00:00Z",
            "status": "REVERSED"
        }
    ],
    "warnings": []
}

Response parameters

ParameterTypeDescription
orgIdNumberUnique identifier for the organization.
identifierObjectObject containing customer identification details.
-typeStringType of customer identifier.
-valueStringUnique value of the customer identifier.
customerIdNumberUnique internal identifier for the customer.
redemptionIdStringThe unique identifier for the original redemption transaction. When externalReferenceNumber is used in the request, the system resolves it to the internal redemptionId and returns it here.
externalReferenceNumberStringThe reference number provided at redemption time. This field is only present in the response when externalReferenceNumber was used in the request.
reversalIdStringUnique identifier for the reversal transaction.
pointsToBeReversedNumberNumber of points requested to be reversed.
pointsReversedNumberNumber of points actually reversed.
pointsReversedDetailsObjectBreakdown of points reversed by type. Only unexpired (available) points are credited back. Expired points are not restored.
-availableNumberPoints reversed from the active or available balance.
-expiredNumberPoints that were expired and not restored.
warningsArrayList of warnings, if any.
errorsArrayList of errors, if any.
crossMemberReversalBreakupArrayObject containing details of the points reversed and members to whom the points were reversed. Present only when the reversed redemption was a cross-member group redemption. null for individual-member reversals.
.memberIdLongCustomer ID of the group member whose points was reversed.
.pointsRestoredNumberTotal number of points reversed for the customer.
.pointsExpiredByReversalNumberPortion of pointsRestored that could not be re-credited because the underlying points allocation had already expired. Zero on a standard reversal.
.expiryBatchDateStringOriginal expiry date of the points allocation restored to this member. ISO-8601 timestamp.
.statusStringStatus of the cross-member redemption log row after this reversal was applied.

Error & warning codes

CodeError numberTypeDescription
804ErrorUnable to process points reversal request. General failure while processing the reversal request. Check parameters and try again.
817ErrorPoints reversal failed due to insufficient points. The customer does not have enough points available for reversal.
818ErrorPoints reversal not allowed for this program. Reversal is not permitted for the given program configuration.
827ErrorUnable to reverse points; reversal is enabled. Reversal conditions were not met despite being enabled for the organization.
878ErrorPoints decimal precision not supported. Points value has more than 3 decimal places; maximum supported precision exceeded.
885ErrorInvalid program ID. The specified program ID is invalid or not applicable for reversal.
886ErrorPoints reversal failed due to a temporary system error. Internal system issue. Retry the request later.
887ErrorPoints reversal failed due to a validation error. Provided parameters are invalid or failed server-side validation checks.
888ErrorInvalid configuration detected. System configuration error; raise a JIRA ticket to the Capillary product support team.
896ErrorPoints reversal could not be processed. Temporary failure; retry after some time.
898ErrorPoints reversal currently unavailable. The reversal service is temporarily unavailable; retry later.
899ErrorMisconfigured program setup. Program setup issue; raise a JIRA ticket to the Capillary product support team.
901ErrorInvalid redemption identifier. Fires when neither redemptionId nor externalReferenceNumber is provided, or when the provided identifier is invalid.
902ErrorDuplicate reversal request. A duplicate reversal request has been detected.
903ErrorReversal limit exceeded. Customer has reached the allowed reversal limit.
904ErrorPoints reversal locked for this customer. Points reversal operations are temporarily locked for this customer account.
907ErrorIdentifier conflict. Both redemptionId and externalReferenceNumber were provided. Provide only one.
Body Params
string
required

Unique ID of the points redemption to be reversed. This redemption Id will be available in the response of the points redeem API.

float

Number of points to be reversed.

identifier
object

Details of the customer.

Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json