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

# Confirm Payment Method

> Confirms the payment step of one onboarding (D-04): stores
`payment_method` and `payment_method_confirmed_at` on it, completes
its payment step and makes the method the default of every company
of the account (customer-onboarding D-47). Without `onboarding`, the
oldest open onboarding still waiting on a confirmation is used.
Requires `customer-onboarding:payment`.




## OpenAPI

````yaml POST /portal/customer/onboarding/payment/confirm
openapi: 3.0.1
info:
  title: Portal Customer Onboarding API
  description: |
    The customer portal wizard over the session's open Maihue onboardings
    (maihue/onboarding D-01, D-04). The session must belong to the primary
    user of a person account or the legal representative of a company, of a
    `CHL_RUT` account, with at least one open onboarding that was invited.

    - Shared steps (consent and password per user, identity per account)
      complete in **every** open onboarding at once.
    - The payment step belongs to one onboarding: `payment/confirm` names it
      and stores the confirmed method on it.
    - The gate (`required`) is enforced only with the `maihue-onboarding`
      flag on; with it off the steps still work and nobody is redirected.
  version: '2026-10-21'
servers:
  - description: Production
    url: https://api.bbrands.io/api/v3
  - description: Certification
    url: https://certification.api.bbrands.io/api/v3
  - description: Development
    url: https://development.api.bbrands.io/api/v3
security:
  - bearerAuth: []
tags:
  - name: Portal Customer Onboarding
    description: Wizard state and steps of the session.
  - name: Onboarding Invitations (operator)
    description: Account-based invitation routes kept for Horizon Enterprise.
paths:
  /portal/customer/onboarding/payment/confirm:
    post:
      tags:
        - Portal Customer Onboarding
      summary: Confirm the payment method of an onboarding
      description: |
        Confirms the payment step of one onboarding (D-04): stores
        `payment_method` and `payment_method_confirmed_at` on it, completes
        its payment step and makes the method the default of every company
        of the account (customer-onboarding D-47). Without `onboarding`, the
        oldest open onboarding still waiting on a confirmation is used.
        Requires `customer-onboarding:payment`.
      operationId: customerOnboardingPaymentConfirm
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payment_method
              additionalProperties: false
              properties:
                onboarding:
                  type: string
                  format: uuid
                  description: >-
                    Open onboarding of the session whose payment step is
                    confirmed.
                payment_method:
                  type: string
                  format: uuid
      responses:
        '200':
          description: Payment method confirmed
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      onboarding:
                        type: string
                        format: uuid
                      payment_method:
                        type: string
                        format: uuid
                  message:
                    type: string
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  schemas:
    Meta:
      type: object
      properties:
        correlation:
          type: string
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            errors:
              type: array
              items: {}
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        `onboarding-not-invited`, `type-dni-not-supported`, not the recipient
        role, or `portal-customer-onboarding` off
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: '`onboarding-not-found` or the account does not exist'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: >-
        `password-step-not-ready`, `password-already-set`,
        `payment-method-not-selectable`, `legal-version-not-current` or a RUT
        mismatch
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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