Generator for Peppol BIS Billing 3.0 compliant ApplicationResponse (message acknowledgment) documents.
Application responses are used to acknowledge receipt and processing status of invoices and credit notes.
Summary
Functions
Generate a Peppol-compliant UBL ApplicationResponse XML document.
Functions
Generate a Peppol-compliant UBL ApplicationResponse XML document.
Parameters
document_data- Map containing::id- Unique response ID:date- Response date (Date struct):response_code- Status code (e.g., "AB" for acknowledged, "RE" for rejected):document_reference- ID of the document being acknowledged:sender- Map with:endpoint_id,:scheme,:name:receiver- Map with:endpoint_id,:scheme,:name:status_reason- Optional reason text:note- Optional note
Response Codes
AB- Acknowledged / AcceptedRE- RejectedAP- Accepted with errorsCA- Conditionally acceptedPD- PaidIP- In processUQ- Under query
Example
document_data = %{
id: "RESPONSE-001",
date: ~D[2025-06-02],
response_code: "AB",
document_reference: "INV-123",
sender: %{
endpoint_id: "0797948229",
scheme: "0208",
name: "My Company"
},
receiver: %{
endpoint_id: "0844125969",
scheme: "0208",
name: "Supplier Inc"
}
}
xml = UblEx.Generator.ApplicationResponse.generate(document_data)