Webhook Event
"DOCUMENT.DELIVERED" Event
This event is triggered to supplier when a document is delivered to the customer.
Webhook Event Payload
Field | Description |
---|---|
type | The Event Type. |
document_id | The unique identifier of the document. |
endpoint_id | The ID of member of E-invoice |
Example Event Payload
{
"type": "DOCUMENT.DELIVERED",
"document_id": "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
"endpoint_id": "KHUID000001",
}
Document "RECEIVED" Event
This event is triggered when a document has been sent and successfully validated. It indicates that you are the receiver of the document.
Webhook Event Payload
Field | Description |
---|---|
type | The Event Type. |
document_id | The unique identifier of the document. |
endpoint_id | The ID of member of E-invoice |
Note: Upon receiving the document_id, you can retrieve the XML version of the document via Download XML document.
Example Event Payload
{
"type": "DOCUMENT.RECEIVED",
"document_id": "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
"endpoint_id": "KHUID000001",
}
Document "STATUS UPDATED" Event
This event is sent to the supplier after the invoice status is updated by the customer.
Webhook Event Payload
Field | Description |
---|---|
type | The Event Type. |
document_id | The unique identifier of the document. |
endpoint_id | The ID of member of E-invoice |
status | The newly updated status of the invoice. Valid status can be found in Document Status Type |
Example Event Payload
{
"type": "DOCUMENT.STATUS_UPDATED",
"document_id": "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
"endpoint_id": "KHUID000001",
"status": "ACCEPTED"
}
Note
- If polling is used instead of webhooks, the document status will also be available in the response body of the Get Document Detail request.
Entity "REVOKED" Event
This event is triggered when a entity disconnected.
Webhook Event Payload
Field | Description |
---|---|
type | The ENTITY.REVOKED view all event type Event Type. |
endpoint_id | The unique identifier of the document. |
Example Event Payload
{
"type": "ENTITY.REVOKED",
"endpoint_id": "KHUID000001",
}
Last updated on