Docs
API Reference

Payments

Record payments and refunds against invoices

A payment records money received against an invoice. Recording a payment (or a refund, using a negative amount) automatically recalculates the invoice's paid, depositPaid, and balancePaid flags — you do not update those fields yourself.

Stripe-linked payments are read-only

Payments that carry a stripePaymentIntentId or stripeRefundId originate from Stripe and own an entry in Stripe's ledger. They can be read and listed, but attempts to update or delete them return 409 Conflict so the books stay in sync. The paymentMethod values you can write are card, cash, eft, cheque, and other; stripe/stripeRefund are set only by Stripe.

Endpoints

  • GET/organisations/{orgId}/payments — List payments (filter by invoiceId)
  • POST/organisations/{orgId}/payments — Record a payment or refund
  • GET/organisations/{orgId}/payments/{paymentId} — Get payment
  • PUT/organisations/{orgId}/payments/{paymentId} — Update payment
  • DELETE/organisations/{orgId}/payments/{paymentId} — Delete payment

The referenced invoiceId must belong to an existing invoice, otherwise the create returns 400. sendReceipt is stored as metadata only — the API does not send receipt emails.

GET
/organisations/{orgId}/payments
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Query Parameters

limit?integer

Maximum number of items to return (max 100)

Range1 <= value <= 100
Default50
startAfter?string

Cursor for pagination - ID of the last item from previous page

invoiceId?string

Only return payments for this invoice

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/payments"
{  "success": true,  "data": {    "payments": [      {        "id": "string",        "invoiceId": "string",        "amount": 0,        "paymentDate": "2019-08-24T14:15:22Z",        "paymentMethod": "string",        "sendReceipt": true,        "notes": "string",        "stripePaymentIntentId": "string",        "stripeRefundId": "string"      }    ],    "pagination": {      "limit": 0,      "hasMore": true,      "nextCursor": "string"    }  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

POST
/organisations/{orgId}/payments
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/organisations/string/payments" \  -H "Content-Type: application/json" \  -d '{    "invoiceId": "abc123",    "amount": 150,    "paymentMethod": "card",    "notes": "Paid in full"  }'
{  "success": true,  "data": {    "id": "string",    "invoiceId": "string",    "amount": 0,    "paymentDate": "2019-08-24T14:15:22Z",    "paymentMethod": "string",    "sendReceipt": true,    "notes": "string",    "stripePaymentIntentId": "string",    "stripeRefundId": "string"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

GET
/organisations/{orgId}/payments/{paymentId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

paymentId*string

Payment ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/payments/string"
{  "success": true,  "data": {    "id": "string",    "invoiceId": "string",    "amount": 0,    "paymentDate": "2019-08-24T14:15:22Z",    "paymentMethod": "string",    "sendReceipt": true,    "notes": "string",    "stripePaymentIntentId": "string",    "stripeRefundId": "string"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
PUT
/organisations/{orgId}/payments/{paymentId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

paymentId*string

Payment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/organisations/string/payments/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "data": {    "id": "string",    "invoiceId": "string",    "amount": 0,    "paymentDate": "2019-08-24T14:15:22Z",    "paymentMethod": "string",    "sendReceipt": true,    "notes": "string",    "stripePaymentIntentId": "string",    "stripeRefundId": "string"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}
DELETE
/organisations/{orgId}/payments/{paymentId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

paymentId*string

Payment ID

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/organisations/string/payments/string"
{  "success": true,  "data": {    "message": "Operation completed successfully"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

Machine-readable version: OpenAPI 3.1 spec.

On this page