> ## 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 Google Play Transaction

> Registers the mapping between a user and their Google Play purchaseToken.



## OpenAPI

````yaml post /users/{app_user_id}/transactions/google-play
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/google-play:
    post:
      tags:
        - Users
      summary: Register Google Play Transaction
      description: >-
        Registers the mapping between a user and their Google Play
        purchaseToken.
      operationId: registerGooglePlayTransaction
      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/UserRegisterGooglePlayTransactionRequest'
      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:
    UserRegisterGooglePlayTransactionRequest:
      type: object
      properties:
        purchase_token:
          type: string
          nullable: false
          example: opaque-purchase-token-string
          description: Google Play's purchaseToken from the purchase flow.
        obfuscated_external_account_id:
          type: string
          nullable: true
          example: user-account-id-hash
          description: >-
            Set in BillingFlowParams.setObfuscatedAccountId() — used for better
            matching.
      required:
        - purchase_token
    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

````