Skip to main content
POST
/
AwardTokens
Award or allow tokens for a user
curl --request POST \
  --url https://intern.payingame.io/rest/PayIngame/PublicAPI/AwardTokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "ApiKey": "<string>",
  "RequestID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ProjectGuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "IsAllowance": false,
  "IsMintable": false,
  "CustomerID": "<string>",
  "Tokens": [
    {
      "Guid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "Amount": 123,
      "ContractGuid": "<string>"
    }
  ],
  "Wallet": "<string>"
}
'
{
  "isError": "0",
  "Error": ""
}
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.

Body

application/json
ApiKey
string
required
RequestID
string<uuid>
required

A unique UUID that will uniquely identify the request. This to avoid resending of the same amount

ProjectGuid
string<uuid>
required
IsAllowance
enum<boolean>
required

When IsAllowance is set to false, then the tokens will immediately be minted or moved to the wallet that is given.

Available options:
false
IsMintable
enum<boolean>
required

Determines if the allowance is mintable or not. Will be ignored when IsAllowance is set to false.

Available options:
false
CustomerID
string
required
Tokens
object[]
required
Minimum array length: 1
Wallet
string

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

Response

200 - application/json

Award tokens response

isError
string
required
Example:

"0"

Error
string
required
Example:

""