Skip to main content
POST

Authorizations

Authorization
string
header
required

Body

application/json

Represents an invoice or credit note document to be validated and submitted via the e-invoicing provider.

id
string
required

A unique identifier for the document being submitted. This typically represents the invoice number or credit note number generated by Chargebee.

type
enum<string>
required

Type of document, either an invoice or a credit note.

Available options:
INVOICE,
CREDIT_NOTE
country
string
required

The ISO country code for the scenario.

Example:

"DE"

model
enum<string>
required

Indicates the eInvoicing flow model that governs the document exchange and processing mechanism. Different countries adopt different models based on legal, technical, and administrative mandates. Supported values:

  • PEPPOL: A standardized, secure eInvoicing network enabling cross-border electronic document exchange between businesses and governments.
  • EINVOICE: Traditional eInvoicing model where invoices are digitally exchanged between businesses and sometimes stored.
  • CLEARANCE: Invoices must be pre-approved by a tax authority before they are sent to the buyer.
  • REPORTING: Invoices are shared with tax authorities after issuance, usually for compliance and audit purposes.
  • ZUGFERD: A hybrid eInvoicing format used in Germany combining PDF and XML for human and machine readability.
  • CTC: Continuous Transaction Controls involve real-time or near-real-time invoice validation and transmission to tax authorities.
  • NEMHANDEL: Denmark’s national infrastructure for eInvoicing that supports secure delivery via specific formats like OIOUBL.
  • FACE: Spain’s centralized system (FACe/FACeB2B) for routing invoices to government or private recipients.
  • VERIFACTU: Spain’s mechanism for validating and reporting sales invoices directly to the tax agency.
Available options:
PEPPOL,
EINVOICE,
CLEARANCE,
REPORTING,
ZUGFERD,
CTC,
NEMHANDEL,
FACE,
VERIFACTU
Example:

"PEPPOL"

issue_date
string<date>
required

The date when the document was issued. Format "YYYY-MM-DD"

tax_date
string<date>
required

The date used to determine tax. Format "YYYY-MM-DD"

currency_code
string
required

The currency code ISO 4217 format for the document.

due_date
string<date>
required

The date when the payment is due. Format "YYYY-MM-DD".

amount
number
required

Total payable amount for the document, including taxes.

status
enum<string>
required

Billing status of the invoice or credit note in Chargebee.

Invoice statuses (when type is INVOICE):

  • PAID — Indicates a paid invoice.
  • POSTED — Payment is not yet collected and will remain in this state until the due date to indicate the due period.
  • PAYMENT_DUE — Payment is not yet collected and is being retried as per retry settings.
  • NOT_PAID — Payment has not been made and all attempts to collect have failed.
  • VOIDED — Indicates a voided invoice.

Credit note statuses (when type is CREDIT_NOTE):

  • ADJUSTED — Indicates an adjustment credit note.
  • REFUNDED — Indicates the credit note has been fully refunded.
  • REFUND_DUE — Indicates a refund is due on the credit note.
  • VOIDED — Indicates a voided credit note.
Available options:
PAID,
POSTED,
PAYMENT_DUE,
NOT_PAID,
VOIDED,
ADJUSTED,
REFUNDED,
REFUND_DUE
Example:

"PAYMENT_DUE"

taxable_amount
number
required

Total document amount excluding tax (VAT).

amount_due
number
required

Outstanding balance remaining on the document.

accounting_supplier_party
object
required

Party responsible for issuing the document (that is, the supplier). This represents the legal entity or business that creates the invoice and bears responsibility for delivering goods or services.

accounting_customer_party
object
required

Party responsible for receiving the invoice (i.e., the customer).

lines
object[]
required
tax_total
object
required

Represents the total tax details for the document.

transaction_type
enum<string>

The type of transaction (B2B, B2C, B2G).

Available options:
B2B,
B2C,
B2G
Example:

"B2B"

document_type
string

Type of business document.

Example:

"ubl-invoice"

total_discount
number

Sum of all discounts applied across line items on the document.

note
string

A textual note that gives unstructured information that is relevant to the Document as a whole. Such as the reason for any correction or assignment note in case the document has been factored.

billing_reference
object[]

A group of business terms providing information on one or more preceding invoices. This enhances traceability in workflows where a document is linked to earlier billing records. For credit notes this is essential as they must reference the original invoice they amend.

payment_means
object[]

A list of payment methods with corresponding payment details.

overrides
object

Optional structure used to override the standard Chargebee SPI document model fields with a flexible field-value-based approach.

This is typically used by adapters where field mapping is configured manually by the merchant in the Chargebee UI, instead of relying on pre-defined mappings managed by the provider or Chargebee.

When present, the overrides object allows the adapter to entirely ignore the standard document payload and instead:

  • Use field_mapping to determine where values go in the provider's schema
  • Use values to retrieve the corresponding input data using dot-paths or array-style paths

  • field_mapping: A list of mapping rules that define how Chargebee parameter paths (keys from values) should be translated to the corresponding field paths in the provider schema. Includes custom fields too which are defined by merchant in chargebee.

    Each item must include:

    • target: The field path in the e-invoicing provider schema (e.g. Invoice.cbc:ID)
    • One of the below
    • source: A dot-notated field path or array path from the values section (e.g. invoice.id, line_items[].tax_category)
    • fixed_value (optional): Used if the field always has a constant value (e.g. 380 for InvoiceTypeCode)
    • expr: An inline expression evaluated against the values object to compute the target field’s value. This is used when the value depends on conditional logic, tax scenarios, payment methods, or other derived rules.
  • values: Each key in this object uses dot-notation to reference the source path, including arrays and nested arrays — for example: invoice.issue_date, line_items[].id, or line_items[].tax_category[].id.

    • Scalar values (e.g., strings, numbers, dates) should be represented as flat keys:

    • Complex types like arrays (e.g., line_items) should be represented as nested JSON:

This model supports maximum flexibility by separating the actual data values from Chargebee's internal schema structure. It enables provider-specific document construction without tightly coupling the adapter to Chargebee's native schema.

Response

Document submitted successfully.

document_id
string
required

The unique identifier assigned to the document by the e-invoicing provider. This identifier must be used for subsequent operations such as retrieving the document status and downloading the document.

status
enum<string>
required

The current status of the submitted document.

Available options:
ACCEPTED,
FAILED,
SUCCESS
request_id
string

A unique identifier assigned to the request for tracking and correlation purposes across systems and logs.

provider_interaction
object

Captures the interaction between the adapter and the external e-invoicing provider. Includes both the outbound request details and the inbound response received from the provider. Intended for internally hosted adapters for audit and traceability of SPI transactions.

Example: