v8

OpenAPI 3.1.02026-08-033623795.0 MB
Company token transactions

Create company token transaction

Create a token transaction to add, subtract, or transfer tokens for a member within a company.

Required permissions:

  • company_token_transaction:create
  • member:basic:read
  • company:basic:read
post/company_token_transactions

Request body

OR
OR

Example request

{
  "amount": 6.9,
  "company_id": "biz_xxxxxxxxxxxxxx",
  "user_id": "user_xxxxxxxxxxxxx"
}

Response

A successful response

amountnumber required

The token amount for this transaction. Always a positive value regardless of transaction type.

created_atstring date-time required

The datetime the company token transaction was created.

descriptionstring nullable required

Free-text description explaining the reason for this token transaction. Null if no description was provided.

idstring required

The unique identifier for the company token transaction.

idempotency_keystring nullable required

A unique key used to prevent duplicate transactions when retrying API requests. Null if no idempotency key was provided.

linked_transaction_idstring nullable required

The ID of the corresponding transaction on the other side of a transfer. Null if this is not a transfer transaction.

transaction_type'add' | 'subtract' | 'transfer' required

The type of token transaction

Example response

{
  "amount": 6.9,
  "company": {
    "id": "biz_xxxxxxxxxxxxxx"
  },
  "created_at": "2023-12-01T05:00:00.401Z",
  "description": "Reward for completing onboarding",
  "idempotency_key": "txn_reward_usr_123_2024",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  }
}