Receiving Digital Invoices
note
For the format of digital invoices, please refer to the Peppol Specification.
There are two methods to receive digital invoices. One is by using the Peppol Connect API, and the other is by using a Webhook.
Using the Peppol Connect API
POST /v2/receive_documents/xml_invoice
$ curl -X POST https://api.e-invoice.moneyforward.com/v2/receive_documents/xml_invoice \
-d '@body.json'
body.json
{
"participant_id": "0188:0000000000000",
"received_at": "2023-01-01T00:00:00Z"
}
Upon successful receipt, the response will be returned as follows:
<ReceivedInvoices>
<Invoice>
<Payload>
<Invoice>
<!-- Please refer to Peppol specification at the top for details -->
</Invoice>
</Payload>
<MessageID>082597d4-5108-482b-b0b3-11844de562c7</MessageID>
<ReceivedAt>2023-01-01T00:00:00Z</ReceivedAt>
<SenderParticipantID>0188:0000000000001</SenderParticipantID>
<ReceiverParticipantID>0188:0000000000002</ReceiverParticipantID>
</Invoice>
</ReceivedInvoices>
Using a Webhook
With Peppol Connect, you can receive digital invoices received via Peppol through a Webhook. By registering a Webhook URL in the Peppol Connect management screen, you can receive digital invoices received via Peppol at any URL. This feature is currently under development, but it is planned to include the following functionalities:
- HMAC Authentication: To detect data tampering and prevent impersonation, a signature can be attached to the header for sending, and the received request can be verified.
- Request Format: The data received by the Webhook event is planned to include the unique Message ID that each invoice possesses, rather than the digital invoice information itself.