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

# Update a counterparty



## OpenAPI

````yaml /openapi.json patch /v1/counterparties/{id}
openapi: 3.1.0
info:
  title: KryptaPay API
  description: >-
    API B2B de paiements numériques pour l'Afrique francophone.


    ## Authentification

    Deux méthodes sont supportées :

    - **Session utilisateur** : JWT signé dans un cookie `kp_token` (HttpOnly,
    SameSite=Lax) — utilisé par le tableau de bord.

    - **Clé API** : header `Authorization: Bearer kp_<env>_xxx` — utilisé par
    les intégrations serveur.


    Les endpoints sensibles exigent l'une ou l'autre. Les écritures monétaires
    acceptent un header `Idempotency-Key` pour la dé-duplication.


    ## Enveloppe de réponse

    Toutes les réponses suivent le format `{ ok: boolean, data?: T, error?: {
    code, message, details? } }`.


    ## Webhooks sortants

    Signature HMAC SHA-256 dans le header `X-KryptaPay-Signature`. Le secret est
    défini à la création de l'endpoint.
  version: 1.0.0
  contact:
    name: KryptaPay Support
    email: support@kryptapay.test
    url: https://kryptapay.test
  license:
    name: Proprietary
servers:
  - url: http://localhost
    description: Local dev
security:
  - bearerAuth: []
  - cookieAuth: []
tags:
  - name: wallets
    description: Portefeuilles fiat / stablecoin / IBAN virtuels
  - name: transactions
    description: Historique unifié des mouvements
  - name: payouts
    description: Versements Mobile Money / banque / stablecoin
  - name: payins
    description: Encaissements et liens de paiement
  - name: fx
    description: Cotations et conversions multi-devises
  - name: counterparties
    description: Bénéficiaires et tiers
  - name: invoices
    description: Factures + paiement public + reçus
  - name: status
    description: Statut public des services
