InvoicesPayments and statements

Record a payment

POST
/v1/customers/{id}/payments

Records money received from this customer. Applied to the invoices you name, each for the amount you give it, in that order, or else to their oldest open invoices in the same currency, each in full. Anything left over stays as credit on the customer's account. ResellerHQ does not collect payment from your customers: you take the money however you already do, and record it here. Send an Idempotency-Key header so a retry can never record the payment twice.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

A value unique to this request, such as a UUID. A retry with the same key within 24 hours returns the first outcome instead of running again.

Length8 <= length <= 200

Request Body

application/json
  1. body
amount*integer
Range0 < value
currency*string

ISO 4217 currency code

Value in"USD""EUR""GBP""CAD""AUD""NZD""CHF""SEK""NOK""DKK""PLN""INR""SGD""HKD""AED""ZAR""BRL""MXN"
date?string

When the money arrived. Unset, now

Formatdate-time
method*string

How the money moved, outside this platform

Value in"bank_transfer""cash""card""other"
reference?string
Length1 <= length <= 200
applyToInvoices?array<>

Apply to these invoices, each for its own amount, in this order. These amounts must not add up to more than amount, and each is still capped by that invoice's own due. Unset, applied oldest-open-first in currency, each in full

Items1 <= items

Response Body

Created

application/json
  1. response

Created

id*string
number*string

Counts up from PMT-0001 across your account, with no gaps

customerId*string
amount*integer

Minor units of the invoice's currency

Range0 <= value
currency*string

ISO 4217 currency code

Value in"USD""EUR""GBP""CAD""AUD""NZD""CHF""SEK""NOK""DKK""PLN""INR""SGD""HKD""AED""ZAR""BRL""MXN"
date*string

When the money arrived, as you recorded it

Formatdate-time
method*string

How the money moved, outside this platform

Value in"bank_transfer""cash""card""other"
reference*string|null
allocations*array<>
unallocated*integer

amount less what allocations adds up to: the credit this payment left on the customer's account

Range0 <= value
shared*boolean

True once POST /payments/{id}/share has made a public receipt link, false again once revoked

issuer*|null
createdAt*string
Formatdate-time
curl -X POST "https://example.com/v1/customers/cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA/payments" \  -H "Idempotency-Key: 2f1c9a52-7d0e-4a8e-9a53-0c1f6f3f2b11" \  -H "Content-Type: application/json" \  -d '{    "amount": 2878,    "currency": "USD",    "method": "bank_transfer"  }'
{  "id": "pmt_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "number": "PMT-0001",  "customerId": "cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "amount": 2878,  "currency": "USD",  "date": "2026-10-07T11:04:31.000Z",  "method": "bank_transfer",  "reference": null,  "allocations": [    {      "invoiceId": "inv_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",      "invoiceNumber": "INV-0001",      "amount": 2878    }  ],  "unallocated": 2878,  "shared": true,  "issuer": {    "name": "Northwind Telecom",    "legalName": null,    "addressLines": [],    "taxId": null,    "billingEmail": null  },  "createdAt": "2026-10-07T11:04:31.000Z"}