> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swervpay.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer KYC

> Update customer kyc

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.swervpay.co/api/v1/customers/{id}/kyc \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-Type: application/json" \
    -d '{
  	"tier": "FULL",
  	"information": {
  		"bvn": "12345678901",
  		"state": "Lagos",
  		"city": "Ikeja",
  		"country": "Nigeria",
  		"address": "No 1, Ikeja",
  		"postal_code": "100001",
  		"date_of_birth": "1990-01-01"
  	},
  	"document": {
  		"documentType": "PASSPORT",
  		"documentNumber": "A1234567",
  		"document": "https://example.com/document.jpg",
  		"passport": "https://example.com/passport.jpg"
  	}
  }'
  ```

  ```javascript Node.js theme={null}
  import { SwervpayClient } from '@swervpaydev/sdk';

  const config = {
      secretKey: "<SECRET_KEY>",
      businessId: "<BUSINESS_ID>"
  }

  const swervpay = new SwervpayClient(config);

  await swervpay.customer.kyc("<CUSTOMER_ID>", {
  	tier: "FULL",
  	information: {
  		bvn: "12345678901",
  		state: "Lagos",
  		city: "Ikeja",
  		country: "Nigeria",
  		address: "No 1, Ikeja",
  		postal_code: "100001",
  		date_of_birth: "1990-01-01"
  	},
  	document: {
  		document_type: "PASSPORT",
  		document_number: "A1234567",
  		document: "https://example.com/document.jpg",
  		passport: "https://example.com/passport.jpg"
  	}
  });
  ```

  ```php PHP theme={null}
  use Swervpaydev\SDK\Swervpay;

  $config = [
  	'business_id' => '<BUSINESS_ID>',
  	'secret_key' => '<SECRET_KEY>'
  ];

  $client = new Swervpay($config);

  $client->customer()->kyc('<CUSTOMER_ID>', [
  	'tier' => 'FULL',
  	'information' => [
  		'bvn' => '12345678901',
  		'state' => 'Lagos',
  		'city' => 'Ikeja',
  		'country' => 'Nigeria',
  		'address' => 'No 1, Ikeja',
  		'postal_code' => '100001',
  		'date_of_birth' => '1990-01-01'
  	],
  	'document' => [
  		'document_type' => 'PASSPORT',
  		'document_number' => 'A1234567',
  		'document' => 'https://example.com/document.jpg',
  		'passport' => 'https://example.com/passport.jpg'
  	]
  ]);
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"github.com/swerv-ltd/swervpay-go"
  	"log"
  )

  func main() {
  	ctx := context.Background()

  	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
          BusinessID: "<BUSINESS_ID>",
          SecretKey: "<SECRET_KEY>",
      })

      data := swervpay.CustomerKycBody{
          Tier: "FULL",
  		Tier1: swervpay.Tier1KycInput{
  			Bvn: "12345678901",
  			State: "Lagos",
  			City: "Ikeja",
  			Country: "Nigeria",
  			Address: "No 1, Ikeja",
  			PostalCode: "100001",
  			DateOfBirth: "1990-01-01",
  		},
  		Tier2: swervpay.Tier2KycInput{
  			DocumentType: "PASSPORT",
  			DocumentNumber: "A1234567",
  			Document: "https://example.com/document.jpg",
  			Passport: "https://example.com/passport.jpg",
  		},
      }

  	resp, err := client.Customer.Kyc(ctx, "<CUSTOMER_ID>",  data)

  	if err != nil {
  		log.Fatal("error", err.Error())
  		return
  	}
  }
  ```
</RequestExample>


## OpenAPI

````yaml POST /customers/{id}/kyc
openapi: 3.0.0
info:
  title: Swervpay Developer API Specification
  version: 0.0.0
servers:
  - url: https://api.swervpay.co/api/v1
    description: Production API
  - url: https://sandbox.swervpay.co/api/v1
    description: Sandbox API
security:
  - bearerAuth: []
paths:
  /customers/{id}/kyc:
    post:
      tags:
        - customer.kyc
      description: Update customer kyc
      operationId: customerKyc
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenapiCustomerKycRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseSuccessResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
components:
  schemas:
    OpenapiCustomerKycRequest:
      type: object
      properties:
        document:
          $ref: '#/components/schemas/TypesTier2KycInput'
        information:
          $ref: '#/components/schemas/TypesTier1KycInput'
        tier:
          type: string
    ResponseSuccessResponse:
      type: object
      properties:
        message:
          type: string
    UsererrorError:
      type: object
      properties:
        message:
          type: string
        values:
          type: object
          additionalProperties: {}
    TypesTier2KycInput:
      type: object
      properties:
        document:
          type: string
        document_number:
          type: string
        document_type:
          type: string
        passport:
          type: string
    TypesTier1KycInput:
      type: object
      properties:
        address:
          type: string
        bvn:
          type: string
        city:
          type: string
        country:
          type: string
        date_of_birth:
          type: string
        phone_number:
          type: string
        postal_code:
          type: string
        ssnit:
          type: string
        state:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````