Add charges
curl --request POST \
--url https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"charges": [
{
"chargeableId": "<string>",
"quantity": "<string>",
"unitPrice": "<string>",
"description": "<string>",
"discount": {
"percent": 50
},
"idempotencyKey": "<string>",
"sourceBundleId": "<string>",
"occurredAt": "<string>",
"priceSource": "<string>",
"priceOverrideReason": "<string>",
"remark": "<string>"
}
]
}
'import requests
url = "https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges"
payload = { "charges": [
{
"chargeableId": "<string>",
"quantity": "<string>",
"unitPrice": "<string>",
"description": "<string>",
"discount": { "percent": 50 },
"idempotencyKey": "<string>",
"sourceBundleId": "<string>",
"occurredAt": "<string>",
"priceSource": "<string>",
"priceOverrideReason": "<string>",
"remark": "<string>"
}
] }
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charges: [
{
chargeableId: '<string>',
quantity: '<string>',
unitPrice: '<string>',
description: '<string>',
discount: {percent: 50},
idempotencyKey: '<string>',
sourceBundleId: '<string>',
occurredAt: '<string>',
priceSource: '<string>',
priceOverrideReason: '<string>',
remark: '<string>'
}
]
})
};
fetch('https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"charges\": [\n {\n \"chargeableId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"unitPrice\": \"<string>\",\n \"description\": \"<string>\",\n \"discount\": {\n \"percent\": 50\n },\n \"idempotencyKey\": \"<string>\",\n \"sourceBundleId\": \"<string>\",\n \"occurredAt\": \"<string>\",\n \"priceSource\": \"<string>\",\n \"priceOverrideReason\": \"<string>\",\n \"remark\": \"<string>\"\n }\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"charges\": [\n {\n \"chargeableId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"unitPrice\": \"<string>\",\n \"description\": \"<string>\",\n \"discount\": {\n \"percent\": 50\n },\n \"idempotencyKey\": \"<string>\",\n \"sourceBundleId\": \"<string>\",\n \"occurredAt\": \"<string>\",\n \"priceSource\": \"<string>\",\n \"priceOverrideReason\": \"<string>\",\n \"remark\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"charges\": [\n {\n \"chargeableId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"unitPrice\": \"<string>\",\n \"description\": \"<string>\",\n \"discount\": {\n \"percent\": 50\n },\n \"idempotencyKey\": \"<string>\",\n \"sourceBundleId\": \"<string>\",\n \"occurredAt\": \"<string>\",\n \"priceSource\": \"<string>\",\n \"priceOverrideReason\": \"<string>\",\n \"remark\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "chg-501",
"description": "X-Ray Chest",
"quantity": "1",
"unitPrice": "800.00",
"discountAmount": "80.00",
"taxAmount": "0.00",
"totalAmount": "720.00",
"invoiceId": null,
"occurredAt": "2026-10-07T10:00:00.000Z"
}
]{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Charges
Add charges
Adds one or more charges. Each is a catalog chargeableId or an inline item; prices come from the active price list unless unitPrice is given. Use idempotencyKey to make a retry safe.
The admission must be on new billing (use_new_billing); otherwise this returns 409. Returns 503 when billing is not configured on the server, and 502 when the billing service fails.
POST
/
ipd
/
sdk
/
admissions
/
{admission_id}
/
billing
/
charges
Add charges
curl --request POST \
--url https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"charges": [
{
"chargeableId": "<string>",
"quantity": "<string>",
"unitPrice": "<string>",
"description": "<string>",
"discount": {
"percent": 50
},
"idempotencyKey": "<string>",
"sourceBundleId": "<string>",
"occurredAt": "<string>",
"priceSource": "<string>",
"priceOverrideReason": "<string>",
"remark": "<string>"
}
]
}
'import requests
url = "https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges"
payload = { "charges": [
{
"chargeableId": "<string>",
"quantity": "<string>",
"unitPrice": "<string>",
"description": "<string>",
"discount": { "percent": 50 },
"idempotencyKey": "<string>",
"sourceBundleId": "<string>",
"occurredAt": "<string>",
"priceSource": "<string>",
"priceOverrideReason": "<string>",
"remark": "<string>"
}
] }
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charges: [
{
chargeableId: '<string>',
quantity: '<string>',
unitPrice: '<string>',
description: '<string>',
discount: {percent: 50},
idempotencyKey: '<string>',
sourceBundleId: '<string>',
occurredAt: '<string>',
priceSource: '<string>',
priceOverrideReason: '<string>',
remark: '<string>'
}
]
})
};
fetch('https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"charges\": [\n {\n \"chargeableId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"unitPrice\": \"<string>\",\n \"description\": \"<string>\",\n \"discount\": {\n \"percent\": 50\n },\n \"idempotencyKey\": \"<string>\",\n \"sourceBundleId\": \"<string>\",\n \"occurredAt\": \"<string>\",\n \"priceSource\": \"<string>\",\n \"priceOverrideReason\": \"<string>\",\n \"remark\": \"<string>\"\n }\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"charges\": [\n {\n \"chargeableId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"unitPrice\": \"<string>\",\n \"description\": \"<string>\",\n \"discount\": {\n \"percent\": 50\n },\n \"idempotencyKey\": \"<string>\",\n \"sourceBundleId\": \"<string>\",\n \"occurredAt\": \"<string>\",\n \"priceSource\": \"<string>\",\n \"priceOverrideReason\": \"<string>\",\n \"remark\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/sdk/admissions/{admission_id}/billing/charges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"charges\": [\n {\n \"chargeableId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"unitPrice\": \"<string>\",\n \"description\": \"<string>\",\n \"discount\": {\n \"percent\": 50\n },\n \"idempotencyKey\": \"<string>\",\n \"sourceBundleId\": \"<string>\",\n \"occurredAt\": \"<string>\",\n \"priceSource\": \"<string>\",\n \"priceOverrideReason\": \"<string>\",\n \"remark\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "chg-501",
"description": "X-Ray Chest",
"quantity": "1",
"unitPrice": "800.00",
"discountAmount": "80.00",
"taxAmount": "0.00",
"totalAmount": "720.00",
"invoiceId": null,
"occurredAt": "2026-10-07T10:00:00.000Z"
}
]{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Was this page helpful?

