Skip to main content
POST
/
api
/
v2
/
credit_notes
/
{document_id}
/
einvoice_status
curl --request POST \ --url https://{domain}.chargebee.com/api/v2/credit_notes/CN20250205/einvoice_status \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'einvoicing_provider_id=avalara' \ --data-urlencode 'status=ACCEPTED' \ --data-urlencode 'timestamp=2025-05-23T13:22:50.519Z'
{
  "errors": [
    {
      "message": "The request did not contain a required property",
      "code": "MISSING_REQUIRED_DATA",
      "help_url": "https://docs.example.com/errors#MISSING_REQUIRED_PARAMETER"
    }
  ],
  "related_documents": [
    {
      "document_id": "<string>",
      "document_type": "ubl-applicationresponse",
      "timestamp": "<string>",
      "provider_response": "{\"source\":\"avalara\",\"received_at\":\"2025-12-29T12:17:47.791Z\",\"payload\":{\"id\":\"ad110f2d-9d0a-4435-a8ea-a36caaceb8c7\",\"companyId\":\"304382fd-1268-4e7b-86db-a8d51ff309d5\",\"status\":\"Complete\"}}",
      "provider_references": "[{\"key\":\"Receipt Message ID\",\"value\":\"3ed9530e-f2e8-4733-ace8-f868a5e077eb@einvoicing.sbx.avalara.io\"},{\"key\":\"Response Message ID\",\"value\":\"3ed9530e-f2e8-4733-aeffe8-f868a5e077eb@einvoicing.sbx.avalara.io\"}]",
      "errors": "[{\"code\":\"AR_VALIDATION_FAILED\",\"message\":\"Invalid response code\"}]\n"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://spidocs.chargebee.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

document_id
string
required

Unique identifier of the submitted document.

Body

application/x-www-form-urlencoded
status
enum<string>
required

Current status of the document after processing by the provider.

Available options:
SUCCESS,
IN_PROGRESS,
FAILED,
ACCEPTED,
REJECTED,
MESSAGE_ACKNOWLEDGEMENT,
IN_PROCESS,
UNDER_QUERY,
CONDITIONALLY_ACCEPTED,
PAID
timestamp
string
required

Timestamp (UTC) in seconds indicating when the status was determined.

einvoicing_provider_id
string

Identifier of the e‑invoicing provider

provider_response
string

JSON string containing an optional array of raw payloads received from the e-invoicing provider that is used for downstream mapping and for audits. The JSON should be an array of objects with the following structure: [{"source": "string", "received_at": "date-time", "payload": {object}}]

Example:

"{\"source\":\"avalara\",\"received_at\":\"2025-12-29T12:17:47.791Z\",\"payload\":{\"id\":\"ad110f2d-9d0a-4435-a8ea-a36caaceb8c7\",\"companyId\":\"304382fd-1268-4e7b-86db-a8d51ff309d5\",\"status\":\"Complete\"}}"

provider_references
string

Optional JSON array of key-value pairs returned by the e-invoicing provider (e.g. Receipt Message ID, Response Message ID, Receiver ID). Chargebee stores this in einvoice properties and appends entries on each callback, similar to provider_response. Format: [{"key": "string", "value": "string"}, ...]

Example:

"[{\"key\":\"Receipt Message ID\",\"value\":\"3ed9530e-f2e8-4733-ace8-f868a5e077eb@einvoicing.sbx.avalara.io\"},{\"key\":\"Response Message ID\",\"value\":\"3ed9530e-f2e8-4733-aeffe8-f868a5e077eb@einvoicing.sbx.avalara.io\"},{\"key\":\"Receiver ID\",\"value\":\"3ed9530e-f2e8-4733-ace8-f868a5e077eb@sbx.avalara.io\"}]"

errors
object[]

Optional list of errors (if any) returned by the provider if status is FAILED. Encoded using Chargebee's form-urlencoded bracket notation, e.g. errors[0][code].

Maximum array length: 50

Optional list of related (secondary) document status objects, encoded using Chargebee's form-urlencoded bracket notation, e.g. related_documents[0][document_id].

Use this to include secondary documents such as ubl-applicationresponse that influenced the primary document outcome. Chargebee may store this for diagnostics; it does not change the primary idempotency key.

Maximum array length: 10

Response

Callback payload received and validated successfully. No retry required.