curl --request POST \
  --url https://api.splose.com/v1/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "patientId": 1,
  "locationId": 1,
  "paymentMethodId": 1,
  "amount": 193.99,
  "paymentDate": "2024-03-01T00:00:00.000Z",
  "paymentInvoices": [
    {
      "invoiceId": 1,
      "amount": 193.99,
      "xeroId": "<string>"
    }
  ],
  "xeroId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "id": 1,
  "paymentNumber": "RCPT-0001",
  "amount": 193.99,
  "patientId": 1,
  "locationId": 1,
  "paymentMethodId": 1,
  "paymentDate": "2023-07-30T09:00:00.000Z",
  "paymentInvoices": [
    {
      "invoiceId": 1,
      "amount": 193.99,
      "xeroId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "creditAllocations": [],
  "xeroId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "archivedAt": "<string>"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
patientId
integer
required

Patient id

Required range: x > 0
locationId
integer
required

Location id

Required range: x > 0
paymentMethodId
integer
required

Payment method id

Required range: x > 0
amount
number | null
required

Total payment amount, it should be the same as the sum of all paymentInvoice amount

paymentDate
required

Payment date

paymentInvoices
object[]
required

Payments made to invoices

xeroId
string

Xero batch payment id, only applicable for Xero batch payment

Response

200 - application/json
id
integer
required

Payment id

Required range: x > 0
paymentNumber
string
required

Payment number

amount
number | null
required

Total payment amount. 0 for credit allocation

patientId
integer
required

The payment patient id

Required range: x > 0
locationId
integer
required

The payment location id

Required range: x > 0
paymentMethodId
integer | null
required

The payment method id, null for credit allocation

Required range: x > 0
paymentDate
required

Payment date

paymentInvoices
object[]
required

Payments made to invoices

creditAllocations
object[]
required

Credit allocated to invoices

xeroId
string | null
required

Xero batch payment id

archivedAt
required

Payment archive date time