Create Payment
Payments
Create Payment
Posts a patient payment back to the provider’s EMR ledger.
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-DDformat. Defaults to today if omitted.
Example Request
Example Response
- 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 a400 with the specific field name:
Patient Not Found
If the patient MRN cannot be resolved to an EMR patient, the API returns a404:
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
Body
application/json
Medical Record Number (MRN) of the patient the payment belongs to.
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.
Your reference for the payment (e.g. a transaction or receipt number). Reference numbers may be reused across payments.
Identifier of the EMR location/facility the payment is posted against.
Payment amount. Must be a positive number.
Optional free-text note recorded with the payment in the EMR.
Optional deposit date (YYYY-MM-DD). Defaults to today if omitted.