curl --request GET \
--url https://api.kit.com/v4/purchases \
--header 'Authorization: Bearer <token>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/purchases")
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_bodyconst options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kit.com/v4/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kit.com/v4/purchases"
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/purchases",
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;
}import requests
url = "https://api.kit.com/v4/purchases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchases": [
{
"id": 3,
"transaction_id": "512-41-4101",
"status": "paid",
"source": "Gumroad",
"email_address": "pru.magoo@convertkit.dev",
"subscriber_id": 13,
"currency": "USD",
"transaction_time": "2023-02-17T11:43:55Z",
"subtotal": 5,
"discount": 0,
"tax": 0,
"total": 5,
"products": [
{
"quantity": 1,
"lid": "000-13-0000",
"unit_price": 0.05,
"sku": null,
"name": "Tip",
"pid": "111-75-7524"
}
]
},
{
"id": 2,
"transaction_id": "323-79-5320",
"status": "paid",
"source": "Gumroad",
"email_address": "pru.magoo@convertkit.dev",
"subscriber_id": 13,
"currency": "USD",
"transaction_time": "2023-02-17T11:43:55Z",
"subtotal": 10,
"discount": 0,
"tax": 1.05,
"total": 11.05,
"products": [
{
"quantity": 1,
"lid": "000-12-0000",
"unit_price": 0.1,
"sku": null,
"name": "Monthly Game Review",
"pid": "000-11-0000"
}
]
},
{
"id": 1,
"transaction_id": "796-92-4892",
"status": "paid",
"source": "Gumroad",
"email_address": "pru.magoo@convertkit.dev",
"subscriber_id": 13,
"currency": "USD",
"transaction_time": "2023-02-17T11:43:55Z",
"subtotal": 78.66,
"discount": 5,
"tax": 7.87,
"total": 81.53,
"products": [
{
"quantity": 1,
"lid": "811-75-7900",
"unit_price": 23.22,
"sku": null,
"name": "Phantom Hourglass",
"pid": "804-02-4430"
},
{
"quantity": 1,
"lid": "766-49-1241",
"unit_price": 32.22,
"sku": null,
"name": "Twilight Princess",
"pid": "833-51-1151"
}
]
}
],
"pagination": {
"has_previous_page": false,
"has_next_page": false,
"start_cursor": "WzNd",
"end_cursor": "WzFd",
"per_page": 500
}
}{
"errors": [
"The access token is invalid"
]
}List purchases
Returns a cursor-paginated list of purchases recorded in the account, typically imported from e-commerce platforms. Each purchase includes its transaction_id, status, source (e.g. the originating platform), the buyer’s email_address and subscriber_id, monetary breakdown (subtotal, discount, tax, total, currency), and the purchased products.
To record a new purchase, use Create a purchase.
curl --request GET \
--url https://api.kit.com/v4/purchases \
--header 'Authorization: Bearer <token>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/purchases")
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_bodyconst options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kit.com/v4/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kit.com/v4/purchases"
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/purchases",
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;
}import requests
url = "https://api.kit.com/v4/purchases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchases": [
{
"id": 3,
"transaction_id": "512-41-4101",
"status": "paid",
"source": "Gumroad",
"email_address": "pru.magoo@convertkit.dev",
"subscriber_id": 13,
"currency": "USD",
"transaction_time": "2023-02-17T11:43:55Z",
"subtotal": 5,
"discount": 0,
"tax": 0,
"total": 5,
"products": [
{
"quantity": 1,
"lid": "000-13-0000",
"unit_price": 0.05,
"sku": null,
"name": "Tip",
"pid": "111-75-7524"
}
]
},
{
"id": 2,
"transaction_id": "323-79-5320",
"status": "paid",
"source": "Gumroad",
"email_address": "pru.magoo@convertkit.dev",
"subscriber_id": 13,
"currency": "USD",
"transaction_time": "2023-02-17T11:43:55Z",
"subtotal": 10,
"discount": 0,
"tax": 1.05,
"total": 11.05,
"products": [
{
"quantity": 1,
"lid": "000-12-0000",
"unit_price": 0.1,
"sku": null,
"name": "Monthly Game Review",
"pid": "000-11-0000"
}
]
},
{
"id": 1,
"transaction_id": "796-92-4892",
"status": "paid",
"source": "Gumroad",
"email_address": "pru.magoo@convertkit.dev",
"subscriber_id": 13,
"currency": "USD",
"transaction_time": "2023-02-17T11:43:55Z",
"subtotal": 78.66,
"discount": 5,
"tax": 7.87,
"total": 81.53,
"products": [
{
"quantity": 1,
"lid": "811-75-7900",
"unit_price": 23.22,
"sku": null,
"name": "Phantom Hourglass",
"pid": "804-02-4430"
},
{
"quantity": 1,
"lid": "766-49-1241",
"unit_price": 32.22,
"sku": null,
"name": "Twilight Princess",
"pid": "833-51-1151"
}
]
}
],
"pagination": {
"has_previous_page": false,
"has_next_page": false,
"start_cursor": "WzNd",
"end_cursor": "WzFd",
"per_page": 500
}
}{
"errors": [
"The access token is invalid"
]
}Authorizations
Authenticate API requests via an OAuth token
Query Parameters
To fetch next page of results, use ?after=<end_cursor>
To fetch previous page of results, use ?before=<start_cursor>
Set to true to include the total_count in the response. This option can cause slow responses; if paging through results, request it only on the first page and reuse the value for subsequent pages.
Number of results per page. Default 500, maximum 1000.
Was this page helpful?