Skip to content

Payments

Payments are the money side of the invoice ledger: a payment applies a tender (cash, card, check, in-house credit) against one or more invoices for a client. The endpoints here cover three things most billing integrations need: listing payments that have already been recorded, listing the payment methods a clinic accepts, and reading client balances (current and aged).

If you’re trying to generate a charge, that’s invoicing; see Invoices. This page is about what happens after the invoice is finalized.

Authoritative schemas live in the live Swagger UI. The fields below are a representative subset for orientation.

FieldTypeNotes
idUUIDServer-assigned payment identifier.
clientIdUUIDClient the payment applies to.
clinicIdUUIDClinic the payment was recorded at.
paymentDateISO 8601When the payment was taken (UTC).
amountdecimalTender amount.
paymentMethodIdUUIDThe tender type (cash, card brand, check, credit). See payment-methods endpoint below.
paymentStatusIdUUIDStatus (pending, approved, declined, voided, refunded). See Lookups.
referenceNumberstringCheck number, terminal reference, or similar.
authCodestringAuthorization code returned by the card processor, when applicable.
cardTypestringCard brand (Visa, Mastercard, etc.), when applicable.
lastDigitsstringLast four digits of the card, when applicable.
transactionIdstringProcessor transaction identifier, when applicable.
payToCreditBalancedecimalPortion of the payment applied to the client’s in-house credit, when applicable.
clientBalanceAfterPaymentdecimalClient’s outstanding balance after this payment is applied (informational).
refundedPaymentIdUUIDWhen this record represents a refund, the id of the original payment it refunds.
processedByUserIdUUIDStaff user who processed the payment.
notestringFree-text note attached to the payment.
isDeletedbooleanSoft-delete flag.
dateVoidedISO 8601Set when the payment has been voided.
dateCreatedISO 8601Server-assigned creation timestamp (UTC).
dateUpdatedISO 8601Last server-side mutation (UTC).
POST /pav2/open-api-payments

Returns payments recorded at the clinic identified by X-Clinic-Id. Filter by client, status, or date range as needed. For a group with sharing enabled, clinicIds widens the query to other clinics in the group.

Terminal window
curl -X POST https://open-api.shepherd.vet/pav2/open-api-payments \
-H "Content-Type: application/json" \
-H "X-Integration-Public-Key: $SHEPHERD_PUBLIC_KEY" \
-H "X-Integration-Private-Key: $SHEPHERD_PRIVATE_KEY" \
-H "X-Clinic-Id: $SHEPHERD_CLINIC_ID" \
-d '{"page":1,"rpp":100,"sort":"paymentDate|desc","clientIds":"<CLIENT_GUID>"}'
{
"item": [
{
"id": "c1d2e3f4-...",
"clientId": "a1b2c3d4-...",
"clinicId": "f2a4c6e8-...",
"paymentDate": "2026-05-21T13:42:00Z",
"amount": 128.5,
"paymentMethodId": "5e6f7a8b-...",
"paymentStatusId": "9c8d7e6f-...",
"referenceNumber": null,
"authCode": "0091AB",
"cardType": "Visa",
"lastDigits": "4242",
"transactionId": "txn_8c2...",
"payToCreditBalance": 0,
"clientBalanceAfterPayment": 0,
"refundedPaymentId": null,
"processedByUserId": "bb551122-...",
"note": null,
"isDeleted": false,
"dateVoided": null,
"dateCreated": "2026-05-21T13:42:01Z",
"dateUpdated": "2026-05-21T13:42:01Z"
}
],
"totalRecords": 1,
"page": 1,
"recordsPerPage": 100,
"sort": "paymentDate|desc",
"searchQuery": null,
"embed": null,
"links": []
}
POST /pav2/open-api-payment-methods

The list of tender types the clinic accepts (cash, card brands, check, in-house credit, gift card, etc.). Use this to populate a UI picker, or to translate the paymentMethodId on a payment record into a human-readable name.

Terminal window
curl -X POST https://open-api.shepherd.vet/pav2/open-api-payment-methods \
-H "Content-Type: application/json" \
-H "X-Integration-Public-Key: $SHEPHERD_PUBLIC_KEY" \
-H "X-Integration-Private-Key: $SHEPHERD_PRIVATE_KEY" \
-H "X-Clinic-Id: $SHEPHERD_CLINIC_ID" \
-d '{"page":1,"rpp":100}'

A parallel endpoint, /pav2/open-api-payment-statuses, returns the payment-status catalog (pending, approved, declined, voided, refunded). Both are also discoverable through Lookups.

The open-api-client-balances controller exposes four aging cuts of client A/R. Each is a separate sub-route under the same prefix; pick the one that matches what you need to surface.

POST /pav2/open-api-client-balances/balances
POST /pav2/open-api-client-balances/aging
POST /pav2/open-api-client-balances/outstanding-balance-aging
POST /pav2/open-api-client-balances/credit-balance-aging
Sub-routeWhat it returns
balancesCurrent balance per client (net of credits).
agingStandard A/R aging buckets (0-30, 31-60, 61-90, 90+).
outstanding-balance-agingAging of unpaid invoices only.
credit-balance-agingAging of in-house credit on file.
Terminal window
curl -X POST https://open-api.shepherd.vet/pav2/open-api-client-balances/aging \
-H "Content-Type: application/json" \
-H "X-Integration-Public-Key: $SHEPHERD_PUBLIC_KEY" \
-H "X-Integration-Private-Key: $SHEPHERD_PRIVATE_KEY" \
-H "X-Clinic-Id: $SHEPHERD_CLINIC_ID" \
-d '{"page":1,"rpp":100}'
  • Invoices for the upstream charges payments apply against.
  • Clients for the client records balances roll up under.
  • Conventions for pagination, sorting, and date filters.
  • Errors for the two JSON error body shapes.