Skip to main content
POST
Create Payment
Posting payments is an asynchronous operation. The endpoint validates your request, queues the payment, and returns immediately with a payment_id and job_id. The payment is posted to the EMR by a background worker, and a webhook event is sent to your registered endpoint upon completion.

Request Parameters

Required Fields

  • patient_mrn (string, required): Medical Record Number (MRN) of the patient the payment belongs to.
  • payment_method (string, required): Name of the payment method as configured in the EMR (e.g. "Card"). The worker resolves this name to the EMR’s internal payment method id at post time.
  • reference_number (string, required): Your reference for the payment (e.g. a transaction or receipt number). Reference numbers may be reused across payments — they are not used as a uniqueness key.
  • location (string, required): Identifier of the EMR location/facility the payment is posted against.
  • amount (number, required): Payment amount. Must be a positive number.

Optional Fields

  • notes (string, optional): Free-text note recorded with the payment in the EMR.
  • deposit_date (string, optional): Deposit date in YYYY-MM-DD format. Defaults to today if omitted.

Example Request

Example Response

The response includes:
  • payment_id: Unique identifier for the created payment record.
  • job_id: Job execution identifier for tracking the async operation.

Error Responses

Missing or Invalid Field

If a required field is missing or invalid, the API returns a 400 with the specific field name:

Patient Not Found

If the patient MRN cannot be resolved to an EMR patient, the API returns a 404:

User Not Found

Webhook Notifications

When the payment posting is complete, we will send a webhook to your registered endpoint. Here are examples of what those webhook payloads will look like:

Success

Failure

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
patient_mrn
string
required

Medical Record Number (MRN) of the patient the payment belongs to.

payment_method
string
required

Name of the payment method as configured in the EMR (e.g. "Card"). Resolved to the EMR's internal payment method id at post time.

reference_number
string
required

Your reference for the payment (e.g. a transaction or receipt number). Reference numbers may be reused across payments.

location
string
required

Identifier of the EMR location/facility the payment is posted against.

amount
number
required

Payment amount. Must be a positive number.

notes
string

Optional free-text note recorded with the payment in the EMR.

deposit_date
string<date>

Optional deposit date (YYYY-MM-DD). Defaults to today if omitted.

Response

Payment queued successfully

success
boolean
message
string
payment_id
string

Unique identifier for the created payment record

job_id
integer

Job execution identifier for tracking the async operation