Skip to main content
GET
/
company_token_transactions
/
{id}
Retrieve company token transaction
curl --request GET \
  --url https://api.whop.com/api/v1/company_token_transactions/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.whop.com/api/v1/company_token_transactions/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.whop.com/api/v1/company_token_transactions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/company_token_transactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.whop.com/api/v1/company_token_transactions/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.whop.com/api/v1/company_token_transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/company_token_transactions/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "amount": 6.9,
  "company": {
    "id": "biz_xxxxxxxxxxxxxx",
    "route": "<string>",
    "title": "<string>"
  },
  "created_at": "2023-12-01T05:00:00.401Z",
  "description": "Reward for completing onboarding",
  "id": "<string>",
  "idempotency_key": "txn_reward_usr_123_2024",
  "linked_transaction_id": "<string>",
  "member": {
    "id": "<string>"
  },
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  }
}
{
"error": {
"code": "parameter_missing",
"message": "Missing required parameter: amount.",
"param": "amount",
"type": "invalid_request_error"
}
}
{
"error": {
"message": "Invalid or missing API key",
"type": "unauthorized"
}
}
{
"error": {
"message": "You do not have permission to access this resource",
"type": "forbidden"
}
}
{
"error": {
"message": "Resource not found",
"type": "not_found"
}
}
{
"error": null
}
{
"error": null
}
{
"error": {
"message": "An unexpected error occurred",
"type": "internal_server_error"
}
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Path Parameters

id
string
required

The unique identifier of the token transaction to retrieve.

Response

A successful response

A token transaction records a credit or debit to a member's token balance within a company, including transfers between members.

amount
number
required

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

Example:

6.9

company
object
required

The company whose token balance this transaction affects.

created_at
string<date-time>
required

The datetime the company token transaction was created.

Example:

"2023-12-01T05:00:00.401Z"

description
string | null
required

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

Example:

"Reward for completing onboarding"

id
string
required

The unique identifier for the company token transaction.

idempotency_key
string | null
required

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

Example:

"txn_reward_usr_123_2024"

linked_transaction_id
string | null
required

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

member
object
required

The member whose token balance was affected by this transaction.

transaction_type
enum<string>
required

The direction of this token transaction (add, subtract, or transfer).

Available options:
add,
subtract,
transfer
user
object
required

The user whose token balance was affected by this transaction.