API Reference

For B2B

For businesses like a e-commerce marketplace or a SaaS business you can use the Invoice API and Credit Note API to issue invoices and refunds to your customers who are tax registered.

Issuing a Invoice

For more details please check Invoice API > Report an invoice.

Below cURL request, reports an invoice to ZATCA.

curl --request POST \
     --url https://api.wafeq.com/v1/zatca/invoices/report/ \
     --header 'Authorization: Api-Key <Your API Key>' \
     --header 'Accept: application/json; version=v1' \
     --header 'Content-Type: application/json' \
     --header 'X-Zatca-Environment: production' 
     --data '
{
  "document": <Invoice Payload>,
}
'

If you would like to additionally also deliver the invoice to your customer via Wafeq, you can provide the channel information to do the same.

curl --request POST \
     --url https://api.wafeq.com/v1/zatca/invoices/report/ \
     --header 'Authorization: Api-Key <Your API Key>' \
     --header 'Accept: application/json; version=v1' \
     --header 'Content-Type: application/json' \
     --header 'X-Zatca-Environment: production' 
     --data '
{
  "document": <Simplified Invoice Payload>,
  "channels": <Channel information>,
}
'

Issuing a Refund

For more details please check Credit Note API > Report an credit note.

Below cURL request, reports an credit note to ZATCA.

curl --request POST \
     --url https://api.wafeq.com/v1/zatca/credit-notes/report/ \
     --header 'Authorization: Api-Key <Your API Key>' \
     --header 'Accept: application/json; version=v1' \
     --header 'Content-Type: application/json' \
     --header 'X-Zatca-Environment: production' 
     --data '
{
  "document": <Credit Note Payload>,
}
'

If you would like to additionally also deliver the credit note to your customer via Wafeq, you can provide the channel information to do the same.

curl --request POST \
     --url https://api.wafeq.com/v1/zatca/credit-notes/report/ \
     --header 'Authorization: Api-Key <Your API Key>' \
     --header 'Accept: application/json; version=v1' \
     --header 'Content-Type: application/json' \
     --header 'X-Zatca-Environment: production' 
     --data '
{
  "document": <Credit Note Payload>,
  "channels": <Channel information>,
}
'