# KYC Sharing Customer Registration

Allows you to share customer details with Banxa before an Order is created. This reduces the need for customers to re-submit personal details and upload KYC documentation during the Banxa checkout flow. Detailed guide on how to implement this API can be found here.

This endpoint is restricted and subject to Banxa approval.

Endpoint: POST /api/identities
Version: 1.3
Security: sec0

## Header parameters:

  - `Accept` (string)

  - `X-Request-Id` (string)
    This is the correlation ID related to the request.

## Request fields (application/json):

  - `account_reference` (string, required)
    Unique customer reference provided by you. This should be the same value that is passed when calling the calling the [Create Order](ref:create-order) endpoint.

  - `email` (string, required)
    Customer's email address. Must be a valid email address.

  - `mobile_number` (string)
    Customer's contact number. Must be a valid mobile number and must include the country code.

  - `customer_identity` (object)
    An array of fields containing the customer's personal details.

  - `customer_identity.given_name` (string)
    Customer's given / first name.

  - `customer_identity.surname` (string)
    Customer's surname / last name.

  - `customer_identity.dob` (string)
    Customer's date of birth (e.g. "1985-01-31"). Required to format as ISO 8601 Date format : YYYY-MM-DD.

  - `customer_identity.taxId` (string)
    This is the national identifier for the customer, for example, the customer's Social Security number (SSN) in the US. Must be a nine-digit number in the format "AAA-GG-SSSS".

  - `customer_identity.taxState` (string)
    This is the tax state that is associated with the taxId value. Required format as two characters. Note that there is validation as we do not accept any states where Banxa is not licensed to service per the Get States API call.

  - `customer_identity.residential_address` (object)

  - `customer_identity.residential_address.address_line_1` (string)
    Street number, street name and street type/suffix.

  - `customer_identity.residential_address.suburb` (string)
    Address city or suburb. E.g. "2 Abbey Road".

  - `customer_identity.residential_address.post_code` (string)
    Address postal / PIN / ZIP code.

  - `customer_identity.residential_address.state` (string)
    Address state / region.

  - `customer_identity.residential_address.country` (string)
    Customer's country of residence. Required to be formatted using ISO 3166 two-letter country code e.g. "US" or "AU".

  - `identity_documents` (array)
    An array of objects containing a type, data and links to the location of the customer's KYC documents.

  - `identity_documents.type` (string, required)
    Supported values are PASSPORT , DRIVING_LICENSE , IDENTIFICATION, SELFIE or PROOF_OF_ADDRESS.

  - `identity_documents.images` (object)
    URL link to where the identity image is stored. One or several image links must be passed if the image object passed, i.e. for a Driver's License an image of the front and back of the document should be passed. The link must be an encrypted https:// request. Acceptable formats are JPEG, JPG, PNG and PDF. The minimum file size is 32KB and the maximum file size is 10MB.

  - `identity_documents.images.link` (string)
    Image URL (e.g. "https://www.orimi.com/pdf-test.pdf"). This should ideally be a one time link to download the document that shows the information captured, to ensure it will not be downloaded by any other party. The image link should point to where the image is stored, and all the information we need to retrieve the image should be contained in the link.

  - `identity_documents.images.base64` (string)
    Image encoded as a base64 blob. e.g. VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==. This is can be used instead of a link.

  - `identity_documents.images.mimetype` (string)
    MIME type related to base64 passed, and will be mandatory if base64 is used.

  - `identity_documents.data` (object)
    If the document "type" is "PASSPORT" , "DRIVING_LICENSE" or "IDENTIFICATION", then we request you send the "data" field to provide the document information. These are not required for other document types.

  - `identity_documents.data.number` (string)
    The unique document number.

  - `identity_sharing` (array)
    An array of objects containing KYC outcomes. Required for Sumsub only.

  - `identity_sharing.provider` (string, required)
    KYC provider that you have used, currently sumsub is the only supported value. Required for Sumsub only.

  - `identity_sharing.token` (string, required)
    Customer token ID that is supplied by the KYC provider that will be used by Banxa to retrieve customer KYC details. Required for Sumsub only.

  - `occupation_industry` (string)
    Customer's occupation industry. Please contact Banxa for a list of accepted values.

  - `occupation` (string)
    Customer's occupation, which must be associated to the Customer's 'occupation_industry'. Please contact Banxa for a list of accepted values. Required if 'occupation_primary' is passed.

  - `purpose_of_tx` (string)
    Customer's Purpose of Transaction. Please contact Banxa for a list of accepted values.

## Response 200 fields (application/json):

  - `data` (object)

  - `data.account` (object)

  - `data.account.account_id` (string)
    Example: "d3be8dfe1eea6f55725d5784a83d4ce9"

  - `data.account.account_reference` (string)
    Example: "test001001"

## Response 422 fields (application/json):

  - `body` (object) — one of:
    - variant 1:
      - `message` (string)
        Example: "The given data was invalid."
      - `errors` (object)
      - `errors.account_reference` (array)
        Example: ["The account reference field is required when mobile number is not present."]
      - `errors.mobile_number` (array)
        Example: ["The mobile number field is required when account reference is not present."]
    - variant 2:
      - `message` (string)
        Example: "The given data was invalid."
      - `errors` (object)
      - `errors.customer_identity.dob` (array)
        Example: ["The customer identity.dob does not match the format Y-m-d."]


