Skip to main content
POST
/
currencies
/
{currency_id}
/
credit
Credit a player balance for a currency
curl --request POST \
  --url https://togacha.com/currencies/{currency_id}/credit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "amount": "50.00"
}
'
{
  "data": {
    "balance": {
      "amount": "150.00"
    }
  }
}

Authorizations

apikey
string
header
required

API key authentication for accessing platform resources.

To authenticate, include your app's API key in the 'apikey' header.

Each API key is associated with a specific app and organization. The API key determines which organization and app context your requests operate within.

Example: apikey: tgc_public_1234567890abcdef

Authorization
string
header
required

JWT token authentication for player-specific operations.

Obtain a JWT token by calling /players/login or /players/register. Include the token in the Authorization header.

Example: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Path Parameters

currency_id
string<uuid>
required

Unique identifier of the currency

Body

application/json
amount
string
required

Amount to credit as decimal string

Pattern: ^\d+(\.\d{1,2})?$
Example:

"50.00"

Response

Successfully credited the balance

data
any