Get a payment
curl --request GET \
--url https://api.1club.ai/v1/platform/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/payments/{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{
"id": 123,
"status": "pending",
"amount": 123,
"currency": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"contact": {
"id": 123,
"name": "<string>"
},
"paymentMethod": {
"id": 123,
"name": "<string>",
"code": "<string>",
"channel": "stripe"
},
"source": "admin_portal",
"providerMode": "test",
"reference": "<string>",
"billingEntityId": 123,
"clubId": 123,
"invoiceId": 123,
"charges": [
{
"transactionId": 123,
"amount": 123
}
],
"refunds": [
{
"id": 123,
"amount": 123,
"status": "pending",
"destination": "stripe",
"transactionId": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"refundedAmount": 123
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Payments
Get a payment
One payment, with the charges it paid and what was refunded from it.
GET
/
v1
/
platform
/
payments
/
{id}
Get a payment
curl --request GET \
--url https://api.1club.ai/v1/platform/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{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.1club.ai/v1/platform/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/payments/{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{
"id": 123,
"status": "pending",
"amount": 123,
"currency": "<string>",
"paymentDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"contact": {
"id": 123,
"name": "<string>"
},
"paymentMethod": {
"id": 123,
"name": "<string>",
"code": "<string>",
"channel": "stripe"
},
"source": "admin_portal",
"providerMode": "test",
"reference": "<string>",
"billingEntityId": 123,
"clubId": 123,
"invoiceId": 123,
"charges": [
{
"transactionId": 123,
"amount": 123
}
],
"refunds": [
{
"id": 123,
"amount": 123,
"status": "pending",
"destination": "stripe",
"transactionId": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"refundedAmount": 123
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Response
Payment
Money that came in against charges. A charge (a transaction) is what a member owes; a payment is what they paid, when, with which payment method and to which company. One payment can pay several charges, and one charge can be paid by several payments.
What to find the payment by where the money is held: the reference it was recorded with (such as a bank transfer's) or a partner reported, else the payment provider's own id: myPOS's transaction reference or order id, DatecsPay's or the card reader's RRN, or Stripe's charge (ch_…) or, before one exists, PaymentIntent (pi_…). paymentMethod.channel says which provider it belongs to.
Was this page helpful?