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

url = "https://api.whop.com/api/v1/card_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/card_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/card_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/card_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/card_transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/card_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
{
  "authorization_method": "ecommerce",
  "card_id": "<string>",
  "cashback_usd_amount": 6.9,
  "created_at": "2023-12-01T05:00:00.401Z",
  "currency": "USD",
  "declined_reason": "insufficient_funds",
  "id": "<string>",
  "international": true,
  "local_amount": 6.9,
  "memo": "Team dinner",
  "merchant_category": "Software",
  "merchant_category_code": "5734",
  "merchant_icon_url": "https://logo.clearbit.com/example.com",
  "merchant_name": "Acme Corporation",
  "posted_at": "2023-12-01T05:00:00.401Z",
  "transaction_type": "spend",
  "usd_amount": 6.9
}
{
"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 card transaction ID (citx_xxx).

Response

A successful response

A card transaction record.

authorization_method
string | null
required

How the card was presented or authenticated for the purchase.

Example:

"ecommerce"

card_id
string
required

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

cashback_usd_amount
number | null
required

The cashback reward amount earned on this transaction, in USD.

Example:

6.9

created_at
string<date-time>
required

The datetime the card transaction was created.

Example:

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

currency
string | null
required

The ISO 4217 currency code for the transaction amount.

Example:

"USD"

declined_reason
string | null
required

The issuer-provided reason the transaction was declined.

Example:

"insufficient_funds"

id
string
required

The unique identifier for the card transaction.

international
boolean
required

Whether the transaction was made with a merchant outside the card's home country.

local_amount
number | null
required

The transaction amount in the merchant's local currency before conversion.

Example:

6.9

memo
string | null
required

A user-provided note attached to the transaction.

Example:

"Team dinner"

merchant_category
string | null
required

The enriched or raw category label for the merchant.

Example:

"Software"

merchant_category_code
string | null
required

The four-digit ISO 18245 merchant category code (MCC).

Example:

"5734"

merchant_icon_url
string | null
required

A URL to the enriched merchant logo image.

Example:

"https://logo.clearbit.com/example.com"

merchant_name
string | null
required

The enriched or raw name of the merchant where the purchase was made.

Example:

"Acme Corporation"

posted_at
string<date-time> | null
required

When the transaction was settled by the card network.

Example:

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

status
enum<string>
required

The current lifecycle status of the transaction.

Available options:
pending,
completed,
reversed,
declined
transaction_type
string
required

The type of transaction.

Example:

"spend"

usd_amount
number | null
required

The transaction amount in USD.

Example:

6.9