API Reference
- Getting Started
- Charges
- Invoices
- Items
- Patients
- Providers
- Roles
- Rules
- Webhooks
Charges
Charge Create
Create a new Charge
for a Patient
.
POST
/
v1
/
charge
/
create
Copy
curl --request POST \
--url https://api.decodahealth.com/v1/charge/create \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '{
"creatorId": "<string>",
"customAmount": 0,
"description": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"externalCreatedDate": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"items": [],
"meta": {},
"patientId": "<string>",
"patientPaysProcessingFee": true,
"ruleSetId": "<string>",
"status": "OUTSTANDING",
"subscriptionId": "<string>",
"totalOutstanding": 123
}'
Copy
{
"adjustments": [
{
"adjustmentType": "WRITE_OFF",
"amount": 123,
"chargeId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"providerId": "<string>",
"reason": "<string>"
}
],
"createdDate": "2023-11-07T05:31:56Z",
"customAmount": 123,
"description": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"explanationOfBenefits": [
{
"chargeBalance": 123,
"chargeId": "<string>",
"contractualAdjustment": 123,
"diagnoses": "<string>",
"diagnosesDescription": "<string>",
"id": "<string>",
"insurancePayment": 123,
"locationName": "<string>",
"manualAdjustment": 123,
"originalChargeAmount": 123,
"patientBalance": 123,
"patientPayment": 123,
"procedure": "<string>",
"procedureDescription": "<string>"
}
],
"externalCreatedDate": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"id": "<string>",
"items": [
{
"chargeId": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"item": {
"description": "<string>",
"id": "<string>",
"image": "<string>",
"meta": {},
"name": "<string>",
"price": 123,
"unit": "<string>"
},
"itemId": "<string>",
"quantity": 123
}
],
"meta": {},
"patient": {
"address": "<string>",
"addressLineTwo": "<string>",
"addressValid": true,
"allergies": [
"<string>"
],
"city": "<string>",
"country": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"dateOfBirth": "2023-12-25",
"email": "<string>",
"externalUserId": "<string>",
"familyHistory": [
"<string>"
],
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"medicalHistory": [
"<string>"
],
"medications": [
"<string>"
],
"meta": {},
"optedOutOfSms": false,
"phoneNumber": "<string>",
"prescriptions": [
"<string>"
],
"state": "<string>",
"type": "<string>",
"zipCode": "<string>"
},
"patientId": "<string>",
"patientPaysProcessingFee": true,
"payments": [
{
"amount": 123,
"charge": {
"externalId": "<string>",
"id": "<string>",
"meta": {},
"total": 123,
"totalOutstanding": 123
},
"chargeId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"payment": {
"amount": 123,
"createdDate": "2023-11-07T05:31:56Z",
"currency": "USD",
"failedReason": "<string>",
"fee": 123,
"id": "<string>",
"patientId": "<string>",
"payinConfigId": "<string>",
"payinId": "<string>",
"paymentMedium": "POS",
"paymentMethod": {
"accountHolderType": "<string>",
"accountNumberLast4": 123,
"bankName": "<string>",
"brand": "<string>",
"description": "<string>",
"expMonth": 123,
"expYear": 123,
"id": "<string>",
"last4": "<string>",
"patientId": "<string>",
"rainforestPaymentMethodId": "<string>",
"routingNumber": 123,
"type": "CARD"
},
"paymentMethodId": "<string>",
"refunds": [
{
"amount": 123,
"createdDate": "2023-11-07T05:31:56Z",
"fee": 0,
"id": "<string>",
"paymentId": "<string>",
"rainforestRefundId": "<string>",
"reason": "DUPLICATE",
"status": "CANCELED"
}
],
"status": "CANCELED",
"stripePaymentIntentId": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
},
"paymentId": "<string>"
}
],
"ruleSetId": "<string>",
"status": "OUTSTANDING",
"total": 123,
"totalOutstanding": 123
}
Headers
The tenant you are making this request on behalf of
Your api key
Body
application/json
Create a Charge for a Patient. These typically come from balances owed to the Tenant by the Patient (i.e. due to a copay).
Response
200
application/json
Successful Response
The response is of type object
.
Copy
curl --request POST \
--url https://api.decodahealth.com/v1/charge/create \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '{
"creatorId": "<string>",
"customAmount": 0,
"description": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"externalCreatedDate": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"items": [],
"meta": {},
"patientId": "<string>",
"patientPaysProcessingFee": true,
"ruleSetId": "<string>",
"status": "OUTSTANDING",
"subscriptionId": "<string>",
"totalOutstanding": 123
}'
Copy
{
"adjustments": [
{
"adjustmentType": "WRITE_OFF",
"amount": 123,
"chargeId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"providerId": "<string>",
"reason": "<string>"
}
],
"createdDate": "2023-11-07T05:31:56Z",
"customAmount": 123,
"description": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"explanationOfBenefits": [
{
"chargeBalance": 123,
"chargeId": "<string>",
"contractualAdjustment": 123,
"diagnoses": "<string>",
"diagnosesDescription": "<string>",
"id": "<string>",
"insurancePayment": 123,
"locationName": "<string>",
"manualAdjustment": 123,
"originalChargeAmount": 123,
"patientBalance": 123,
"patientPayment": 123,
"procedure": "<string>",
"procedureDescription": "<string>"
}
],
"externalCreatedDate": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"id": "<string>",
"items": [
{
"chargeId": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"item": {
"description": "<string>",
"id": "<string>",
"image": "<string>",
"meta": {},
"name": "<string>",
"price": 123,
"unit": "<string>"
},
"itemId": "<string>",
"quantity": 123
}
],
"meta": {},
"patient": {
"address": "<string>",
"addressLineTwo": "<string>",
"addressValid": true,
"allergies": [
"<string>"
],
"city": "<string>",
"country": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"dateOfBirth": "2023-12-25",
"email": "<string>",
"externalUserId": "<string>",
"familyHistory": [
"<string>"
],
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"medicalHistory": [
"<string>"
],
"medications": [
"<string>"
],
"meta": {},
"optedOutOfSms": false,
"phoneNumber": "<string>",
"prescriptions": [
"<string>"
],
"state": "<string>",
"type": "<string>",
"zipCode": "<string>"
},
"patientId": "<string>",
"patientPaysProcessingFee": true,
"payments": [
{
"amount": 123,
"charge": {
"externalId": "<string>",
"id": "<string>",
"meta": {},
"total": 123,
"totalOutstanding": 123
},
"chargeId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"payment": {
"amount": 123,
"createdDate": "2023-11-07T05:31:56Z",
"currency": "USD",
"failedReason": "<string>",
"fee": 123,
"id": "<string>",
"patientId": "<string>",
"payinConfigId": "<string>",
"payinId": "<string>",
"paymentMedium": "POS",
"paymentMethod": {
"accountHolderType": "<string>",
"accountNumberLast4": 123,
"bankName": "<string>",
"brand": "<string>",
"description": "<string>",
"expMonth": 123,
"expYear": 123,
"id": "<string>",
"last4": "<string>",
"patientId": "<string>",
"rainforestPaymentMethodId": "<string>",
"routingNumber": 123,
"type": "CARD"
},
"paymentMethodId": "<string>",
"refunds": [
{
"amount": 123,
"createdDate": "2023-11-07T05:31:56Z",
"fee": 0,
"id": "<string>",
"paymentId": "<string>",
"rainforestRefundId": "<string>",
"reason": "DUPLICATE",
"status": "CANCELED"
}
],
"status": "CANCELED",
"stripePaymentIntentId": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
},
"paymentId": "<string>"
}
],
"ruleSetId": "<string>",
"status": "OUTSTANDING",
"total": 123,
"totalOutstanding": 123
}
Assistant
Responses are generated using AI and may contain mistakes.