# Onboard your customer

*Chapter 02 of 06 · UAE*

Create your customer’s UAE company and first source in sandbox. You need the API key from the previous chapter and your customer’s ASP authorization.

> **Before you start**
>
> Have the sandbox key from [Connect your application](https://docs.complyance.io/partner-platform/isv/first-uae-invoice/connect/) loaded as `COMPLYANCE_API_KEY`.

## Step 1: Ask your customer to authorize Complyance

A UAE company can be onboarded only after it has named Complyance as its accredited service provider (ASP), the provider that exchanges its e-invoices. Your customer does this, not you:

1. Your customer completes the ASP linkage with the Federal Tax Authority (FTA) for the environment you are testing in.
2. They tell you the 10-digit tax identification number (TIN) and the administrator email they used. The TIN is not the 15-digit VAT number.

You send exactly that TIN and email in the next step. Complyance looks for the pending linkage that matches them. [Prepare a UAE company for onboarding](https://docs.complyance.io/partner-platform/isv/companies/prerequisites/) has the details.

## Step 2: Send the onboarding request

```bash title="Create the customer and save the response"
curl --request POST 'https://prod.gets.complyance.io/v3/connect/companies' \
  --header "X-API-Key: ${COMPLYANCE_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "sourceName": "acme-dubai",
    "sourceVersion": "v1",
    "countryCode": "AE",
    "tin": "1234567890",
    "contactPersonEmail": "finance@example.com",
    "contactPersonName": "Alex Morgan",
    "branchName": "Dubai",
    "platformEnvironment": "sandbox"
  }' \
  --output company-response.json
```

Replace the sample `tin` and `contactPersonEmail` with your customer’s. Every field is explained in [Onboard a UAE company through Connect](https://docs.complyance.io/partner-platform/isv/companies/onboard/).

You should see HTTP `201`. `company-response.json` looks like this, with your own values:

```json title="company-response.json"
{
  "success": true,
  "data": {
    "companyId": "66b9f0a1c2d3e4f567890123",
    "sourceId": "01JABCDEF1234567890SOURCE",
    "branchId": "66b9f0b2c2d3e4f567890456",
    "userGivenBranchId": "acme-dubai",
    "peppolParticipantId": "0235:1234567890",
    "legalName": "Acme Trading LLC",
    "tin": "1234567890",
    "sourceName": "acme-dubai",
    "sourceVersion": "v1",
    "countryCode": "AE",
    "branchName": "Dubai",
    "platformEnvironment": "sandbox",
    "readyForInvoicing": true,
    "mappingReadiness": {
      "status": "READY",
      "templateId": "example-default-mapping"
    }
  },
  "meta": {
    "requestId": "01JABCDEF1234567890REQUEST",
    "timestamp": "2026-10-01T09:00:00.000Z",
    "workspaceId": "66b9e000c2d3e4f567890000"
  }
}
```

The company’s Peppol ID is `0235:` followed by its TIN.

## Step 3: Save the source

Set `COMPLYANCE_SOURCE` to the returned source name and version. Store the company and branch identifiers in your application too.

```bash title="Keep the source for the next chapter"
export COMPLYANCE_SOURCE="$(jq -er '.data | .sourceName + ":" + .sourceVersion' company-response.json)"
```

This uses `jq`, a command-line JSON tool. Keep the key and the saved response out of source control.

## Step 4: Confirm readiness

```bash title="Check before preparing the invoice"
jq -e '.success == true and .data.readyForInvoicing == true' company-response.json
```

The command must print `true`. If it prints `false`, read `data.mappingReadiness.code`:

- `CONNECT_MAPPING_INELIGIBLE`: the default mapping’s required test cases have not passed yet. Run them in the [Testbed step](https://docs.complyance.io/one-platform/developer-portal/integration-engine/test/) of **Default GETS Mapping**, then [find the company](https://docs.complyance.io/partner-platform/isv/companies/list/) to check its readiness again.
- Any other code: see [Use the default UAE mapping](https://docs.complyance.io/partner-platform/isv/mappings-and-payloads/).

## If something goes wrong

**`ASP_LINKAGE_NOT_FOUND`:** no pending linkage matches the TIN and email you sent. Check both with your customer. If they have not completed the linkage for this environment yet, ask them to.

**Anything else, or no response:** see [Onboard a UAE company through Connect](https://docs.complyance.io/partner-platform/isv/companies/onboard/#if-something-goes-wrong). Do not send the request again before you have checked whether the company already exists.

> **Ready to prepare an invoice**
>
> You have an onboarded customer and a source with `readyForInvoicing: true`. Keep `COMPLYANCE_SOURCE` for the next chapter: [Prepare an invoice](https://docs.complyance.io/partner-platform/isv/first-uae-invoice/prepare/).

---

**Next chapter (03):** [Prepare an invoice](https://docs.complyance.io/partner-platform/isv/first-uae-invoice/prepare/). Build the invoice payload for your UAE customer.

Source: https://docs.complyance.io/partner-platform/isv/first-uae-invoice/onboard/
