> ## Documentation Index
> Fetch the complete documentation index at: https://help-loyalife.xoxoday.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Redeem Points

> Deduct points from a member's balance to complete a redemption transaction.

Deducts a specified number of points from a member's balance to fulfil a redemption — for a hotel booking, flight, gift card, or charitable donation. **Partial redemption is not supported** — points must cover the full transaction value.

The points-to-currency conversion rate is **configurable per program** — there is no fixed global rate. Confirm the rate with your Xoxoday implementation contact to calculate `Points` from the cart `Amount` correctly.

This call is irreversible on its own; if downstream fulfilment fails after points are deducted, you must call [Reversal Points](/api-reference/payment-gateway/reversal-points) to restore the balance. Always call [Check Availability](/api-reference/payment-gateway/check-availability) first, and store the `ExternalReference` UUID returned here immediately.

<Warning>
  Save the `ExternalReference` UUID immediately. If downstream fulfillment fails, you'll need it to call [Reversal Points](/api-reference/payment-gateway/reversal-points) and restore the member's balance.
</Warning>

## LoyaltyTxnType Values

| Value | Category                |
| ----- | ----------------------- |
| `4`   | Miles / Points Transfer |
| `5`   | Hotel                   |
| `6`   | Air / Flight            |
| `19`  | Charity                 |
| `30`  | Gift Card               |

<Note>
  Additional `LoyaltyTxnType` values may be configured for your program. Use `etc.` values from your onboarding documentation if your redemption category is not listed above.
</Note>

## Responses

<AccordionGroup>
  <Accordion title="200 — Success">
    | Path                       | Type          | Description                                                                 |
    | -------------------------- | ------------- | --------------------------------------------------------------------------- |
    | `results.IsSucessful`      | boolean       | `true`                                                                      |
    | `results.ErrorCode`        | string        | `000`                                                                       |
    | `results.ExceptionMessage` | string        | `Success`                                                                   |
    | `results.ReturnObject`     | string (UUID) | **`ExternalReference` for this transaction. Store for potential reversal.** |
  </Accordion>
</AccordionGroup>

***

## Error Codes

| Code  | ExceptionMessage                 | Cause                                                  |
| ----- | -------------------------------- | ------------------------------------------------------ |
| `000` | Success                          | Points deducted; redemption details in the response    |
| `103` | Member does not exist            | `RelationReference` not found in the program           |
| `107` | Member status is not Active      | Member has not been activated                          |
| `113` | Member is cancelled              | Member account is cancelled                            |
| `114` | Member is suspended              | Member account is suspended                            |
| `120` | Points must be greater than zero | `Points` value is 0 or negative                        |
| `208` | Merchant name missing            | `MerchantName` not provided in the request             |
| `301` | Failed to redeem points          | Redemption operation failed                            |
| `302` | Insufficient points              | Points requested exceed the member's available balance |
| `997` | Exception occurred               | Unexpected server-side error                           |
| `999` | Bad request                      | Malformed payload or missing required fields           |


## OpenAPI

````yaml POST /lbms-ingress/pg-lm/API/PG/RedeemPoints
openapi: 3.1.0
info:
  title: Loyalife LBMS API
  description: >-
    REST API for Loyalife's Loyalty Management System. Covers member management,
    OTP authentication, loyalty transactions, and points redemption.
  version: 1.0.0
  contact:
    name: Xoxoday Support
    email: support@xoxoday.com
servers:
  - url: https://loyalife-api.xoxoday.in
    description: Production
security:
  - bearerAuth: []
paths:
  /lbms-ingress/pg-lm/API/PG/RedeemPoints:
    post:
      tags:
        - Points Redemption
      summary: Redeem Points
      description: >-
        Deduct points from a member's balance. Returns an `ExternalReference`
        UUID — save it for potential reversals.
      operationId: redeemPoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - RelationReference
                - Amount
                - Points
                - MerchantName
                - LoyaltyTxnType
                - TransactionCurrency
                - RelationType
                - ProgramId
              properties:
                RelationReference:
                  type: string
                  example: jane.doe@example.com
                Amount:
                  type: number
                  description: Monetary value equivalent of the redemption
                  example: 500
                Points:
                  type: integer
                  description: Number of points to deduct
                  example: 500
                MerchantName:
                  type: string
                  description: Merchant or redemption channel name
                  example: Amazon
                LoyaltyTxnType:
                  type: integer
                  description: >-
                    Redemption category. 4=Miles/Points Transfer, 5=Hotel,
                    6=Air, 19=Charity, 30=Gift Card
                  enum:
                    - 4
                    - 5
                    - 6
                    - 19
                    - 30
                  example: 30
                TransactionCurrency:
                  type: string
                  example: DEFAULT
                RelationType:
                  type: integer
                  description: Use `4` for customers
                  example: 4
                ProgramId:
                  type: integer
                  example: 19
            example:
              RelationReference: jane.doe@example.com
              Amount: 500
              Points: 500
              MerchantName: Amazon
              LoyaltyTxnType: 30
              TransactionCurrency: DEFAULT
              RelationType: 4
              ProgramId: 19
      responses:
        '200':
          description: Points redeemed — `ReturnObject` is the ExternalReference UUID
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: object
                    properties:
                      IsSucessful:
                        type: boolean
                      ErrorCode:
                        type: string
                      ExceptionMessage:
                        type: string
                      ReturnObject:
                        type: string
                        format: uuid
                        description: >-
                          ExternalReference UUID. Store this — required for
                          ReversalPoints if fulfillment fails.
                        example: 3FA85F64-5717-4562-B3FC-2C963F66AFA6
              example:
                results:
                  IsSucessful: true
                  ErrorCode: '000'
                  ExceptionMessage: Success
                  ReturnObject: 3FA85F64-5717-4562-B3FC-2C963F66AFA6
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT obtained from Generate Auth Token. Pass as `Authorization: bearer
        {token}`.

````