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

# Award Tokens

This endpoint will let you distribute tokens towards a user. There are two options:

* When Allowance is set to true, then the tokens will be stored as an allowance. With the Allowance api, the user will be able to see how much they have of a certain token and they will be able to mint it themselves.
* When Allowance is set to false, then the tokens will be distributed right away. To use this feature, funds need to be put in into the wallet (see 'Fund Wallet'). If there isn't enough, it will be queued until the funds are there. The destination wallet will need to be filled in as well in the request.

There is one exception. If a DB contract Guid is used, then the Allowance will need to be set to true and IsMintable will be set to false in the backend. The Wallet will be removed as well.


## OpenAPI

````yaml POST /AwardTokens
openapi: 3.1.0
info:
  title: PayInGame Public API
  description: >-
    REST API for accessing games, products, prices, languages, receipts, and
    payments.
  version: 1.0.0
servers:
  - url: https://intern.payingame.io/rest/PayIngame/PublicAPI
security: []
paths:
  /AwardTokens:
    post:
      summary: Award or allow tokens for a user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  required:
                    - ApiKey
                    - RequestID
                    - ProjectGuid
                    - IsAllowance
                    - IsMintable
                    - CustomerID
                    - Tokens
                  properties:
                    ApiKey:
                      type: string
                    RequestID:
                      type: string
                      format: uuid
                      description: >-
                        A unique UUID that will uniquely identify the request.
                        This to avoid resending of the same amount
                    ProjectGuid:
                      type: string
                      format: uuid
                    IsAllowance:
                      type: boolean
                      enum:
                        - false
                      description: >-
                        When IsAllowance is set to false, then the tokens will
                        immediately be minted or moved to the wallet that is
                        given.
                    IsMintable:
                      type: boolean
                      enum:
                        - false
                      description: >-
                        Determines if the allowance is mintable or not. Will be
                        ignored when IsAllowance is set to false.
                    Wallet:
                      type: string
                      description: >-
                        Required when IsAllowance is false. This is the wallet
                        where the tokens will be sent. Will only be used in case
                        of IsAllowance is false. Otherwise will be ignored
                    CustomerID:
                      type: string
                    Tokens:
                      type: array
                      minItems: 1
                      items:
                        type: object
                        required:
                          - Guid
                          - Amount
                        properties:
                          Guid:
                            type: string
                            format: uuid
                          Amount:
                            type: number
                          ContractGuid:
                            type: string
                            minItems: 0
                            description: >-
                              Only needed if you want to award tokens to a
                              certain chain. Mandatory if IsAllowance is false.
                              Click [Here](/api-reference/endpoint/tokens) for
                              more info on how to get the Contract Guid.
      responses:
        '200':
          description: Award tokens response
          content:
            application/json:
              schema:
                type: object
                properties:
                  isError:
                    type: string
                    example: '0'
                  Error:
                    type: string
                    example: ''
                required:
                  - isError
                  - Error

````