curl --request POST \
--url https://{clinic}.{region}.practicehub.io/v3/api/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient_id": 2,
"amount": "45.00",
"payment_method_id": 123,
"note": "<string>",
"payment_date": "2023-12-25",
"location_id": 2,
"metadata": {}
}
'import requests
url = "https://{clinic}.{region}.practicehub.io/v3/api/payments"
payload = {
"patient_id": 2,
"amount": "45.00",
"payment_method_id": 123,
"note": "<string>",
"payment_date": "2023-12-25",
"location_id": 2,
"metadata": {}
}
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({
patient_id: 2,
amount: '45.00',
payment_method_id: 123,
note: '<string>',
payment_date: '2023-12-25',
location_id: 2,
metadata: {}
})
};
fetch('https://{clinic}.{region}.practicehub.io/v3/api/payments', 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://{clinic}.{region}.practicehub.io/v3/api/payments",
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([
'patient_id' => 2,
'amount' => '45.00',
'payment_method_id' => 123,
'note' => '<string>',
'payment_date' => '2023-12-25',
'location_id' => 2,
'metadata' => [
]
]),
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://{clinic}.{region}.practicehub.io/v3/api/payments"
payload := strings.NewReader("{\n \"patient_id\": 2,\n \"amount\": \"45.00\",\n \"payment_method_id\": 123,\n \"note\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"location_id\": 2,\n \"metadata\": {}\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://{clinic}.{region}.practicehub.io/v3/api/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient_id\": 2,\n \"amount\": \"45.00\",\n \"payment_method_id\": 123,\n \"note\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"location_id\": 2,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{clinic}.{region}.practicehub.io/v3/api/payments")
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 \"patient_id\": 2,\n \"amount\": \"45.00\",\n \"payment_method_id\": 123,\n \"note\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"location_id\": 2,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 6501,
"amount": "30.00",
"payment_method_id": 3,
"patient_id": 340,
"location_id": 1,
"service": null,
"service_id": null,
"third_party": false,
"third_party_id": null,
"parent_payment_id": null,
"note": "Part-payment at front desk",
"updated_at": "2026-09-01T14:30:00Z",
"created_at": "2026-09-01T14:30:00Z",
"payment_date": "2026-09-01",
"status": "completed"
}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Create payments
curl --request POST \
--url https://{clinic}.{region}.practicehub.io/v3/api/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient_id": 2,
"amount": "45.00",
"payment_method_id": 123,
"note": "<string>",
"payment_date": "2023-12-25",
"location_id": 2,
"metadata": {}
}
'import requests
url = "https://{clinic}.{region}.practicehub.io/v3/api/payments"
payload = {
"patient_id": 2,
"amount": "45.00",
"payment_method_id": 123,
"note": "<string>",
"payment_date": "2023-12-25",
"location_id": 2,
"metadata": {}
}
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({
patient_id: 2,
amount: '45.00',
payment_method_id: 123,
note: '<string>',
payment_date: '2023-12-25',
location_id: 2,
metadata: {}
})
};
fetch('https://{clinic}.{region}.practicehub.io/v3/api/payments', 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://{clinic}.{region}.practicehub.io/v3/api/payments",
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([
'patient_id' => 2,
'amount' => '45.00',
'payment_method_id' => 123,
'note' => '<string>',
'payment_date' => '2023-12-25',
'location_id' => 2,
'metadata' => [
]
]),
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://{clinic}.{region}.practicehub.io/v3/api/payments"
payload := strings.NewReader("{\n \"patient_id\": 2,\n \"amount\": \"45.00\",\n \"payment_method_id\": 123,\n \"note\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"location_id\": 2,\n \"metadata\": {}\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://{clinic}.{region}.practicehub.io/v3/api/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient_id\": 2,\n \"amount\": \"45.00\",\n \"payment_method_id\": 123,\n \"note\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"location_id\": 2,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{clinic}.{region}.practicehub.io/v3/api/payments")
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 \"patient_id\": 2,\n \"amount\": \"45.00\",\n \"payment_method_id\": 123,\n \"note\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"location_id\": 2,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 6501,
"amount": "30.00",
"payment_method_id": 3,
"patient_id": 340,
"location_id": 1,
"service": null,
"service_id": null,
"third_party": false,
"third_party_id": null,
"parent_payment_id": null,
"note": "Part-payment at front desk",
"updated_at": "2026-09-01T14:30:00Z",
"created_at": "2026-09-01T14:30:00Z",
"payment_date": "2026-09-01",
"status": "completed"
}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Authorizations
API key from Developers → API Keys, sent as Authorization: Bearer .
Headers
Any unique string (≤255 chars). A retry with the same key within 24 hours replays the original response (Idempotent-Replayed: true) instead of creating a second record.
255Body
The patient the payment is held against. Whatever isn't allocated to an invoice sits as credit on this patient's account.
x >= 1Money received: 2 dp, from 0.01 up to 99,999,999.99. A refund is its own call (POST /refunds), never a negative amount recorded here — reads of rows PracticeHub wrote (refunds, transfers) can be negative.
^-?\d+(\.\d{1,2})?$"45.00"
A payment_methods id: an active method the clinic records by hand (GET /payment_methods). PracticeHub's special types (negative ids — refund, credit, write-off, transfers, rewards, card on file, direct debit) appear on payments PracticeHub wrote and are never recorded through the API (422 payment_method_not_recordable); provider-collected methods (card, direct debit) are refused too (422 card_payment_not_allowed).
Free-text note, up to 1000 characters.
1000The payment's ledger date, YYYY-MM-DD in the account's timezone. Defaults to today on create; backdate freely for imported history.
The location the payment was taken at. Optional: a payment dated today joins the open shift at this location, so it appears on that shift's report; without one the payment is on the ledger but on no shift report. Fixed once recorded.
x >= 1Integrator-owned key/value metadata (max 50 keys). Values are strings (≤500 chars), numbers or booleans and read back with the type they were written with. On write, a null value removes the key. Filter with metadata[key]=op:value; number operands compare numerically.
Show child attributes
Show child attributes
Response
The resource
Show child attributes
Show child attributes
{
"id": 6501,
"amount": "30.00",
"payment_method_id": 3,
"patient_id": 340,
"location_id": 1,
"service": null,
"service_id": null,
"third_party": false,
"third_party_id": null,
"parent_payment_id": null,
"note": "Part-payment at front desk",
"updated_at": "2026-09-01T14:30:00Z",
"created_at": "2026-09-01T14:30:00Z",
"payment_date": "2026-09-01",
"status": "completed"
}
Was this page helpful?