---
title: "Create payment"
method: POST
path: "/payments"
tags: ["Payments"]
---

# Create payment

`POST /payments`

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/payments`
- Auth: API key in header `Authorization`

This endpoint enqueues a write-back that records the payment in the integrated health record system

## Query parameters

- `subdomain` string, required
- `location_id` integer, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PostPayments: Create payment
  - `payment` object, required: Payment details
    - `patient_id` integer, required: NexHealth Patient ID
    - `amount` number, double, required: Payment amount in decimal dollars. Negative amounts represent payments which reduce the patient's balance
    - `currency` string: Currency
    - `payment_type_id` integer: ID of the payment type
    - `transaction_id` string, required: The transaction ID of the payment with a prefix identifying the API originator this ID will be used to identify the payment created in the EHR. Max length is 50 characters.
    - `paid_at` string, date-time: Payment datetime
    - `charge_splits` object: Charge splits hash with NexHealth charge IDs and corresponding amounts in decimal dollars
    - `provider_splits` object: Provider splits hash with NexHealth provider IDs and corresponding amounts in decimal dollars
    - `notes` string: Notes that will be saved into the EHR. note: some EHRs may truncate overlong notes

## Response `202`

Create payment

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error

---

[API](https://skmtc.dev/nexhealth/apis/nexhealth-api.md) - [All operations](https://skmtc.dev/nexhealth/apis/nexhealth-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexhealth/apis/nexhealth-api/revisions/a180e830b672?raw)
