# KYC document rejected

`POST kyc-document-rejected`

> This is a subset of the full specification, limited to the `POST kyc-document-rejected` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `POST kyc-document-rejected` operation. Components more than 3 `$ref` hops away are not included.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: KYC documents
    description: |-
      Use Know Your Customer (KYC) documents to verify your customers identity.
      The KYC document operations generate a signed link to the Rebilly [KYC document gatherer](https://www.rebilly.com/docs/kyc-and-aml/kyc-document-gatherer/).

      Document types:
        - `identity-proof`: Validates a customer's identity.
        - `address-proof`: Validates a customer's address.
        - `purchase-proof`: Validates a customer's purchase.
        - `funds-proof`: Validates that a customer has funds.
        - `credit-file-proof`: Verifies that there is an existing credit file with two sources that match the customer's name, DOB, and address.

      Rebilly parses and analyzes the documents and accepts or rejects them according to a configurable scoring algorithm.
      When all document types in a KYC request are accepted, the status is fulfilled, and the [KYC request fulfilled webhook](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-fulfilled/) is sent.

      ### Credit file proof

      The `credit-file-proof` KYC document request type is only available in the API,
      this option is not available in the [KYC document gatherer](https://www.rebilly.com/docs/kyc-and-aml/kyc-document-gatherer/).
      This request verifies that there is an existing credit file with two sources that match the person's name, date of birth, and address.

      In Canada, to meet FINTRAC requirements, the `credit-file-proof` KYC document request verifies the customer's name, address, and date of birth with a credit agency.

      If `credit-file-proof` is requested in combination with `identity-proof` and `address-proof`,
      `credit-file-proof` is attempted first.
      If `credit-file-proof` validates the identity and address,
      the KYC request is considered fulfilled.
      If the request is not fulfilled,
      redirect your customer to the KYC document gatherer to collect their KYC documents.
x-tagGroups:
  - name: Risk
    tags:
      - KYC documents
paths: {}
webhooks:
  kyc-document-rejected:
    post:
      summary: KYC document rejected
      operationId: kyc-document-rejected
      x-products:
        - Core
      tags:
        - KYC documents
      requestBody:
        $ref: '#/components/requestBodies/KycDocumentWebhook'
      responses:
        2xx:
          description: Returns any 2xx status to indicate that data is received.
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  schemas:
    CreatedTime:
      type: string
      description: |-
        Date and time when the resource is created.
        This value is set automatically when the resource is created.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Creation Time
    UpdatedTime:
      type: string
      description: |-
        Date and time when the resource is updated.
        This value is set automatically when the resource is updated.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Last Update Time
    Tag:
      type: object
      description: |-
        Use tags to organise and categorize customers or KYC documents based on keywords.
        For more information, see [Tags](https://www.rebilly.com/docs/dev-docs/api/tags/).
      required:
        - name
        - type
      properties:
        id:
          description: ID of the tag.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        name:
          description: |-
            Unique name for the tag.
            Tag names are not case-sensitive.
          type: string
          maxLength: 255
          pattern: ^[@~\-\.\w\s+]+$
          example: New
        type:
          description: |-
            Type of tag.
            Tags of a specific type can only be assigned to corresponding entity types.
            For example, you can only use customer tags on customers.
          type: string
          enum:
            - customer
            - kyc-document
            - aml-check
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        _links:
          $ref: '#/components/schemas/SelfLink'
    OrganizationId:
      type: string
      description: |-
        Unique organization identifier.
        An organization is an entity that represents a company.
        For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: org_0YVDM8RC7GDADADSBSMW124JA8
    CustomerId:
      type: string
      description: ID of the customer resource.
      maxLength: 50
      example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
      x-basic: true
    WebsiteId:
      type: string
      description: |-
        ID of the website.
        A website is where an organization obtains a customer.
        For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
    PaymentMethod:
      type: string
      description: Payment method.
      enum:
        - payment-card
        - ach
        - cash
        - check
        - paypal
        - AdvCash
        - Aera
        - Affirm
        - Afterpay
        - Aircash
        - Airpay
        - Alfa-click
        - Alipay
        - AmazonPay
        - Apple Pay
        - AstroPay Card
        - AstroPay-GO
        - BankSEND
        - BankReferenced
        - bank-transfer
        - bank-transfer-2
        - bank-transfer-3
        - bank-transfer-4
        - bank-transfer-5
        - bank-transfer-6
        - bank-transfer-7
        - bank-transfer-8
        - bank-transfer-9
        - Baloto
        - Beeline
        - Belfius-direct-net
        - bitcoin
        - Bizum
        - Blik
        - Boleto
        - Boleto-2
        - Boleto-3
        - cash-deposit
        - CASHlib
        - CashToCode
        - CCAvenue
        - China UnionPay
        - Clearpay
        - Cleo
        - CODVoucher
        - Commas-Checkout
        - Conekta-oxxo
        - Conekta-spei
        - cryptocurrency
        - Cupon-de-pagos
        - CyberSource
        - Dimoco-pay-smart
        - Directa24Card
        - domestic-cards
        - Efecty
        - echeck
        - ecoPayz
        - ecoPayzTurkey
        - ecoVoucher
        - EPS
        - ePay.bg
        - Ethereum
        - e-wallet
        - ezyEFT
        - eZeeWallet
        - FasterPay
        - Flexepin
        - Fyntra-Checkout
        - Giropay
        - Google Pay
        - Gpaysafe
        - iCashOne Voucher
        - iDebit
        - iDEAL
        - ING-homepay
        - INOVAPAY-pin
        - INOVAPAY-wallet
        - InstaDebit
        - InstantPayments
        - instant-bank-transfer
        - Interac-online
        - Interac-eTransfer
        - Interac-express-connect
        - Interac
        - invoice
        - iWallet
        - Jeton
        - JetonCash
        - jpay
        - KakaoPay
        - Khelocard
        - Klarna
        - KNOT
        - Litecoin
        - loonie
        - LPG-online
        - LPG-payment-card
        - Matrix
        - MaxiCash
        - Megafon
        - MercadoPago
        - MiFinity-eWallet
        - miscellaneous
        - MobilePay
        - Mollie
        - Multibanco
        - Bancontact
        - Bancontact-mobile
        - MTS
        - MuchBetter
        - MuchBetterVoucher
        - MyFatoorah
        - Neosurf
        - Netbanking
        - Neteller
        - Nordea-Solo
        - NordikCoin
        - OchaPay
        - online-bank-transfer
        - Onlineueberweisen
        - oriental-wallet
        - OXXO
        - P24
        - Pagadito
        - PagoEffectivo
        - Pagsmile-lottery
        - Pagsmile-deposit-express
        - PayCash
        - Payco
        - Payeer
        - PaymentAsia-crypto
        - Paysafecard
        - PayTabs
        - Pay4Fun
        - Paynote
        - Paymero
        - Paymero-QR
        - PayU
        - PayULatam
        - Perfect-money
        - Piastrix
        - PIX
        - PIX-Automatico
        - PinPay
        - phone
        - PhonePe
        - POLi
        - PostFinance-card
        - PostFinance-e-finance
        - QIWI
        - QPay
        - QQPay
        - Quickpay
        - rapyd-checkout
        - rebilly-hosted-payment-form
        - Resurs
        - reverse-withdrawal
        - Ripple
        - SafetyPay
        - Samsung Pay
        - SEPA
        - Siirto
        - Skrill
        - Skrill Rapid Transfer
        - SMSVoucher
        - Sofort
        - SparkPay
        - SPEI
        - swift-dbt
        - Tele2
        - Telr
        - Terminaly-RF
        - Tether
        - Thunes-Checkout
        - ToditoCash-card
        - Trustly
        - Tupay
        - TWINT
        - UniCrypt
        - UPayCard
        - UPI
        - USD-coin
        - VCreditos
        - VegaWallet
        - VenusPoint
        - Viva
        - voucher
        - voucher-2
        - voucher-3
        - voucher-4
        - Wallet88
        - Webmoney
        - Webpay
        - Webpay-2
        - Webpay Card
        - WeChat Pay
        - XPay-P2P
        - XPay-QR
        - Yandex-money
        - Zotapay
        - Zimpler
        - Zip
    ResourceCustomFields:
      description: |-
        Use custom fields to extend a resource scheme to include custom data that is not provided as a common field.
        For more information, see [Custom fields](https://www.rebilly.com/catalog/all/custom-fields).
      type: object
      default: {}
      example:
        foo: bar
    ContactObject:
      type: object
      description: Contact's information.
      properties:
        firstName:
          description: Contact's first name.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Benjamin
        lastName:
          description: Contact's last name.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Franklin
        organization:
          description: Contact's organization.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 255
          example: Rebilly
        address:
          description: First line of the contact's street address.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 60
          example: 36 Craven St
        address2:
          description: Second line of the contact's street address.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 60
        city:
          description: Contact's city of residence.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Austin
        region:
          description: Contact's region of residence.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Texas
        country:
          description: |-
            Contact's country of residence in ISO 3166 alpha-2 country code.
            For examples, see [ISO.org](https://www.iso.org/obp/ui/#search/code/).
          type:
            - string
            - 'null'
          pattern: ^[A-Z]{2}$
          maxLength: 2
          example: GB
        postalCode:
          description: Contact's postal code.
          type:
            - string
            - 'null'
          pattern: ^[\w\s\-]+$
          maxLength: 10
          example: WC2N 5NF
        phoneNumbers:
          $ref: '#/components/schemas/ContactPhoneNumbers'
        emails:
          $ref: '#/components/schemas/ContactEmails'
        dob:
          description: Contact's date of birth in ISO-8601 `YYYY-MM-DD` format.
          type:
            - string
            - 'null'
          format: date
          example: '1980-04-01'
        jobTitle:
          description: Contact's job title.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 255
          example: CEO
        hash:
          description: |-
            Hash value for the contact.
            Use this value to compare contacts for identical attribute values.
          type: string
          maxLength: 40
          example: 056ae6d97c788b9e98b049ebafd7b229bf852221
          readOnly: true
    Company:
      type:
        - object
        - 'null'
      description: |-
        Company information that is associated with the customer's primary email address domain.

        This is a paid feature, to enable it [contact Rebilly](https://www.rebilly.com/support/).
      readOnly: true
      properties:
        name:
          type:
            - string
            - 'null'
          description: Name of the company.
        domain:
          type: string
          description: Website domain of the company.
        yearFounded:
          type:
            - number
            - 'null'
          description: Founding year of the company.
          format: integer
        industry:
          type:
            - string
            - 'null'
          description: Industry the company is associated with.
        employeesCount:
          type:
            - number
            - 'null'
          description: Number of employees in the company.
          format: integer
        country:
          type:
            - string
            - 'null'
          description: Country where the company is based.
        locality:
          type:
            - string
            - 'null'
          description: Locality or region where the company is based.
        _links:
          type: array
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - linkedin
    CustomerAverageValue:
      type: object
      readOnly: true
      description: Average customer value.
      properties:
        currency:
          description: Merchant's reporting currency.
          $ref: '#/components/schemas/CurrencyCode'
        amount:
          x-type: Money
          x-label: Average Value
          x-sortable: true
          x-basic: true
          description: Average amount of approved payments in the merchant's reporting currency.
          type: number
          format: double
        amountUsd:
          description: Average approved payment amount in USD.
          type: number
          format: double
    CustomerLifetimeRevenue:
      type: object
      readOnly: true
      description: Customer's lifetime revenue.
      properties:
        currency:
          description: Merchant's reporting currency.
          $ref: '#/components/schemas/CurrencyCode'
        amount:
          x-type: Money
          x-label: Lifetime Revenue
          x-sortable: true
          x-basic: true
          description: Revenue amount in the merchant's reporting currency.
          type: number
          format: double
        amountUsd:
          description: Revenue amount in USD.
          type: number
          format: double
    TaxNumber:
      type: object
      required:
        - type
        - value
      properties:
        type:
          type: string
          description: Type of the tax number.
          enum:
            - eu-vat
            - other
          example: eu-vat
        value:
          type: string
          description: Value of the tax number.
          example: GB980780684
        isDefault:
          type: boolean
          description: Determines if the tax number is selected as default to display on invoices.
          example: true
        isValid:
          type:
            - boolean
            - 'null'
          description: Determines if the tax number passed the EU official [VIES validation](https://ec.europa.eu/taxation_customs/vies/#/vat-validation).
          example: true
          readOnly: true
    LeadSourceData:
      type: object
      description: Lead source information.
      properties:
        medium:
          description: |-
            Category of the lead source traffic.
            For example, the medium could be organic search, Google ads, Display ads, and so on.
          type:
            - string
            - 'null'
          maxLength: 512
        source:
          description: Domain, platform, or channel from which the lead source originates.
          type:
            - string
            - 'null'
          maxLength: 512
        campaign:
          description: Campaign name of the lead source.
          type:
            - string
            - 'null'
          maxLength: 512
        term:
          description: Term associated with a lead source.
          type:
            - string
            - 'null'
          maxLength: 512
        content:
          description: |-
            Content contained in the lead source content.
            For example, content could be graphics, video, and so on.
          type:
            - string
            - 'null'
          maxLength: 512
        affiliate:
          description: Individual or entity that is affiliated with the lead source.
          type:
            - string
            - 'null'
          maxLength: 512
        subAffiliate:
          description: |-
            Individual or entity that is associated with a lead source affiliate.
            In other products, this field may also be referred to as sub ID or click ID in some.
          type:
            - string
            - 'null'
          maxLength: 512
        salesAgent:
          description: Name of the sales agent associated with the lead source.
          type:
            - string
            - 'null'
          maxLength: 512
        clickId:
          description: |-
            ID of the lead source click.
            This value is passed in the ad click URL for tracking and campaign attribution.
          type:
            - string
            - 'null'
          maxLength: 512
        path:
          description: URL from which the lead source originates.
          type:
            - string
            - 'null'
          maxLength: 512
        referrer:
          description: Lead source [`referrer` URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer).
          type:
            - string
            - 'null'
          format: uri
          maxLength: 2083
          example: https://www.rebilly.com
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
    Customer:
      type: object
      description: Customer information.
      properties:
        id:
          type: string
          description: ID of the customer.
          readOnly: true
          example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
          maxLength: 50
        email:
          description: Customer's email address.
          type:
            - string
            - 'null'
          format: email
          readOnly: true
          x-sortable: true
          x-basic: true
        firstName:
          description: Customer's first name.
          type:
            - string
            - 'null'
          x-basic: true
          readOnly: true
        lastName:
          description: Customer's last name.
          type:
            - string
            - 'null'
          x-sortable: true
          x-basic: true
          readOnly: true
        websiteId:
          x-sortable: true
          allOf:
            - $ref: '#/components/schemas/WebsiteId'
        paymentToken:
          type: string
          writeOnly: true
          description: |-
            Write-only payment token.
            If supplied, the token is converted into a payment instrument, and its ID is assigned to `defaultPaymentInstrumentId` value.
            The value of this property overrides the `defaultPaymentInstrumentId` if both are supplied.
            This token may only be used once before it expires.
        defaultPaymentInstrument:
          type:
            - object
            - 'null'
          description: |-
            Default payment instrument of the customer.

            The default payment instrument is used to automatically pay subscription renewals,
            and for transaction requests where a specific payment instrument is not provided.
          readOnly: true
          required:
            - method
            - paymentInstrumentId
          properties:
            method:
              $ref: '#/components/schemas/PaymentMethod'
            paymentInstrumentId:
              type: string
              description: ID of the payment instrument.
              maxLength: 50
              example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
        defaultPaymentInstrumentId:
          type:
            - string
            - 'null'
          description: |-
            ID of the customer's default payment instrument.

            The default payment instrument is used to automatically pay subscription renewals,
            and for transaction requests where a specific payment instrument is not provided.
          maxLength: 50
          example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
          writeOnly: true
        preferredPayoutInstrumentId:
          type:
            - string
            - 'null'
          description: ID of the customer's preferred payment instrument for payouts.
          maxLength: 50
          example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
          default: null
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        customFields:
          $ref: '#/components/schemas/ResourceCustomFields'
        primaryAddress:
          description: Customer's primary address.
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        company:
          $ref: '#/components/schemas/Company'
        averageValue:
          $ref: '#/components/schemas/CustomerAverageValue'
        paymentCount:
          x-label: Payments
          x-sortable: true
          x-basic: true
          description: |-
            Total number of approved payments made by the customer.
            Payments are the result of `sale` or `capture` transactions.
          readOnly: true
          type: integer
        lastPaymentTime:
          x-label: Last Payment
          x-sortable: true
          x-basic: true
          description: |-
            Date and time when the customer made their last approved payment.
            Payments are the result of `sale` or `capture` transactions.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        lifetimeRevenue:
          $ref: '#/components/schemas/CustomerLifetimeRevenue'
        invoiceCount:
          x-sortable: true
          description: |-
            Total number of invoices issued to the customer.
            This value is auto-incrementing.
            If this value is `0`, the record relates to a lead.
            A lead is a customer who has not made a payment yet.
            If this value is greater than or equal to `1` the record relates to a customer.
          readOnly: true
          type: integer
        tags:
          description: List of customer tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        revision:
          description: |-
            Number of times the customer's data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        hasFulfilledKyc:
          description: Specifies if the customer has accepted and reviewed identity and address documents, or an accepted credit file document.
          type: boolean
          readOnly: true
        organizationId:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/OrganizationId'
        locale:
          type:
            - string
            - 'null'
          description: Language locale identifier in [RFC 5646](https://tools.ietf.org/html/rfc5646) format.
          example: fr-FR
          default: null
        taxNumbers:
          type:
            - array
            - 'null'
          description: Tax numbers of the customer.
          items:
            $ref: '#/components/schemas/TaxNumber'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSourceData'
          writeOnly: true
        personId:
          type:
            - string
            - 'null'
          description: ID of the associated person.
          maxLength: 50
          example: prs_0YV7DDSDD1C8DA64KHH2W33CPF
        notificationEmails:
          type: array
          description: |-
            Email addresses for notification delivery in event-based email notifications.
            When you configure event-based email notifications, you can send to these addresses, the customer's primary email address, or another email address you specify.
            For more information, see [Manage notification emails](https://www.rebilly.com/docs/data-tables/manage-customer-information#manage-notification-emails).
          items:
            type: string
            format: email
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - attachments
                  - defaultPaymentInstrument
                  - leadSource
                  - website
        _embedded:
          type: object
          description: Embedded objects that are requested using the `expand` query string parameter.
          readOnly: true
          properties:
            defaultPaymentInstrument:
              type: object
            website:
              type: object
            leadSource:
              type: object
    ProofOfIdentityKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          description: Proof of identity document matches.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycIdentityMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycIdentityMatches'
        settings:
          description: Settings used to score the document.
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/KycSettingsIdentity'
            - type: 'null'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    ProofOfAddressKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycAddressMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/KycAddressMatches'
        settings:
          description: Settings used to score the document.
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/KycSettingsAddress'
            - type: 'null'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    ProofOfFundsKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        settings:
          description: Settings used to score the document.
          type:
            - object
            - 'null'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          description: Proof of funds document matches.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/FundsMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/FundsMatches'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    ProofOfPurchaseKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        settings:
          description: Settings used to score the document.
          type:
            - object
            - 'null'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          type:
            - object
            - 'null'
          readOnly: true
          description: Proof of purchase document matches.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/PurchaseMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/PurchaseMatches'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
                  - paymentInstrument
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    ProofOfCreditFileKycDocument:
      title: KYC documents.
      type: object
      required:
        - customerId
        - documentType
        - status
        - fileIds
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the KYC document.
          maxLength: 50
          example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
        fileIds:
          description: |-
            IDs of linked file objects.

            Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
            `['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.

            Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.
          type: array
          items:
            type: string
            maxLength: 50
            example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
        documentType:
          description: |-
            Document type submitted for validation.
            Only the `identity-proof` and `address-proof` types are analyzed automatically.
          $ref: '#/components/schemas/KycDocumentTypes'
        documentSubtype:
          description: Document subtype submitted for validation.
          $ref: '#/components/schemas/KycDocumentSubtypes'
        status:
          description: Status of the validation.
          type: string
          readOnly: true
          enum:
            - pending
            - in-progress
            - accepted
            - rejected
            - archived
          x-enumDescriptions:
            pending: Waiting to be reviewed or analyzed.
            in-progress: Being analyzed by the Rebilly AI.
            accepted: Accepted by AI or a human.
            rejected: Rejected by AI or a human.
            archived: Archived by the Rebilly AI.
        rejectionReason:
          $ref: '#/components/schemas/KycDocumentRejection'
        requestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: ID of the KYC request.
          maxLength: 50
          example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        processedTime:
          description: Date and time when the KYC document is processed.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        customerId:
          $ref: '#/components/schemas/CustomerId'
        reviewerId:
          description: ID of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 50
          example: 44433322-2c4y-483z-a0a9-158621f77a21
        reviewerName:
          description: First and last name of the KYC document reviewer.
          type:
            - string
            - 'null'
          readOnly: true
        reviewStartTime:
          description: Date and time when the manual review starts.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        reviewTime:
          description: Date and time of manual review.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        notes:
          description: Reviewer notes.
          type:
            - string
            - 'null'
        tags:
          description: List of KYC document tags.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        reason:
          description: Reason for uploading.
          type:
            - string
            - 'null'
        matchLevel:
          $ref: '#/components/schemas/KycDocumentMatchLevels'
        settings:
          description: Settings used to score the document.
          type:
            - object
            - 'null'
        revision:
          description: |-
            Number of times the KYC document data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        documentMatches:
          description: Proof of credit document matches.
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/CreditFileMatches'
        parsedData:
          type:
            - object
            - 'null'
          readOnly: true
          description: Parsed data.
          properties:
            version:
              $ref: '#/components/schemas/KycDocumentMatchesVersion'
            score:
              $ref: '#/components/schemas/KycDocumentMatchesScore'
            checkList:
              $ref: '#/components/schemas/KycDocumentCheckList'
            data:
              $ref: '#/components/schemas/CreditFileMatches'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            files:
              type: array
              maxItems: 3
              description: Linked files.
    KycDocument:
      type: object
      description: KYC document information.
      discriminator:
        propertyName: documentType
        mapping:
          identity-proof: '#/components/schemas/ProofOfIdentityKycDocument'
          address-proof: '#/components/schemas/ProofOfAddressKycDocument'
          funds-proof: '#/components/schemas/ProofOfFundsKycDocument'
          purchase-proof: '#/components/schemas/ProofOfPurchaseKycDocument'
          credit-file-proof: '#/components/schemas/ProofOfCreditFileKycDocument'
      oneOf:
        - $ref: '#/components/schemas/ProofOfIdentityKycDocument'
        - $ref: '#/components/schemas/ProofOfAddressKycDocument'
        - $ref: '#/components/schemas/ProofOfFundsKycDocument'
        - $ref: '#/components/schemas/ProofOfPurchaseKycDocument'
        - $ref: '#/components/schemas/ProofOfCreditFileKycDocument'
  requestBodies:
    KycDocumentWebhook:
      content:
        application/json:
          schema:
            properties:
              customerId:
                $ref: '#/components/schemas/CustomerId'
              kycDocumentId:
                type: string
                description: ID of the KYC document.
                maxLength: 50
                example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
              fileId:
                type: string
                description: ID of the file.
                maxLength: 50
                example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
              eventType:
                type: string
                description: Type of event that triggered the webhook.
                enum:
                  - kyc-document-accepted
                  - kyc-document-created
                  - kyc-document-modified
                  - kyc-document-rejected
                  - kyc-document-reviewed
                  - kyc-document-archived
              _embedded:
                type: object
                description: Embedded objects related to the KYC document event.
                properties:
                  customer:
                    $ref: '#/components/schemas/Customer'
                  kycDocument:
                    $ref: '#/components/schemas/KycDocument'
              _links:
                type: array
                description: Links to related resources.
                items:
                  type: object
                  properties:
                    href:
                      description: URL of the link.
                      type: string
                    rel:
                      description: Relationship type of the link.
                      type: string
                      enum:
                        - customer
                        - file
                        - kycDocument
      description: Payload of KYC document-related webhook event.
```
