Skip to main content
POST
/
billing
/
cart
/
{cart_id}
/
convert-to-charge
Convert Cart To Charge
curl --request POST \
  --url https://api.decodahealth.com/billing/cart/{cart_id}/convert-to-charge \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "cartId": "<string>",
  "description": "<string>",
  "externalId": "<string>",
  "locationId": "<string>",
  "eventId": "<string>"
}
'
{
  "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": []
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Path Parameters

cart_id
string
required

Body

application/json

Request schema for converting cart to charge.

cartId
string
required

ID of the cart to convert

description
string | null

Description for the charge

externalId
string | null

External ID for the charge

locationId
string | null

Location ID for the charge

eventId
string | null

Event ID if related to an appointment

Response

Successful Response

Unified Charge model for both creation and representation.

patientId
string
required

Identifier of the patient being charged.

totalOutstanding
integer
required

Total outstanding amount that is yet to be paid.

id
string | null

A unique identifier for the charge. Auto-generated if not provided.

patient
PatientSummary · object

Summary details of the patient being charged.

total
integer
default:0

Total amount of the charge.

description
string | null

Description of the charge.

status
enum<string>
default:OUTSTANDING

Current status of the charge.

Available options:
OUTSTANDING,
PAID,
EXTERNAL_SETTLEMENT,
VOID,
WRITE_OFF,
REFUNDED,
CHARGEBACK,
PAYMENT_PLAN,
COLLECTIONS
discountAmount
integer | null
default:0

Any discount applied to the total outstanding.

discountPercentage
number | null
default:0

Percentage of discount applied to the charge.

externalId
string | null

External identifier for the charge, if applicable.

externalCreatedDate
string<date-time> | null

The creation date of the charge in your external system, if applicable.

ruleSetId
string | null

Identifier for the RuleSet applied to this Charge, if any.

createdDate
string<date-time> | null

The date when the charge was created.

creatorId
string | null

Identifier of the Provider who created the charge (i.e. the Clinician, or relevant Biller).

items
ChargeItem · object[]

List of Items in the Charge.

tips
TipDetail · object[]

List of Tips in the Charge.

locationId
string | null

Identifier of the Location where the charge was created.

eventId
string | null

Identifier of the Event this charge is associated with, if any.

memberId
string | null

Identifier of the Member this charge is associated with, if any.

comment
string | null

Any additional comments about the charge.

meta
Meta · object

Any additional metadata about the charge relevant to your system.

merchantAccountId
string | null

Identifier of the MerchantAccount this charge is associated with.

payments
ChargePaymentDetail · object[]

List of Payments in the Charge.

adjustments
AdjustmentSummary · object[]

List of Adjustments in the Charge.