# 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.

- [TypeScript](https://docs.complyance.io/sdks/typescript/): For Node.js applications, installed from npm.
- [Python](https://docs.complyance.io/sdks/python/): Installed from PyPI with pip.
- [Java](https://docs.complyance.io/sdks/java/): Added as a Maven or Gradle dependency.
- [.NET](https://docs.complyance.io/sdks/dotnet/): Installed from NuGet.
- [Go](https://docs.complyance.io/sdks/go/): Added as a Go module.
- [PHP](https://docs.complyance.io/sdks/php/): Installed with Composer.
- [Ruby](https://docs.complyance.io/sdks/ruby/): Installed as a gem.

The SDKs call the same API as everything else. To try a request without writing code, use the [API playground](https://docs.complyance.io/api/).

## 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.

| SDK | Package | Version in the guide | Countries |
| - | - | - | - |
| TypeScript | `unify-sdk` | `3.0.21-beta`, beta | Saudi Arabia, Malaysia, UAE, Belgium, Germany |
| Python | `io-complyance-unify-sdk` | `3.0.2b0`, beta | Saudi Arabia, Malaysia, UAE, Belgium, Germany |
| Java | `io.complyance:unify-sdk` | `3.0.23-beta`, beta | Saudi Arabia, Malaysia, UAE, Belgium, Germany |
| .NET | `Complyance.SDK.dotNet` | `3.0.36-beta`, beta | Saudi Arabia, Malaysia, UAE |
| Go | `github.com/complyance-io/complyance-go-sdk/v3` | `v3.0.5-beta`, beta | Saudi Arabia, Malaysia, UAE. `SubmitJSONSingle`, which the guide uses, does not check the country. |
| PHP | `io.complyance/unify-sdk` | `3.0.11`, stable | Saudi Arabia, Malaysia, UAE, Belgium, Germany |
| Ruby | `io-complyance-unify-sdk` | `3.0.12`, stable | Saudi Arabia, Malaysia, UAE |

No SDK has a country value for Oman. Oman is available in sandbox only; send its invoices with the [API](https://docs.complyance.io/api-reference/unify/submit-and-retrieve/), as shown in the [Oman examples](https://docs.complyance.io/countries/om/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.

| SDK | Format the guide uses |
| - | - |
| Java | Current: pass `true` as the last argument. Versions `3.0.18-beta` and later accept it. |
| PHP | Current: pass `true` as the last argument. |
| Go | Current: the guide sends requests with `SubmitJSONSingle`, from `v3.0.5-beta`. |
| TypeScript | Earlier. |
| Python | Earlier. |
| .NET | Earlier. Versions `3.0.29-beta` and later can also send the current format; the guide uses the earlier one. |
| Ruby | Earlier. |

The current format is described in [Submit and retrieve](https://docs.complyance.io/api-reference/unify/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:

```json title="Earlier format, invoice failed validation"
{
  "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"]
        }
      ]
    }
  }
}
```

| Field | What it tells you |
| - | - |
| `status` | `success` when Complyance received the request. It does not say whether the invoice is valid. |
| `data.document.documentId` | Keep it to check the document’s status later. |
| `data.validation.success` | `true` when the invoice passed validation, `false` when it did not. |
| `data.validation.errors` | Every 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`.

Source: https://docs.complyance.io/sdks/
