> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Redeem Receipt

> Redeem one or more entitlements from a receipt. When processing a bulk redemption, if any entitlement is already exhausted, the entire operation is rejected.



## OpenAPI

````yaml post /v1/receipts/{orderNumber}/redeem
openapi: 3.0.3
info:
  title: Monime API
  description: Monime REST API. Please visit https://docs.momime.io/api for more details.
  termsOfService: https://monime.io/legal/terms-of-service
  contact:
    name: Monime Developers
    url: https://github.com/monimesl
    email: dev@monime.io
  version: v1
servers:
  - url: https://api.monime.io/
security:
  - bearerAuth: []
paths:
  /v1/receipts/{orderNumber}/redeem:
    post:
      tags:
        - Receipt
      summary: Redeem Receipt
      description: >-
        Redeem one or more entitlements from a receipt. When processing a bulk
        redemption, if any entitlement is already exhausted, the entire
        operation is rejected.
      operationId: RedeemReceipt
      parameters:
        - name: orderNumber
          in: path
          description: The order number of the receipt to be redeemed.
          required: true
          schema:
            maxLength: 20
            type: string
            description: The order number of the receipt to be redeemed.
        - name: Idempotency-Key
          in: header
          description: >-
            This header is used to uniquely identify a logical request, ensuring
            that it is not processed more than once during retries.
          required: true
          schema:
            maxLength: 64
            type: string
            description: >-
              This header is used to uniquely identify a logical request,
              ensuring that it is not processed more than once during retries.
        - name: Monime-Version
          in: header
          description: Specifies which version of the Monime API will handle this request.
          schema:
            enum:
              - caph.2025-08-23
              - caph.2025-06-20
            type: string
            description: >-
              Specifies which version of the Monime API will handle this
              request.
            nullable: true
        - name: Monime-Space-Id
          in: header
          description: >-
            The value is the tenancy parameter that Monime uses to determine
            which space the request is intended for.
          required: true
          schema:
            maxLength: 64
            pattern: ^spc-.*$
            type: string
            description: >-
              The value is the tenancy parameter that Monime uses to determine
              which space the request is intended for.
      requestBody:
        content:
          application/json:
            schema:
              title: Redeem Receipt
              type: object
              properties:
                redeemAll:
                  type: boolean
                  description: Whether to redeem all entitlements in the receipt.
                  nullable: true
                entitlements:
                  type: array
                  items:
                    required:
                      - key
                    type: object
                    properties:
                      key:
                        maxLength: 100
                        minLength: 1
                        type: string
                        description: >-
                          Stable entitlement key (e.g., SKU, ticket_type, or any
                          identifier unique to the product).
                      units:
                        minimum: 1
                        type: integer
                        description: >-
                          Units of entitlement to redeem. This should not exceed
                          the remaining quantity of the entitlement.
                        default: 1
                  description: >-
                    List of entitlements to redeem. When set, it takes
                    precedence over the 'redeemAll' flag.
                  nullable: true
                metadata:
                  maxProperties: 64
                  type: object
                  additionalProperties:
                    maxLength: 100
                    type: string
                    description: >-
                      Metadata values are free-form strings up to 100
                      characters.
                  description: Optional metadata for attaching context or tracking info.
                  nullable: true
              description: >-
                Redeem one or more entitlements from a receipt. When processing
                a bulk redemption, if any entitlement is already exhausted, the
                entire operation is rejected.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Represents the status of the query operation, confirming
                      if it was successful. This field is always true
                  messages:
                    type: array
                    items: {}
                    description: >-
                      Contains a list of messages providing relevant information
                      or feedback related to the query or operation
                  result:
                    title: Redemption Result
                    type: object
                    properties:
                      redeem:
                        type: boolean
                        description: >-
                          Whether the redemption was successful. This will be
                          false if any of the entitlements had already been
                          exhausted.
                      receipt:
                        $ref: '#/components/schemas/Receipt'
                    description: >-
                      Represents the outcome of redeeming entitlement(s) from a
                      receipt.
components:
  schemas:
    Receipt:
      title: Receipt
      type: object
      properties:
        status:
          enum:
            - not_redeemed
            - partially_redeemed
            - fully_redeemed
          type: string
          description: Lifecycle status of the receipt.
        orderName:
          type: string
          description: Human friendly name of the order.
          nullable: true
        orderNumber:
          type: string
          description: Human-friendly order number.
        orderAmount:
          type: object
          properties:
            currency:
              type: string
              description: >-
                The [3-letter](https://en.wikipedia.org/wiki/ISO_4217) ISO
                currency code. Currently supported: 'SLE', 'USD'
            value:
              type: integer
              description: >-
                The value representation in the currency's minor unit. E.g. For
                1 Leone (SLE 1), the value should be 100, denoting cents, the
                minor unit.
          additionalProperties: false
          description: Total order amount in minor units and currency.
        createTime:
          type: string
          description: The timestamp when the receipt was created.
          format: date-time
        updateTime:
          type: string
          description: The last timestamp when the receipt was updated.
          format: date-time
        entitlements:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                description: >-
                  Stable entitlement key (e.g., SKU, ticket_type, or any unique
                  product identifier).
              name:
                type: string
                description: Human-friendly name of the entitlement.
                nullable: true
              limit:
                minimum: 0
                type: integer
                description: Maximum number of times this entitlement can be redeemed.
              current:
                minimum: 0
                type: integer
                description: Number of times this entitlement has been redeemed so far.
              remaining:
                minimum: 0
                type: integer
                description: Number of redemptions still available (limit - current).
              exhausted:
                type: boolean
                description: >-
                  True if the entitlement has no remaining redemptions (i.e.
                  current == limit).
            description: >-
              **Entitlement** represents a right granted by a receipt that can
              be consumed through redemption.


              Each entitlement has:

              - **key** – a stable identifier for the entitlement (e.g., SKU,
              ticket_type, or any identifier unique to the product).

              - **name** – an optional, human-friendly label for the
              entitlement.

              - **limit** – the maximum number of times the entitlement can be
              redeemed.

              - **current** – the number of times the entitlement has been
              redeemed so far (always less than or equal to limit).

              - **remaining** – how many redemptions are still available
              (calculated as limit - current).

              - **exhausted** – true when the entitlement has been fully
              redeemed (remaining == 0).
          description: >-
            Entitlements granted by this receipt; each can be redeemed until
            exhausted.
          nullable: true
        metadata:
          maxProperties: 64
          type: object
          additionalProperties:
            maxLength: 100
            type: string
            description: Metadata values are free-form strings up to 100 characters.
          description: Optional metadata for attaching context or tracking info.
          nullable: true
      description: >+
        A **Receipt** is a record of entitlements generated by Monime whenever a
        payment completes successfully.  

        It serves as proof of what the customer is entitled to claim — such as
        tickets, vouchers, credits, or digital rights.  

        Receipt links a **payment** via an order to **entitlement claims**,
        enabling both verification and controlled redemption via APIs.   


        ### Use Cases


        - **Purchase Verification**  
          Confirm that a customer’s payment went through and display transaction details in your app without manual reconciliation.  

        - **Ticket & Voucher Redemption**  
          Use receipts as redeemable proof of access — for example, scanning a receipt at an event gate or validating a voucher at checkout.  

        - **Partial Consumption**  
          Support use cases where receipts hold multiple entitlements, such as ride credits or digital assets, and allow them to be redeemed incrementally.  

  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication specified with the header Authorization:
        Bearer <access_token>

````