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

# Register App Store Transaction

> Registers the mapping between a user and their Apple originalTransactionId.



## OpenAPI

````yaml post /users/{app_user_id}/transactions/app-store
openapi: 3.0.0
info:
  title: WinWinKit API
  description: An API for interacting with WinWinKit.
  version: '1.0'
  contact:
    name: WinWinKit
    url: https://winwinkit.com
    email: support@winwinkit.com
servers:
  - url: https://api.winwinkit.com
    description: Production
security: []
tags:
  - name: Users
    description: User endpoints
  - name: Claim Actions
    description: Claim actions endpoints
  - name: Rewards Actions
    description: Rewards actions endpoints
paths:
  /users/{app_user_id}/transactions/app-store:
    post:
      tags:
        - Users
      summary: Register App Store Transaction
      description: >-
        Registers the mapping between a user and their Apple
        originalTransactionId.
      operationId: registerAppStoreTransaction
      parameters:
        - name: app_user_id
          required: true
          in: path
          description: The app user id of the user.
          schema:
            type: string
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: The API key to authenticate with.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRegisterAppStoreTransactionRequest'
      responses:
        '204':
          description: The transaction mapping has been registered.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: The user has not been found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
components:
  schemas:
    UserRegisterAppStoreTransactionRequest:
      type: object
      properties:
        original_transaction_id:
          type: string
          nullable: false
          example: '2000000123456789'
          description: Apple's originalTransactionId from StoreKit.
        app_account_token:
          type: string
          nullable: true
          example: 550e8400-e29b-41d4-a716-446655440000
          description: StoreKit 2 appAccountToken UUID.
      required:
        - original_transaction_id
    ErrorsResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
      description: Errors Response
      required:
        - errors
    ErrorObject:
      type: object
      properties:
        code:
          type: string
        status:
          type: integer
        message:
          type: string
        source:
          type: string
          nullable: true
      description: Error Object
      required:
        - code
        - status
        - message
        - source

````