TypeScript SDK
import { Creem } from "creem";
const creem = new Creem({
apiKey: process.env["CREEM_API_KEY"] ?? "",
});
async function run() {
const result = await creem.transactions.search("cust_1234567890", "ord_1234567890", "prod_1234567890");
console.log(result);
}
run();curl --request GET \
--url https://api.creem.io/v1/transactions/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/transactions/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/transactions/search', 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.creem.io/v1/transactions/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.creem.io/v1/transactions/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.creem.io/v1/transactions/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/transactions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"mode": "test",
"object": "transaction",
"amount": 2000,
"currency": "USD",
"type": "payment",
"status": "pending",
"created_at": 123,
"amount_paid": 2000,
"discount_amount": 2000,
"tax_country": "US",
"tax_amount": 2000,
"refunded_amount": 2000,
"order": "<string>",
"subscription": "<string>",
"customer": "<string>",
"description": "<string>",
"period_start": 123,
"period_end": 123
}
],
"pagination": {
"total_records": 0,
"total_pages": 0,
"current_page": 1,
"next_page": 2,
"prev_page": null
}
}Transactions
List all transactions
Search and retrieve payment transactions. Filter by customer, product, date range, and status.
GET
/
v1
/
transactions
/
search
TypeScript SDK
import { Creem } from "creem";
const creem = new Creem({
apiKey: process.env["CREEM_API_KEY"] ?? "",
});
async function run() {
const result = await creem.transactions.search("cust_1234567890", "ord_1234567890", "prod_1234567890");
console.log(result);
}
run();curl --request GET \
--url https://api.creem.io/v1/transactions/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/transactions/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/transactions/search', 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.creem.io/v1/transactions/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.creem.io/v1/transactions/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.creem.io/v1/transactions/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/transactions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"mode": "test",
"object": "transaction",
"amount": 2000,
"currency": "USD",
"type": "payment",
"status": "pending",
"created_at": 123,
"amount_paid": 2000,
"discount_amount": 2000,
"tax_country": "US",
"tax_amount": 2000,
"refunded_amount": 2000,
"order": "<string>",
"subscription": "<string>",
"customer": "<string>",
"description": "<string>",
"period_start": 123,
"period_end": 123
}
],
"pagination": {
"total_records": 0,
"total_pages": 0,
"current_page": 1,
"next_page": 2,
"prev_page": null
}
}Authorizations
API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.
Query Parameters
Filter transactions by customer ID.
Example:
"cust_1234567890"
Filter transactions by order ID.
Example:
"ord_1234567890"
Filter transactions by product ID.
Example:
"prod_1234567890"
The page number for pagination.
Example:
1
The number of items per page.
Example:
10
⌘I