curl --request POST \
--url https://api.maxcare.ai/v4/deposit-matches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"bankTransactionId": "btx_5f1c0000000040000000000000000001",
"externalRef": "remit-2026-10-0042",
"amount": "1250.00"
}
'import requests
url = "https://api.maxcare.ai/v4/deposit-matches"
payload = {
"bankTransactionId": "btx_5f1c0000000040000000000000000001",
"externalRef": "remit-2026-10-0042",
"amount": "1250.00"
}
headers = {
"idempotency-key": "<idempotency-key>",
"Idempotency-Key": "<idempotency-key>",
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
'Idempotency-Key': '<idempotency-key>',
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
bankTransactionId: 'btx_5f1c0000000040000000000000000001',
externalRef: 'remit-2026-10-0042',
amount: '1250.00'
})
};
fetch('https://api.maxcare.ai/v4/deposit-matches', 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.maxcare.ai/v4/deposit-matches",
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([
'bankTransactionId' => 'btx_5f1c0000000040000000000000000001',
'externalRef' => 'remit-2026-10-0042',
'amount' => '1250.00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Organization-Id: <x-organization-id>",
"idempotency-key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v4/deposit-matches"
payload := strings.NewReader("{\n \"bankTransactionId\": \"btx_5f1c0000000040000000000000000001\",\n \"externalRef\": \"remit-2026-10-0042\",\n \"amount\": \"1250.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Organization-Id", "<x-organization-id>")
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.maxcare.ai/v4/deposit-matches")
.header("idempotency-key", "<idempotency-key>")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bankTransactionId\": \"btx_5f1c0000000040000000000000000001\",\n \"externalRef\": \"remit-2026-10-0042\",\n \"amount\": \"1250.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v4/deposit-matches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankTransactionId\": \"btx_5f1c0000000040000000000000000001\",\n \"externalRef\": \"remit-2026-10-0042\",\n \"amount\": \"1250.00\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "dpm_5f1c0000000040000000000000000002",
"bankTransactionId": "btx_5f1c0000000040000000000000000001",
"kind": "pharmacy_remittance",
"externalRef": "remit-2026-10-0042",
"amount": "1250.00",
"status": "active",
"createdAt": "2026-10-19T14:03:00.000Z"
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Record that a deposit paid one of your remittances
Claims amount of a credit deposit for the app’s own remittance externalRef. It never changes the platform’s ERA reconciliation. 201 creates the match; replaying the same Idempotency-Key with the same body answers 200 with the original match, and with a different body 409 idempotency_key_reused. 409 deposit_already_allocated when a confirmed or manual ERA reconciliation, a card payout or another installed app’s active match holds the deposit (data.heldBy); 409 over_allocated when this app’s active matches on the deposit would exceed its amount (data.remainingAmount); 409 conflict when the deposit is excluded (superseded, duplicate or removed: match the row it points to; if that row is excluded too, no live row carries the money and there is nothing to match) or when externalRef already has an active match. An unknown, other-organization or debit transaction answers 404.
curl --request POST \
--url https://api.maxcare.ai/v4/deposit-matches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"bankTransactionId": "btx_5f1c0000000040000000000000000001",
"externalRef": "remit-2026-10-0042",
"amount": "1250.00"
}
'import requests
url = "https://api.maxcare.ai/v4/deposit-matches"
payload = {
"bankTransactionId": "btx_5f1c0000000040000000000000000001",
"externalRef": "remit-2026-10-0042",
"amount": "1250.00"
}
headers = {
"idempotency-key": "<idempotency-key>",
"Idempotency-Key": "<idempotency-key>",
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
'Idempotency-Key': '<idempotency-key>',
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
bankTransactionId: 'btx_5f1c0000000040000000000000000001',
externalRef: 'remit-2026-10-0042',
amount: '1250.00'
})
};
fetch('https://api.maxcare.ai/v4/deposit-matches', 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.maxcare.ai/v4/deposit-matches",
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([
'bankTransactionId' => 'btx_5f1c0000000040000000000000000001',
'externalRef' => 'remit-2026-10-0042',
'amount' => '1250.00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Organization-Id: <x-organization-id>",
"idempotency-key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v4/deposit-matches"
payload := strings.NewReader("{\n \"bankTransactionId\": \"btx_5f1c0000000040000000000000000001\",\n \"externalRef\": \"remit-2026-10-0042\",\n \"amount\": \"1250.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Organization-Id", "<x-organization-id>")
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.maxcare.ai/v4/deposit-matches")
.header("idempotency-key", "<idempotency-key>")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bankTransactionId\": \"btx_5f1c0000000040000000000000000001\",\n \"externalRef\": \"remit-2026-10-0042\",\n \"amount\": \"1250.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v4/deposit-matches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankTransactionId\": \"btx_5f1c0000000040000000000000000001\",\n \"externalRef\": \"remit-2026-10-0042\",\n \"amount\": \"1250.00\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "dpm_5f1c0000000040000000000000000002",
"bankTransactionId": "btx_5f1c0000000040000000000000000001",
"kind": "pharmacy_remittance",
"externalRef": "remit-2026-10-0042",
"amount": "1250.00",
"status": "active",
"createdAt": "2026-10-19T14:03:00.000Z"
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Marketplace API key
Headers
Unique per match for this installation, kept permanently; at most 255 characters
Target clinic organization ID
Body
The deposit this remittance arrived in (btx_…), from GET /bank-transactions
"btx_5f1c0000000040000000000000000001"
What the app's remittance is
pharmacy_remittance, other The app's own identifier for the remittance this deposit paid. One active match per externalRef per installation.
1 - 200"remit-2026-10-0042"
Amount of the deposit allocated to this remittance: a positive decimal string, at most two decimals
"1250.00"
Response
Success
