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",
"dueDate": "2023-11-07T05:31:56Z",
"paymentStatus": "pending",
"amount": "<string>",
"taxAmount": "<string>",
"totalAmount": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}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",
"dueDate": "2023-11-07T05:31:56Z",
"paymentStatus": "pending",
"amount": "<string>",
"taxAmount": "<string>",
"totalAmount": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Headers
Body
Response
Settlement recorded
A billing transaction with amounts, payment status, and links to the originating booking or membership.
What the transaction is for, in English, built from what it links to: the part of the booking it pays for and the visit, the plan and the period it pays for, the product or the check-in; a reversal reads Reversal: ... with the share it gives back. For a settlement, or anything else linked to none of those, it is the text it was created with. Read it as a label, not as an identifier: it follows the records' current names.
Was this page helpful?