Create Embed Payment Config
Billing
Create Embed Payment Config
Create a payin configuration for an embedded payment component.
This is a public endpoint that allows external websites to create payment configurations for collecting payments from patients.
Args: patient_id: The patient’s ID amount_cents: The payment amount in cents is_surcharged: Whether to apply surcharge fees (default: True, uses tenant settings)
POST
Create Embed Payment Config
Creates a payin configuration for the embedded payment component. Use this when your website needs to collect a payment from a patient inside an iframe.Documentation Index
Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
Use this file to discover all available pages before exploring further.
Two modes
Simple amount
Passamount_cents for a single, flat payment. The embed shows a “Custom Amount” line item.
Itemized charge (items and discounts)
Passcharge_id to use a pre-created charge with line items, discounts, and taxes. The embed displays the full charge breakdown.
Embed URL parameters
The embed page (/embed/pay/{patientId}) accepts these query parameters:
| Parameter | Description |
|---|---|
amount | Payment amount in cents (required when charge_id is not used) |
charge_id or chargeId | Pre-created charge ID for itemized charges |
allowedMethods or allowed_methods | Comma-separated payment methods: CARD, ACH, APPLE_PAY. Use CARD to disable ACH. |
theme | light or dark |
showSummary | true (default) or false to hide the payment summary header |
Response
Whencharge_id is used, the response includes a charge object with items, totalOutstanding, and totalDiscount for display in your UI.Headers
The tenant you are making this request on behalf of
Your api key
