curl --request POST \
--url https://api.1club.ai/v1/platform/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clubId": 123,
"date": "2023-12-25",
"amount": 123,
"revenueAccountId": 123,
"payment": {
"status": "paid",
"reference": "<string>",
"fee": 123
},
"contactId": 123,
"description": "<string>"
}
'import requests
url = "https://api.1club.ai/v1/platform/transactions"
payload = {
"clubId": 123,
"date": "2023-12-25",
"amount": 123,
"revenueAccountId": 123,
"payment": {
"status": "paid",
"reference": "<string>",
"fee": 123
},
"contactId": 123,
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clubId: 123,
date: '2023-12-25',
amount: 123,
revenueAccountId: 123,
payment: {status: 'paid', reference: '<string>', fee: 123},
contactId: 123,
description: '<string>'
})
};
fetch('https://api.1club.ai/v1/platform/transactions', 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.1club.ai/v1/platform/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clubId' => 123,
'date' => '2023-12-25',
'amount' => 123,
'revenueAccountId' => 123,
'payment' => [
'status' => 'paid',
'reference' => '<string>',
'fee' => 123
],
'contactId' => 123,
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/transactions"
payload := strings.NewReader("{\n \"clubId\": 123,\n \"date\": \"2023-12-25\",\n \"amount\": 123,\n \"revenueAccountId\": 123,\n \"payment\": {\n \"status\": \"paid\",\n \"reference\": \"<string>\",\n \"fee\": 123\n },\n \"contactId\": 123,\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.1club.ai/v1/platform/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clubId\": 123,\n \"date\": \"2023-12-25\",\n \"amount\": 123,\n \"revenueAccountId\": 123,\n \"payment\": {\n \"status\": \"paid\",\n \"reference\": \"<string>\",\n \"fee\": 123\n },\n \"contactId\": 123,\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clubId\": 123,\n \"date\": \"2023-12-25\",\n \"amount\": 123,\n \"revenueAccountId\": 123,\n \"payment\": {\n \"status\": \"paid\",\n \"reference\": \"<string>\",\n \"fee\": 123\n },\n \"contactId\": 123,\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"transactionType": "<string>",
"bookingId": 123,
"membershipId": 123,
"contactId": 123,
"clubId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"paymentStatus": "pending",
"amount": "<string>",
"taxAmount": "<string>",
"totalAmount": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Record a settlement
Records revenue you collected outside 1club as one sum for a club - for example a period’s takings for bookings you recorded at 0. It is a paid transaction of type settlement on the club, settled against your key’s payment method, and counts in the club’s revenue under the revenue account you name. It is not split across bookings or customers.
amount is what customers paid, tax included; the tax is taken out at the revenue account’s rate. A payment.reference your key already recorded is refused with 409 DUPLICATE_REFERENCE (details.transactionId names the existing one). No receipt is sent. Supports the Idempotency-Key header.
curl --request POST \
--url https://api.1club.ai/v1/platform/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clubId": 123,
"date": "2023-12-25",
"amount": 123,
"revenueAccountId": 123,
"payment": {
"status": "paid",
"reference": "<string>",
"fee": 123
},
"contactId": 123,
"description": "<string>"
}
'import requests
url = "https://api.1club.ai/v1/platform/transactions"
payload = {
"clubId": 123,
"date": "2023-12-25",
"amount": 123,
"revenueAccountId": 123,
"payment": {
"status": "paid",
"reference": "<string>",
"fee": 123
},
"contactId": 123,
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clubId: 123,
date: '2023-12-25',
amount: 123,
revenueAccountId: 123,
payment: {status: 'paid', reference: '<string>', fee: 123},
contactId: 123,
description: '<string>'
})
};
fetch('https://api.1club.ai/v1/platform/transactions', 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.1club.ai/v1/platform/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clubId' => 123,
'date' => '2023-12-25',
'amount' => 123,
'revenueAccountId' => 123,
'payment' => [
'status' => 'paid',
'reference' => '<string>',
'fee' => 123
],
'contactId' => 123,
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/transactions"
payload := strings.NewReader("{\n \"clubId\": 123,\n \"date\": \"2023-12-25\",\n \"amount\": 123,\n \"revenueAccountId\": 123,\n \"payment\": {\n \"status\": \"paid\",\n \"reference\": \"<string>\",\n \"fee\": 123\n },\n \"contactId\": 123,\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.1club.ai/v1/platform/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clubId\": 123,\n \"date\": \"2023-12-25\",\n \"amount\": 123,\n \"revenueAccountId\": 123,\n \"payment\": {\n \"status\": \"paid\",\n \"reference\": \"<string>\",\n \"fee\": 123\n },\n \"contactId\": 123,\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clubId\": 123,\n \"date\": \"2023-12-25\",\n \"amount\": 123,\n \"revenueAccountId\": 123,\n \"payment\": {\n \"status\": \"paid\",\n \"reference\": \"<string>\",\n \"fee\": 123\n },\n \"contactId\": 123,\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"transactionType": "<string>",
"bookingId": 123,
"membershipId": 123,
"contactId": 123,
"clubId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"paymentStatus": "pending",
"amount": "<string>",
"taxAmount": "<string>",
"totalAmount": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Headers
Retry-safe key; a repeat of the same request replays the first response
255Body
The day it is reported on.
What was collected, tax included.
The account the revenue posts to; its tax rate applies.
Show child attributes
Show child attributes
The customer the whole sum belongs to, if there is one.
Defaults to your key's name.
500Response
Settlement recorded
A billing transaction with amounts, payment status, and links to the originating booking or membership.
Stable unguessable identifier. Prefer this over id when storing a reference.
TransactionType enum value (e.g. booking_creation, membership_creation, product_sale, membership_recurrence, etc.). A settlement recorded with POST /v1/platform/transactions is settlement.
The customer charged, when there is one.
Set on a settlement only; other transactions take their club from their booking or membership.
pending, paid, void, failed, settled, overdue, partially_paid, refunded, cancelled Pre-tax amount as a decimal string (e.g. "25.00"). Serialized as a string to preserve precision.
Tax portion as a decimal string.
Total billed amount as a decimal string (amount + taxAmount).
Was this page helpful?