Skip to main content
POST
/
billing
/
invoice
/
create
Create Manual Invoice
curl --request POST \
  --url https://api.decodahealth.com/billing/invoice/create \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "patientId": "<string>",
  "message": "<string>",
  "invoiceMethod": "CHARGE_CARD",
  "charges": [
    {
      "patientId": "<string>",
      "totalOutstanding": 123,
      "id": "<string>",
      "patient": {
        "id": "<string>",
        "type": "PROVIDER",
        "createdDate": "2023-11-07T05:31:56Z",
        "firstName": "<string>",
        "lastName": "<string>",
        "phoneNumber": "<string>",
        "email": "<string>",
        "locationId": "<string>",
        "externalId": "<string>",
        "address": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>",
        "country": "<string>",
        "addressValid": true,
        "meta": {},
        "isArchived": true,
        "primaryLocationId": "<string>",
        "gender": "<string>",
        "dateOfBirth": "2023-12-25",
        "patientMedications": [
          "<string>"
        ],
        "onSchedulingBlacklist": true,
        "surchargeDisabled": true,
        "tags": [
          {
            "id": "<string>",
            "name": "<string>",
            "isActive": true,
            "createdDate": "2023-11-07T05:31:56Z",
            "emoji": "<string>",
            "color": "<string>",
            "updatedDate": "2023-11-07T05:31:56Z"
          }
        ],
        "creditBalance": 123,
        "preferredProviderId": "<string>"
      },
      "total": 0,
      "description": "<string>",
      "status": "OUTSTANDING",
      "discountAmount": 0,
      "discountPercentage": 0,
      "externalId": "<string>",
      "externalCreatedDate": "2023-11-07T05:31:56Z",
      "ruleSetId": "<string>",
      "createdDate": "2023-11-07T05:31:56Z",
      "creatorId": "<string>",
      "items": [],
      "tips": [],
      "locationId": "<string>",
      "eventId": "<string>",
      "memberId": "<string>",
      "comment": "<string>",
      "meta": {},
      "merchantAccountId": "<string>",
      "payments": [],
      "adjustments": []
    }
  ]
}
'
{
  "id": "<string>",
  "status": "PENDING",
  "amount": 123,
  "methodsAttempted": [
    "<array>"
  ],
  "method": "CHARGE_CARD",
  "rule": {
    "id": "<string>",
    "name": "<string>",
    "methods": [
      "CHARGE_CARD"
    ],
    "delayInDays": 123,
    "message": "<string>"
  },
  "sendTime": "2023-11-07T05:31:56Z",
  "pausedDate": "2023-11-07T05:31:56Z",
  "resumedDate": "2023-11-07T05:31:56Z",
  "failedReason": "<string>",
  "pdfPath": "<string>",
  "emailStatus": "<string>",
  "smsContent": "<string>",
  "callStatus": "<string>"
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json
patientId
string
required

Identifier of the patient to create the invoice for.

message
string
required

Custom message to be sent with the invoice.

invoiceMethod
enum<string>
required

Method to use for sending the invoice.

Available options:
CHARGE_CARD,
SMS,
EMAIL,
CALL,
MAIL,
EXPIRY
charges
ChargeDetail · object[] | null

Optional charge to create before invoicing. If not provided, will invoice existing outstanding charges.

Response

Successful Response

id
string
required
status
enum<string>
required

The status of an invoice.

Available options:
PENDING,
SENT,
FAILED,
PAUSED,
CANCELLED
amount
integer
required
methodsAttempted
array[]
required
Required array length: 3 elements
method
enum<string> | null

The method used to send an invoice to a patient.

Available options:
CHARGE_CARD,
SMS,
EMAIL,
CALL,
MAIL,
EXPIRY
rule
RuleDetails · object
sendTime
string<date-time> | null
pausedDate
string<date-time> | null
resumedDate
string<date-time> | null
failedReason
string | null
pdfPath
string | null
emailStatus
string | null
smsContent
string | null
callStatus
string | null