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

# Update customer

> Corrects a customer's profile details. Only `firstname`, `lastname` and `email` are editable — `phone` and `bvn` carry verification state and change through their own flows.

Send **at least one** of the three fields; any field you omit is left untouched. The customer is resolved scoped to your merchant account, so an ID belonging to another merchant is rejected. Email is unique per merchant, so reusing one that another of your customers already holds fails with a validation error. Requires the API key to belong to a merchant super-admin account.



## OpenAPI

````yaml openapi.json PUT /v1/customer/update/{customerId}
openapi: 3.0.3
info:
  title: Payluk ThirdParty API
  version: 1.0.0
  description: >-
    Merchant / Business API for the Payluk escrow and payments platform.


    All routes are mounted under `/v1` and authenticated with a secret key.
    Every response uses the standard envelope `{ status, message, data }`.
  contact:
    name: Payluk Developer Support
    email: support@payluk.ng
    url: https://payluk.ng
servers:
  - url: https://staging.api.payluk.ng
    description: 'Staging: use sk_test_ keys here for safe testing'
  - url: https://api.payluk.ng
    description: 'Production: use sk_live_ keys'
security:
  - bearerAuth: []
tags:
  - name: Escrow
    description: Create and manage standard escrow payment links.
  - name: Milestone Escrow
    description: Escrows that release funds in parts as milestones are confirmed.
  - name: Vault Escrow
    description: >-
      Merchant-only pooled-stake escrows: customers stake from their wallets and
      the merchant declares the winner.
  - name: Categories
    description: Organise escrows into merchant-defined categories.
  - name: Merchant Customers
    description: Manage the buyers and sellers that transact under your merchant account.
  - name: Disputes
    description: Confirm deliveries, raise disputes and resolve them.
  - name: Payments
    description: Fund wallets and escrows, verify references and manage payout details.
  - name: Debit Cards
    description: List and remove customers' saved debit cards.
  - name: Crypto Whitelist
    description: Manage whitelisted crypto withdrawal addresses.
  - name: Misc
    description: Supporting reference data.
paths:
  /v1/customer/update/{customerId}:
    put:
      tags:
        - Merchant Customers
      summary: Update customer
      description: >-
        Corrects a customer's profile details. Only `firstname`, `lastname` and
        `email` are editable — `phone` and `bvn` carry verification state and
        change through their own flows.


        Send **at least one** of the three fields; any field you omit is left
        untouched. The customer is resolved scoped to your merchant account, so
        an ID belonging to another merchant is rejected. Email is unique per
        merchant, so reusing one that another of your customers already holds
        fails with a validation error. Requires the API key to belong to a
        merchant super-admin account.
      operationId: updateCustomer
      parameters:
        - $ref: '#/components/parameters/CustomerIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                At least one of `firstname`, `lastname` or `email` must be
                present.
              minProperties: 1
              properties:
                firstname:
                  type: string
                  minLength: 1
                  description: New first name. Cannot be an empty string.
                  example: Ada
                lastname:
                  type: string
                  minLength: 1
                  description: New last name. Cannot be an empty string.
                  example: Eze
                email:
                  type: string
                  format: email
                  description: >-
                    New email address. Stored lowercased and must not already
                    belong to another customer on your account.
                  example: ada@example.com
      responses:
        '200':
          description: Customer updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
              example:
                status: 200
                message: Customer updated successfully
                data:
                  customerId: 6a19b57ffa797d3af379ca2a
                  firstname: Ada
                  lastname: Eze
                  email: ada@example.com
                  phone: '09022331122'
                  bvn: null
                  status: active
                  blockedReason: null
                  blockedAt: null
                  createdAt: '2026-05-29T15:49:19.848Z'
                  dob: null
                  permissions:
                    canWithdraw: true
                    canBuy: true
                    canSell: true
                  countryId: 69b8d4c7f80e1f661b48c9ca
        '400':
          description: >-
            Validation failed, the customer does not exist, or the email is
            already taken by another of your customers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                noFields:
                  summary: No editable field supplied
                  value:
                    status: 400
                    message: Provide at least one of firstname, lastname or email
                    data: {}
                duplicateEmail:
                  summary: Email already in use
                  value:
                    status: 400
                    message: Another customer already uses this email address
                    data: {}
                notFound:
                  summary: Unknown customer
                  value:
                    status: 400
                    message: Customer not found
                    data: {}
        '401':
          $ref: '#/components/responses/AccessDenied'
components:
  parameters:
    CustomerIdPath:
      name: customerId
      in: path
      required: true
      description: The merchant customer's unique identifier.
      schema:
        type: string
      example: 665f1b2c9a1e4d0012ab3c01
  schemas:
    CustomerResponse:
      type: object
      properties:
        status:
          type: integer
          example: 200
        message:
          type: string
          example: Customer fetched successfully
        data:
          $ref: '#/components/schemas/Customer'
    ApiError:
      type: object
      description: Standard error envelope.
      properties:
        status:
          type: integer
          example: 400
        message:
          type: string
          example: Action not allowed
        data:
          type: object
          example: {}
    Customer:
      type: object
      properties:
        id:
          type: string
          example: 665f1b2c9a1e4d0012ab3c01
        firstname:
          type: string
          example: Ada
        lastname:
          type: string
          example: Eze
        email:
          type: string
          example: ada@example.com
        phone:
          type: string
          example: '+2348012345678'
        role:
          type: string
          example: merchant_user
        status:
          type: string
          example: active
        canBuy:
          type: boolean
          example: true
        canSell:
          type: boolean
          example: true
  responses:
    AccessDenied:
      description: Access denied.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            status: 401
            message: Access denied
            data: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key as a Bearer token. The key prefix selects the
        environment: `sk_test_...` (test) or `sk_live_...` (live).

````