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

# List the capabilities of the tenant's connected providers

> Returns, for each provider that is BOTH connected to the tenant AND installed on this deployment, what it declares it supports: the operation types it can be routed to, the boleto types and features, the nosso número mode, the payment segments and the inbound webhook features.

CONNECTED is the same rule as the PROVIDER_NOT_CONNECTED reason of configureProviderRoute: for a core provider, a usable credential of the tenant.

A request that needs a capability the provider of the operation does not declare is refused before any provider call with 422 PBP-0701 naming it in `capability`. A tenant with no connected provider is answered 200 with an empty `items` list.

Use it before configuring a route: a provider absent here is refused by configureProviderRoute (PROVIDER_NOT_CONNECTED or PROVIDER_NOT_INSTALLED), and one whose `operations` lacks the operation is refused with CAPABILITY_MISSING.

WHO MAY CALL IT: `provider-routes:read`.



## OpenAPI

````yaml /pt/openapi/v3-current/payments.yaml get /v1/admin/providers/capabilities
openapi: 3.1.0
info:
  description: >-
    API for the Lerian Payments interface via BTG. It covers boleto issuance,
    cancellation, and queries; bill payments (bankslip, utilities, and DARF) and
    queries; aggregated boleto and payment dashboards; provider connection and
    outbound webhook configuration; and the provider webhook receiver for
    settlement events.


    ERROR BODIES. A failed request arrives as an RFC 9457 problem document on
    application/problem+json. Branch on the code member. A license refusal
    carries an LCS code, listed in the License Manager error list.


    NOTICES. The webhooks section describes each notice Payments posts to the
    tenant's callback URL. Delivery does not guarantee order: order a boleto's
    notices by the occurredAt member of the body. Notices of one boleto recorded
    together never tie and follow the order of the facts; notices recorded at
    different moments can tie, and in a tie the boleto query tells the current
    state. The same notice can arrive more than once: after verifying its
    signature and its X-Webhook-Timestamp, discard repetitions by the eventId
    member of the body, equal to the X-Webhook-Id header and the same on every
    attempt.
  title: Payments — via BTG API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security: []
tags:
  - description: >-
      Tenant-level setup: connecting the banking provider and configuring where
      status notifications are delivered.
    name: Admin
  - description: Issuing, querying and cancelling boletos, and retrieving the rendered PDF.
    name: Boletos
  - description: >-
      Aggregated counts, amounts and breakdowns over a period, for boletos and
      for payments.
    name: Dashboards
  - description: >-
      The notices Payments posts to the tenant's callback URL, one per type
      enabled in enabledEvents, each signed with the configuration's secret.
      Each item describes the body, the delivery headers, when the notice is
      sent and which providers send it.
    name: Notices
  - description: >-
      Paying bankslips, utility bills and DARF tax slips, and querying those
      payments.
    name: Payments
  - description: >-
      The webhook the payment provider posts settlement events to. Authenticated
      with a credential agreed with the provider, not with the platform identity
      used by the rest of this API.
    name: Settlement
paths:
  /v1/admin/providers/capabilities:
    get:
      tags:
        - Admin
      summary: List the capabilities of the tenant's connected providers
      description: >-
        Returns, for each provider that is BOTH connected to the tenant AND
        installed on this deployment, what it declares it supports: the
        operation types it can be routed to, the boleto types and features, the
        nosso número mode, the payment segments and the inbound webhook
        features.


        CONNECTED is the same rule as the PROVIDER_NOT_CONNECTED reason of
        configureProviderRoute: for a core provider, a usable credential of the
        tenant.


        A request that needs a capability the provider of the operation does not
        declare is refused before any provider call with 422 PBP-0701 naming it
        in `capability`. A tenant with no connected provider is answered 200
        with an empty `items` list.


        Use it before configuring a route: a provider absent here is refused by
        configureProviderRoute (PROVIDER_NOT_CONNECTED or
        PROVIDER_NOT_INSTALLED), and one whose `operations` lacks the operation
        is refused with CAPABILITY_MISSING.


        WHO MAY CALL IT: `provider-routes:read`.
      operationId: listProviderCapabilities
      parameters:
        - description: >-
            Tenant organization ID. Optional. The organization context is
            determined by the credentials you authenticate with; this header
            does not select or change it.
          in: header
          name: X-Organization-Id
          schema:
            description: >-
              Tenant organization ID. Optional. The organization context is
              determined by the credentials you authenticate with; this header
              does not select or change it.
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderCapabilitiesList'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Authentication failed: the request carries no valid credential, or
            the credential does not identify a tenant. The error body is an RFC
            9457 problem document (`application/problem+json`) with error code
            `PBP-0003`. Obtain a valid bearer token and send the request again.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            The authenticated principal is not allowed to perform this request.
            The error body is an RFC 9457 problem document
            (`application/problem+json`) with error code `PBP-0004`: the
            principal lacks permission for this operation, and the permission
            has to be granted before the request can succeed.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Service Unavailable. PBP-0008 means a dependency the request needs,
            authentication or the tenant's storage, is temporarily unavailable.
            The request was not processed; wait and send it again.
      security:
        - BearerAuth: []