paths:
  /v1/counterparties/{id}:
    patch:
      tags:
        - counterparties
      summary: Update a counterparty
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fullName:
                  type: string
                  minLength: 1
                  maxLength: 180
                tradeName:
                  type: string
                  maxLength: 180
                  nullable: true
                legalForm:
                  type: string
                  maxLength: 60
                  nullable: true
                registrationNumber:
                  type: string
                  maxLength: 80
                  nullable: true
                taxId:
                  type: string
                  maxLength: 80
                  nullable: true
                address:
                  type: string
                  maxLength: 300
                  nullable: true
                contactName:
                  type: string
                  maxLength: 180
                  nullable: true
                contactRole:
                  type: string
                  maxLength: 120
                  nullable: true
                contactPhone:
                  type: string
                  maxLength: 32
                  nullable: true
                bankName:
                  type: string
                  maxLength: 160
                  nullable: true
                email:
                  type: string
                  format: email
                  maxLength: 180
                  nullable: true
                msisdn:
                  type: string
                  minLength: 8
                  maxLength: 20
                  nullable: true
                iban:
                  type: string
                  minLength: 15
                  maxLength: 34
                  nullable: true
                swiftBic:
                  type: string
                  minLength: 8
                  maxLength: 11
                  nullable: true
                bankAccount:
                  type: string
                  maxLength: 40
                  nullable: true
                walletAddress:
                  type: string
                  minLength: 20
                  maxLength: 80
                  nullable: true
                walletChain:
                  type: string
                  enum:
                    - MTN_BJ
                    - MTN_CI
                    - MTN_CM
                    - ORANGE_CI
                    - ORANGE_SN
                    - ORANGE_ML
                    - ORANGE_BF
                    - ORANGE_CM
                    - MOOV_BJ
                    - MOOV_TG
                    - MOOV_CI
                    - MOOV_BF
                    - WAVE_CI
                    - WAVE_SN
                    - FREE_SN
                    - TMONEY_TG
                    - MOBICASH_ML
                    - MOBICASH_BF
                    - DJAMO_CI
                    - MIXX_SN
                    - MTN_CG
                    - AIRTEL_CG
                    - ORANGE_CD
                    - AIRTEL_CD
                    - VODACOM_CD
                    - AFRICELL_CD
                    - AIRTEL_GA
                    - MOMO_NG
                    - AIRTEL_NG
                    - MTN_GH
                    - VODAFONE_GH
                    - AIRTELTIGO_GH
                    - BANK_XOF
                    - BANK_XAF
                    - BANK_NGN
                    - BANK_GHS
                    - BANK_CDF
                    - BANK_EUR
                    - BANK_USD
                    - ETH
                    - POLYGON
                    - TRON
                  nullable: true
                methodDetails:
                  type: object
                  properties:
                    bankAddress:
                      type: string
                      maxLength: 300
                    accountHolder:
                      type: string
                      maxLength: 180
                    bankCurrency:
                      type: string
                      maxLength: 8
                    bankCountry:
                      type: string
                      maxLength: 80
                    momoCountry:
                      type: string
                      maxLength: 80
                    momoNetwork:
                      type: string
                      maxLength: 80
                    momoHolderName:
                      type: string
                      maxLength: 180
                    momoHolderId:
                      type: string
                      maxLength: 80
                    cryptoAsset:
                      type: string
                      maxLength: 20
                    walletLabel:
                      type: string
                      maxLength: 120
                  additionalProperties: false
                  nullable: true
                isBlacklisted:
                  type: boolean
                accounts:
                  type: array
                  items:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - BANK
                          - MOMO
                          - CRYPTO
                      currency:
                        type: string
                        enum:
                          - XOF
                          - XAF
                          - NGN
                          - GHS
                          - CDF
                          - EUR
                          - USD
                          - USDC
                          - USDT
                      label:
                        type: string
                        maxLength: 120
                        nullable: true
                      bankName:
                        type: string
                        maxLength: 160
                        nullable: true
                      bankAddress:
                        type: string
                        maxLength: 300
                        nullable: true
                      bankCountry:
                        type: string
                        maxLength: 80
                        nullable: true
                      accountHolder:
                        type: string
                        maxLength: 180
                        nullable: true
                      iban:
                        type: string
                        maxLength: 34
                        nullable: true
                      bankAccount:
                        type: string
                        maxLength: 40
                        nullable: true
                      swiftBic:
                        type: string
                        maxLength: 11
                        nullable: true
                      network:
                        type: string
                        enum:
                          - MTN_BJ
                          - MTN_CI
                          - MTN_CM
                          - ORANGE_CI
                          - ORANGE_SN
                          - ORANGE_ML
                          - ORANGE_BF
                          - ORANGE_CM
                          - MOOV_BJ
                          - MOOV_TG
                          - MOOV_CI
                          - MOOV_BF
                          - WAVE_CI
                          - WAVE_SN
                          - FREE_SN
                          - TMONEY_TG
                          - MOBICASH_ML
                          - MOBICASH_BF
                          - DJAMO_CI
                          - MIXX_SN
                          - MTN_CG
                          - AIRTEL_CG
                          - ORANGE_CD
                          - AIRTEL_CD
                          - VODACOM_CD
                          - AFRICELL_CD
                          - AIRTEL_GA
                          - MOMO_NG
                          - AIRTEL_NG
                          - MTN_GH
                          - VODAFONE_GH
                          - AIRTELTIGO_GH
                          - BANK_XOF
                          - BANK_XAF
                          - BANK_NGN
                          - BANK_GHS
                          - BANK_CDF
                          - BANK_EUR
                          - BANK_USD
                          - ETH
                          - POLYGON
                          - TRON
                        nullable: true
                      msisdn:
                        type: string
                        maxLength: 20
                        nullable: true
                      momoCountry:
                        type: string
                        maxLength: 80
                        nullable: true
                      momoHolderName:
                        type: string
                        maxLength: 180
                        nullable: true
                      momoHolderId:
                        type: string
                        maxLength: 80
                        nullable: true
                      walletChain:
                        type: string
                        enum:
                          - MTN_BJ
                          - MTN_CI
                          - MTN_CM
                          - ORANGE_CI
                          - ORANGE_SN
                          - ORANGE_ML
                          - ORANGE_BF
                          - ORANGE_CM
                          - MOOV_BJ
                          - MOOV_TG
                          - MOOV_CI
                          - MOOV_BF
                          - WAVE_CI
                          - WAVE_SN
                          - FREE_SN
                          - TMONEY_TG
                          - MOBICASH_ML
                          - MOBICASH_BF
                          - DJAMO_CI
                          - MIXX_SN
                          - MTN_CG
                          - AIRTEL_CG
                          - ORANGE_CD
                          - AIRTEL_CD
                          - VODACOM_CD
                          - AFRICELL_CD
                          - AIRTEL_GA
                          - MOMO_NG
                          - AIRTEL_NG
                          - MTN_GH
                          - VODAFONE_GH
                          - AIRTELTIGO_GH
                          - BANK_XOF
                          - BANK_XAF
                          - BANK_NGN
                          - BANK_GHS
                          - BANK_CDF
                          - BANK_EUR
                          - BANK_USD
                          - ETH
                          - POLYGON
                          - TRON
                        nullable: true
                      walletAddress:
                        type: string
                        maxLength: 120
                        nullable: true
                      cryptoAsset:
                        type: string
                        maxLength: 20
                        nullable: true
                    required:
                      - kind
                      - currency
                    additionalProperties: false
                  maxItems: 20
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      kind:
                        type: string
                        minLength: 1
                        maxLength: 60
                      filename:
                        type: string
                        minLength: 1
                        maxLength: 200
                      mimeType:
                        type: string
                        minLength: 3
                        maxLength: 120
                      base64:
                        type: string
                        minLength: 1
                      storageKey:
                        type: string
                        minLength: 1
                        maxLength: 500
                    required:
                      - kind
                      - filename
                    additionalProperties: false
                  maxItems: 8
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      fullName:
                        type: string
                      type:
                        type: string
                      country:
                        type: string
                      tradeName:
                        type: string
                        nullable: true
                      legalForm:
                        type: string
                        nullable: true
                      registrationNumber:
                        type: string
                        nullable: true
                      taxId:
                        type: string
                        nullable: true
                      address:
                        type: string
                        nullable: true
                      contactName:
                        type: string
                        nullable: true
                      contactRole:
                        type: string
                        nullable: true
                      contactPhone:
                        type: string
                        nullable: true
                      bankName:
                        type: string
                        nullable: true
                      msisdn:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      iban:
                        type: string
                        nullable: true
                      swiftBic:
                        type: string
                        nullable: true
                      bankAccount:
                        type: string
                        nullable: true
                      walletAddress:
                        type: string
                        nullable: true
                      walletChain:
                        type: string
                        enum:
                          - MTN_BJ
                          - MTN_CI
                          - MTN_CM
                          - ORANGE_CI
                          - ORANGE_SN
                          - ORANGE_ML
                          - ORANGE_BF
                          - ORANGE_CM
                          - MOOV_BJ
                          - MOOV_TG
                          - MOOV_CI
                          - MOOV_BF
                          - WAVE_CI
                          - WAVE_SN
                          - FREE_SN
                          - TMONEY_TG
                          - MOBICASH_ML
                          - MOBICASH_BF
                          - DJAMO_CI
                          - MIXX_SN
                          - MTN_CG
                          - AIRTEL_CG
                          - ORANGE_CD
                          - AIRTEL_CD
                          - VODACOM_CD
                          - AFRICELL_CD
                          - AIRTEL_GA
                          - MOMO_NG
                          - AIRTEL_NG
                          - MTN_GH
                          - VODAFONE_GH
                          - AIRTELTIGO_GH
                          - BANK_XOF
                          - BANK_XAF
                          - BANK_NGN
                          - BANK_GHS
                          - BANK_CDF
                          - BANK_EUR
                          - BANK_USD
                          - ETH
                          - POLYGON
                          - TRON
                        nullable: true
                      documents:
                        type: array
                        items:
                          type: object
                          properties:
                            kind:
                              type: string
                            filename:
                              type: string
                            storageKey:
                              type: string
                          required:
                            - kind
                            - filename
                            - storageKey
                          additionalProperties: false
                        nullable: true
                      methodDetails:
                        type: object
                        additionalProperties:
                          type: string
                        nullable: true
                      isVerified:
                        type: boolean
                      isBlacklisted:
                        type: boolean
                      approvalStatus:
                        type: string
                        enum:
                          - PENDING
                          - APPROVED
                          - REJECTED
                      approvedAt:
                        type: string
                        nullable: true
                      rejectionReason:
                        type: string
                        nullable: true
                      docsRequiredAt:
                        type: string
                        nullable: true
                      accounts:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            kind:
                              type: string
                              enum:
                                - BANK
                                - MOMO
                                - CRYPTO
                            currency:
                              type: string
                              enum:
                                - XOF
                                - XAF
                                - NGN
                                - GHS
                                - CDF
                                - EUR
                                - USD
                                - USDC
                                - USDT
                            label:
                              type: string
                              nullable: true
                            bankName:
                              type: string
                              nullable: true
                            bankAddress:
                              type: string
                              nullable: true
                            bankCountry:
                              type: string
                              nullable: true
                            accountHolder:
                              type: string
                              nullable: true
                            iban:
                              type: string
                              nullable: true
                            bankAccount:
                              type: string
                              nullable: true
                            swiftBic:
                              type: string
                              nullable: true
                            network:
                              type: string
                              enum:
                                - MTN_BJ
                                - MTN_CI
                                - MTN_CM
                                - ORANGE_CI
                                - ORANGE_SN
                                - ORANGE_ML
                                - ORANGE_BF
                                - ORANGE_CM
                                - MOOV_BJ
                                - MOOV_TG
                                - MOOV_CI
                                - MOOV_BF
                                - WAVE_CI
                                - WAVE_SN
                                - FREE_SN
                                - TMONEY_TG
                                - MOBICASH_ML
                                - MOBICASH_BF
                                - DJAMO_CI
                                - MIXX_SN
                                - MTN_CG
                                - AIRTEL_CG
                                - ORANGE_CD
                                - AIRTEL_CD
                                - VODACOM_CD
                                - AFRICELL_CD
                                - AIRTEL_GA
                                - MOMO_NG
                                - AIRTEL_NG
                                - MTN_GH
                                - VODAFONE_GH
                                - AIRTELTIGO_GH
                                - BANK_XOF
                                - BANK_XAF
                                - BANK_NGN
                                - BANK_GHS
                                - BANK_CDF
                                - BANK_EUR
                                - BANK_USD
                                - ETH
                                - POLYGON
                                - TRON
                              nullable: true
                            msisdn:
                              type: string
                              nullable: true
                            momoCountry:
                              type: string
                              nullable: true
                            momoHolderName:
                              type: string
                              nullable: true
                            momoHolderId:
                              type: string
                              nullable: true
                            walletChain:
                              type: string
                              enum:
                                - MTN_BJ
                                - MTN_CI
                                - MTN_CM
                                - ORANGE_CI
                                - ORANGE_SN
                                - ORANGE_ML
                                - ORANGE_BF
                                - ORANGE_CM
                                - MOOV_BJ
                                - MOOV_TG
                                - MOOV_CI
                                - MOOV_BF
                                - WAVE_CI
                                - WAVE_SN
                                - FREE_SN
                                - TMONEY_TG
                                - MOBICASH_ML
                                - MOBICASH_BF
                                - DJAMO_CI
                                - MIXX_SN
                                - MTN_CG
                                - AIRTEL_CG
                                - ORANGE_CD
                                - AIRTEL_CD
                                - VODACOM_CD
                                - AFRICELL_CD
                                - AIRTEL_GA
                                - MOMO_NG
                                - AIRTEL_NG
                                - MTN_GH
                                - VODAFONE_GH
                                - AIRTELTIGO_GH
                                - BANK_XOF
                                - BANK_XAF
                                - BANK_NGN
                                - BANK_GHS
                                - BANK_CDF
                                - BANK_EUR
                                - BANK_USD
                                - ETH
                                - POLYGON
                                - TRON
                              nullable: true
                            walletAddress:
                              type: string
                              nullable: true
                            cryptoAsset:
                              type: string
                              nullable: true
                            createdAt:
                              type: string
                          required:
                            - id
                            - kind
                            - currency
                            - label
                            - bankName
                            - bankAddress
                            - bankCountry
                            - accountHolder
                            - iban
                            - bankAccount
                            - swiftBic
                            - network
                            - msisdn
                            - momoCountry
                            - momoHolderName
                            - momoHolderId
                            - walletChain
                            - walletAddress
                            - cryptoAsset
                            - createdAt
                          additionalProperties: false
                        default: []
                      createdAt:
                        type: string
                    required:
                      - id
                      - fullName
                      - type
                      - country
                      - tradeName
                      - legalForm
                      - registrationNumber
                      - taxId
                      - address
                      - contactName
                      - contactRole
                      - contactPhone
                      - bankName
                      - msisdn
                      - email
                      - iban
                      - swiftBic
                      - bankAccount
                      - walletAddress
                      - walletChain
                      - documents
                      - methodDetails
                      - isVerified
                      - isBlacklisted
                      - approvalStatus
                      - approvedAt
                      - rejectionReason
                      - docsRequiredAt
                      - createdAt
                    additionalProperties: false
                required:
                  - ok
                  - data
                additionalProperties: false
        '403':
          description: Forbidden — no org / role / KYB
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
                description: Forbidden — no org / role / KYB
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
                description: Not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT utilisateur ou clé API `kp_<env>_xxx`
    cookieAuth:
      type: apiKey
      in: cookie
      name: kp_token
      description: Session signée (front Next.js)

````