Chapter 05 of 05 · UAE sandbox

Check the result

Read the invoice’s final sandbox outcome and handle any validation errors. You need the documentId returned by the submission request.

Request the status

Set DOCUMENT_ID to the returned tracking identifier, then run:

Read the invoice statusbash
curl "https://prod.gets.complyance.io/api/v3/documents/${DOCUMENT_ID}/status" \
  --header "Authorization: Bearer ${COMPLYANCE_API_KEY}" \
  --header 'Accept: application/json'

Read data.state together with data.isTerminal. If isTerminal is false, wait before checking again and increase the delay between repeated checks. Stop polling once the response is terminal.

Interpret the result

StateWhat to do
final_validRecord the successful outcome for this environment
final_invalid or rejectedInspect the returned errors and correct the invoice
submitted or processingWait for the final result
delivery_successContinue checking if isTerminal remains false
delivery_failedInspect the response and retain the document and request identifiers

A successful sandbox result confirms sandbox processing. It does not confirm production registration or live invoice acceptance.

If something goes wrong

A validation error names a field or rule: correct that part of the invoice and review related totals before submitting the corrected data.

The document is not found: check the returned identifier, workspace key and environment.

Processing does not finish: keep the document identifier, request identifier and latest response for support. Avoid repeatedly resubmitting the same invoice.

Next, set up purchase invoice webhooks to receive notifications when your customers receive invoices.

Last updated