components:
  schemas:
    ProviderCapabilitiesList:
      additionalProperties: false
      properties:
        items:
          description: >-
            One entry per provider connected to the tenant and installed on this
            deployment, ordered by providerType. Empty when none.
          items:
            $ref: '#/components/schemas/ProviderCapabilities'
          type:
            - array
            - 'null'
      required:
        - items
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ProviderCapabilities:
      additionalProperties: false
      properties:
        boleto:
          $ref: '#/components/schemas/BoletoCapabilities'
        numbering:
          $ref: '#/components/schemas/NumberingCapabilities'
        operations:
          description: >-
            Operation types the provider can be routed to. A route write for an
            operation outside this list is refused with 422 PBP-0702
            CAPABILITY_MISSING.
          items:
            enum:
              - BOLETO_ISSUANCE
              - BANKSLIP_PAYMENT
              - BARCODE_BILL_PAYMENT
              - DARF_PAYMENT
            type: string
          type:
            - array
            - 'null'
          uniqueItems: true
        payment:
          $ref: '#/components/schemas/PaymentCapabilities'
        providerType:
          description: Provider identifier, uppercase, the same in every table and answer.
          examples:
            - BTG
          maxLength: 20
          minLength: 1
          pattern: ^[A-Z][A-Z0-9_]{0,19}$
          type: string
        webhook:
          $ref: '#/components/schemas/WebhookCapabilities'
      required:
        - providerType
        - operations
        - boleto
        - numbering
        - payment
        - webhook
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    BoletoCapabilities:
      additionalProperties: false
      properties:
        batch:
          $ref: '#/components/schemas/BoletoBatchCapability'
        cancel:
          description: Whether boletos can be cancelled at the provider.
          type: boolean
        chargeStartDates:
          description: >-
            Whether the provider registers the start date of the fine and of
            interest (fine.startDate and interest.startDate of POST /v1/boletos,
            of each item of POST /v1/boletos/batches and of POST
            /v1/boletos/installments). Otherwise a boleto, a batch or a series
            that sends either is refused with 422 PBP-0701 naming
            BOLETO_CHARGE_START_DATE.
          type: boolean
        documentNumber:
          description: >-
            Whether the provider registers the payee's document number
            (documentNumber of POST /v1/boletos and of each item of POST
            /v1/boletos/batches, and documentNumbers of POST
            /v1/boletos/installments). Otherwise a boleto, a batch or a series
            that sends it is refused with 422 PBP-0701 naming
            BOLETO_DOCUMENT_NUMBER.
          type: boolean
        earlyAcceptance:
          description: >-
            Whether the provider confirms the registration on its own
            initiative.
          type: boolean
        installments:
          description: >-
            Whether installment series are supported (POST
            /v1/boletos/installments).
          type: boolean
        instructions:
          description: >-
            Whether the provider registers the free-text instructions
            (instructions of POST /v1/boletos and of each item of POST
            /v1/boletos/batches). Otherwise a boleto or a batch that sends
            non-empty instructions is refused with 422 PBP-0701 naming
            BOLETO_INSTRUCTIONS.
          type: boolean
        instrumentBeforeRegistration:
          description: >-
            Whether the digitable line, barcode and PDF of a PENDING boleto are
            valid before the provider confirms the registration.
          type: boolean
        pdf:
          description: >-
            Whether the provider renders the boleto PDF (GET
            /v1/boletos/{id}/pdf).
          type: boolean
        pdfReadiness:
          $ref: '#/components/schemas/PdfReadiness'
        settlement:
          description: >-
            Who credits the payee when a boleto settles. DIRECT: this service
            posts the settlement credit to the ledger. HELD: the provider holds
            the amount and credits the payee itself. A provider that does not
            declare BOLETO_ISSUANCE reads DIRECT.
          enum:
            - DIRECT
            - HELD
          examples:
            - DIRECT
          type: string
        titleSearch:
          description: >-
            Whether the provider can be searched for titles, which the
            reconciliation uses to settle uncertain issuances.
          type: boolean
        types:
          description: >-
            Boleto types the provider issues. A type outside the list is refused
            before the call (QR_CODE keeps its current PBP-0006; others
            PBP-0701). HYBRID may be listed while issuance of the hybrid boleto
            is still refused by this service.
          items:
            enum:
              - TRADITIONAL
              - QR_CODE
              - HYBRID
            type: string
          type:
            - array
            - 'null'
          uniqueItems: true
      required:
        - types
        - batch
        - installments
        - pdf
        - cancel
        - titleSearch
        - instrumentBeforeRegistration
        - earlyAcceptance
        - pdfReadiness
        - settlement
        - documentNumber
        - chargeStartDates
        - instructions
      type: object
    NumberingCapabilities:
      additionalProperties: false
      properties:
        acceptsClientSupplied:
          description: >-
            Whether the payee may choose the nosso número. False exactly when
            mode is PROVIDER_ONLY.
          type: boolean
        echoIsAuthoritative:
          description: >-
            Whether the provider's echo of the number proves what the instrument
            carries.
          type: boolean
        maxWidth:
          description: >-
            Digits the instrument holds for a payee-chosen number; meaningful
            only when acceptsClientSupplied.
          examples:
            - 11
          format: int64
          minimum: 0
          type: integer
        mode:
          description: >-
            PAYEE_OR_PROVIDER: the provider accepts a nosso número chosen by the
            payee or numbers the boleto itself. PROVIDER_ONLY: the provider
            always numbers, and a nosso número sent by the client is refused
            with 422 PBP-0701. A provider that does not declare BOLETO_ISSUANCE
            reads PROVIDER_ONLY.
          enum:
            - PAYEE_OR_PROVIDER
            - PROVIDER_ONLY
          examples:
            - PAYEE_OR_PROVIDER
          type: string
      required:
        - mode
        - acceptsClientSupplied
        - maxWidth
        - echoIsAuthoritative
      type: object
    PaymentCapabilities:
      additionalProperties: false
      properties:
        segments:
          description: >-
            Barcode segments the provider pays and consults. Empty for a
            provider that pays neither.
          items:
            enum:
              - BANKSLIP
              - UTILITIES
            type: string
          type:
            - array
            - 'null'
          uniqueItems: true
      required:
        - segments
      type: object
    WebhookCapabilities:
      additionalProperties: false
      properties:
        inbound:
          description: Whether the provider posts notices to this service.
          type: boolean
        resubscribe:
          description: >-
            Whether POST
            /v1/admin/providers/webhooks/{provider_type}/resubscribe is accepted
            for it; otherwise 422 PBP-0701.
          type: boolean
      required:
        - inbound
        - resubscribe
      type: object
    BoletoBatchCapability:
      additionalProperties: false
      properties:
        maxItems:
          description: >-
            Most items one batch submission carries. 0 when batches are not
            supported.
          examples:
            - 25
          format: int64
          minimum: 0
          type: integer
        supported:
          description: >-
            Whether the provider accepts boleto batches (POST
            /v1/boletos/batches).
          type: boolean
      required:
        - supported
        - maxItems
      type: object
    PdfReadiness:
      additionalProperties: false
      properties:
        initialBackoffMs:
          description: First wait of the exponential backoff, in milliseconds.
          examples:
            - 200
          format: int64
          minimum: 0
          type: integer
        maxBackoffMs:
          description: Longest single wait, in milliseconds.
          examples:
            - 2000
          format: int64
          minimum: 0
          type: integer
        maxTotalWaitMs:
          description: Longest total wait inside one request, in milliseconds.
          examples:
            - 4000
          format: int64
          minimum: 0
          type: integer
      required:
        - initialBackoffMs
        - maxBackoffMs
        - maxTotalWaitMs
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.