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

# Claim a voucher to the user's wallet

> Adds a wallet-flow voucher to the user's saved list. Required before the same voucher can be redeemed at an outlet. Idempotent — calling twice returns the original claim row with HTTP 200. Only works for vouchers whose `claimFlow` is `WALLET`; instant-flow vouchers are redeemed directly without claiming first. If the user's partner has a restricted scope, claiming an out-of-scope voucher returns 403.



## OpenAPI

````yaml /openapi.json post /me/claims
openapi: 3.1.0
info:
  title: Voucher Platform — Partner Integration API
  version: 1.0.0
  description: >-
    Server-to-server and consumer endpoints used by partner apps to provision
    users, embed the voucher webview, and receive lifecycle webhooks. See the
    [partner integration guide](/docs) for the full narrative including JWT
    setup, HMAC signing, and a worked end-to-end example.
servers:
  - url: http://localhost:4000
    description: Local development
security: []
tags:
  - name: Integrations
    description: >-
      Server-to-server endpoints called from the partner backend. Authenticated
      with an HMAC signature.
  - name: Consumer
    description: >-
      Called from inside the partner-issued webview (or partner-native UI) on
      behalf of an end user. Authenticated with a partner-signed JWT.
paths:
  /me/claims:
    post:
      tags:
        - Consumer
      summary: Claim a voucher to the user's wallet
      description: >-
        Adds a wallet-flow voucher to the user's saved list. Required before the
        same voucher can be redeemed at an outlet. Idempotent — calling twice
        returns the original claim row with HTTP 200. Only works for vouchers
        whose `claimFlow` is `WALLET`; instant-flow vouchers are redeemed
        directly without claiming first. If the user's partner has a restricted
        scope, claiming an out-of-scope voucher returns 403.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - voucherId
              additionalProperties: false
              properties:
                voucherId:
                  type: string
                  format: uuid
                  description: >-
                    Voucher to claim. Get this from the catalog browsing
                    endpoints or the webview deep-link.
      responses:
        '200':
          description: Claim already existed; returned unchanged.
          content:
            application/json:
              schema:
                description: Claim already existed; returned unchanged.
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    format: uuid
                  userId:
                    type: string
                    format: uuid
                  voucherId:
                    type: string
                    format: uuid
                  claimedAt:
                    type: string
                    format: date-time
        '201':
          description: New claim created.
          content:
            application/json:
              schema:
                description: New claim created.
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    format: uuid
                  userId:
                    type: string
                    format: uuid
                  voucherId:
                    type: string
                    format: uuid
                  claimedAt:
                    type: string
                    format: date-time
        '403':
          description: >-
            Voucher belongs to a merchant or category outside this partner's
            scope.
          content:
            application/json:
              schema:
                description: >-
                  Voucher belongs to a merchant or category outside this
                  partner's scope.
                type: object
                additionalProperties: true
                properties:
                  error:
                    type: string
                    example: voucher_out_of_scope
        '404':
          description: Voucher does not exist.
          content:
            application/json:
              schema:
                description: Voucher does not exist.
                type: object
                additionalProperties: true
                properties:
                  error:
                    type: string
                    example: voucher_not_found
        '422':
          description: >-
            Voucher cannot be claimed. `error` is one of `voucher_inactive`,
            `voucher_not_wallet_flow`, `voucher_not_yet_valid`,
            `voucher_expired`.
          content:
            application/json:
              schema:
                description: >-
                  Voucher cannot be claimed. `error` is one of
                  `voucher_inactive`, `voucher_not_wallet_flow`,
                  `voucher_not_yet_valid`, `voucher_expired`.
                type: object
                additionalProperties: true
                properties:
                  error:
                    type: string
      security:
        - BearerJwt: []
components:
  securitySchemes:
    BearerJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer JWT signed by your app, with `iss` matching the issuer registered
        on the partner record. Verified against your JWKS URL or static public
        key.

````