# KYC

The KYC Service allows you to verify your PSUs before they can initiate payments. KYC is completed via redirection to Open Payments' hosted flow, where the PSU can submit required identity and verification data. Creating a new KYC process on an organisation generates a URL to the KYC webform, which is accessible for 24 hours. This guide shows you how to initiate a KYC process. 

> Requests to the KYC Service API require an [access token](get_access_token.md) with `scope` set to `paymentinitiation` `corporate`. 

##

### 1. Create KYC

The first step is to create a new KYC for the organisation wishing to make payments, specifying its `PSU-Corporate-ID` and `countryCode`. 

#### Endpoint

```http
POST /kyc/integration/v1/new/{PSU-Corporate-ID}
```

#### Path Parameter

| Name               | Type   | Description                                                                                                |
| ------------------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| `PSU-Corporate-ID` | string | The Corporate ID of the PSU when acting on behalf of an organisation, e.g. Org. nummer for SE, KVK for NL. |

#### Query Parameter

| Name          | Type   | Description                                           |
| ------------- | ------ | ----------------------------------------------------- |
| `countryCode` | string | ISO country code for the country of the organisation. |

#### Request Headers

| Name           | Type         | Description                                                                       |
| -------------- | ------------ | --------------------------------------------------------------------------------- |
| `X-Request-ID` | string(uuid) | The ID of the request, unique to the call, as determined by the initiating party. |

```bash
curl -X POST "https://api.openbankingplatform.com/kyc/integration/v1/new/5560160680?countryCode=SE" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "X-Request-ID: ce3bf611-71d5-44c6-bfbe-78a48ecdda96"
```

#### Response

```json
{
  "kycUrl": "https://kyc.openbankingplatform.com/?instanceId=070a4c80-ceca-4964-8003-1e20b94ef710"
}
```

The URL in the response directs the PSU to the webform, where they will be guided through the KYC process.

:::info{title="Non-signatory Flow"}

If the PSU completing the KYC does not have signatory rights for the organisation, the completed webform can be shared with an authorised signatory for review and signing. 

:::

:::warning 

The webform URL expires after **24 hours**. If the form is not completed and signed within this time, a new URL must be generated.

:::

### 2. Get KYC Status 

Once the form is submitted, you can check if the KYC was successful by making the following request. 

#### Endpoint

```http
GET /kyc/integration/v1/status/{PSU-Corporate-ID}
```

#### Path Parameter

| Name               | Type   | Description                                                                                                |
| ------------------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| `PSU-Corporate-ID` | string | The Corporate ID of the PSU when acting on behalf of an organisation, e.g. Org. nummer for SE, KVK for NL. |

#### Request Headers

| Name           | Type         | Description                                                                       |
| -------------- | ------------ | --------------------------------------------------------------------------------- |
| `X-Request-ID` | string(uuid) | The ID of the request, unique to the call, as determined by the initiating party. |

```bash
curl -X GET "https://api.openbankingplatform.com/kyc/integration/v1/status/5560160680" \
  -H "X-Request-ID: fc29ef1a-705d-43ed-9785-773d29408881"
```

#### Response

```json
{
  "psuCorporateId": "1234567890",
  "kycStatus": "Valid",
  "kycValidUntil": "2026-05-19"
}
```

When the `kycStatus` is `Valid`, the organisation can start making payments.