SDKs

Send invoices to Complyance from your own code in the language you already use. Each guide takes you from installing the package to submitting an invoice in sandbox.

Every guide follows the same steps: install the package, configure it with your API key, send a sample payload so you can map it to GETS, submit an invoice, check its status, retrieve purchase invoices and handle errors.

The SDKs call the same API as everything else. To try a request without writing code, use the API playground.

Versions and countries

Each SDK sends invoices only for the countries it knows. It refuses any other country in sandbox and production before it sends anything.

SDKPackageVersion in the guideCountries
TypeScriptunify-sdk3.0.21-beta, betaSaudi Arabia, Malaysia, UAE, Belgium, Germany
Pythonio-complyance-unify-sdk3.0.2b0, betaSaudi Arabia, Malaysia, UAE, Belgium, Germany
Javaio.complyance:unify-sdk3.0.23-beta, betaSaudi Arabia, Malaysia, UAE, Belgium, Germany
.NETComplyance.SDK.dotNet3.0.36-beta, betaSaudi Arabia, Malaysia, UAE
Gogithub.com/complyance-io/complyance-go-sdk/v3v3.0.5-beta, betaSaudi Arabia, Malaysia, UAE. SubmitJSONSingle, which the guide uses, does not check the country.
PHPio.complyance/unify-sdk3.0.11, stableSaudi Arabia, Malaysia, UAE, Belgium, Germany
Rubyio-complyance-unify-sdk3.0.12, stableSaudi Arabia, Malaysia, UAE

No SDK has a country value for Oman. Oman is available in sandbox only; send its invoices with the API, as shown in the Oman examples.

Install the exact version a guide names.

Response formats

Unify answers in one of two formats, depending on the request. A request with the new-api: true header uses the current format. A request without it uses the earlier format.

SDKFormat the guide uses
JavaCurrent: pass true as the last argument. Versions 3.0.18-beta and later accept it.
PHPCurrent: pass true as the last argument.
GoCurrent: the guide sends requests with SubmitJSONSingle, from v3.0.5-beta.
TypeScriptEarlier.
PythonEarlier.
.NETEarlier. Versions 3.0.29-beta and later can also send the current format; the guide uses the earlier one.
RubyEarlier.

The current format is described in Submit and retrieve. A validated invoice returns documentId at the top level, and an invoice that fails validation returns HTTP 422 with an errors list.

The earlier format always wraps the result in status, message and data, even when the invoice fails validation:

Earlier format, invoice failed validationjson
{
  "status": "success",
  "message": "Unify processing completed successfully",
  "data": {
    "document": {
      "documentId": "01K5EXAMPLE00000000000142",
      "documentNumber": "INV-2026-0142"
    },
    "validation": {
      "success": false,
      "errors": [
        {
          "code": "GETS-LINE-005",
          "message": "Line item price is required",
          "path": ["lineItems", 0, "price", "amount"]
        }
      ]
    }
  }
}
FieldWhat it tells you
statussuccess when Complyance received the request. It does not say whether the invoice is valid.
data.document.documentIdKeep it to check the document’s status later.
data.validation.successtrue when the invoice passed validation, false when it did not.
data.validation.errorsEvery problem found, each with a code, a message and the GETS field in path.

A sample payload sent for mapping has no document or validation; message is Unify request processed successfully.