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

# Generate a Pix Payment (async)

> Generates an async pix payment



## OpenAPI

````yaml v2/api-reference/openapi.json POST /v2/out/pix/async
openapi: 3.0.0
info:
  title: Trio API v2
  version: 2026-10-19.v2
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /v2/out/pix/async:
    parameters:
      - description: >-
          Version of the v2 contract the client is written against. Each
          breaking change publishes a new version.
        example: 2026-10-19.v2
        in: header
        name: Trio-Version
        required: true
        schema:
          enum:
            - 2026-10-19.v2
          type: string
          x-struct: null
          x-validate: null
      - description: >-
          ID of another org to act on instead of the API key's own org. The
          key's org must have been granted access to it, and the request is
          refused with 403 FORBIDDEN otherwise. When that access or the API key
          is read-only, only GET and HEAD requests may carry it. When the target
          org requires mTLS, so does the request. Leave it out to act on the
          key's own org.
        in: header
        name: Trio-Target-Org-Id
        required: false
        schema:
          format: uuid
          type: string
          x-struct: null
          x-validate: null
    post:
      tags:
        - Payments (out)
        - Pix
      summary: Generate an async pix payment
      description: Generates an async pix payment
      operationId: TrioFoundationWeb.V2.Out.PixController.generate_async
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2_Generate_pix_async_create_params'
        description: The async pix generation attributes
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_Generate_pix_response'
          description: GeneratePix
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Malformed request: a body that is not valid JSON
            (MALFORMED_REQUEST), or a Trio-Version header that is missing or not
            the current one (INVALID_TRIO_VERSION).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: Missing or invalid API key credentials (INVALID_CREDENTIALS).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            The API key may not do this (FORBIDDEN): for instance
            Trio-Target-Org-Id names an org it has no access to, or writes
            through a read-only access.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Invalid input (INVALID_PARAMETER, REQUIRED_PARAMETER, or the code of
            the rule the request breaks). A request outside the operation's
            schema lists the offending fields in `errors`.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            A service needed to answer is unavailable
            (TRIO_SERVICE_UNAVAILABLE).
      callbacks: {}
      security:
        - authorization: []
components:
  schemas:
    V2_Generate_pix_async_create_params:
      description: >-
        Body params to pay a Pix key or brcode without checking it first: Trio
        checks it while it processes the payment.
      example:
        amount: 100
        bank_account_id: 1a760495-cb95-4023-96e8-0cff5776b010
        counterparty:
          bank_accounts:
            - branch: '0001'
              digit: '1'
              ispb: '12345678'
              number: '123456'
              type: checking
          tax_number: '52998224725'
        description: description
        external_id: external_id 1
        reference: john.doe@example.com
        type: key
      properties:
        amount:
          description: Amount in cents
          maximum: 100000000000
          minimum: 1
          type: integer
          x-struct: null
          x-validate: null
        bank_account_id:
          description: Bank account that pays the Pix
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        counterparty:
          description: >-
            Receiver the payer expects. When given, the payment is refused if
            the key or brcode belongs to another tax number, or to none of the
            bank accounts listed
          properties:
            bank_accounts:
              description: Bank accounts the key or brcode may point to (up to 10)
              items:
                properties:
                  branch:
                    description: Branch
                    type: string
                    x-struct: null
                    x-validate: null
                  digit:
                    description: Account digit
                    type: string
                    x-struct: null
                    x-validate: null
                  ispb:
                    description: ISPB of the bank
                    type: string
                    x-struct: null
                    x-validate: null
                  number:
                    description: Account number
                    type: string
                    x-struct: null
                    x-validate: null
                  type:
                    description: Account type
                    enum:
                      - checking
                      - payment
                      - salary
                      - savings
                    type: string
                    x-struct: null
                    x-validate: null
                required:
                  - ispb
                  - number
                type: object
                x-struct: null
                x-validate: null
              type: array
              x-struct: null
              x-validate: null
            tax_number:
              description: CPF or CNPJ
              type: string
              x-struct: null
              x-validate: null
          type: object
          x-struct: null
          x-validate: null
        description:
          description: Pix description
          type: string
          x-struct: null
          x-validate: null
        external_id:
          description: External ID
          type: string
          x-struct: null
          x-validate: null
        fee:
          description: Fee
          nullable: true
          type: integer
          x-struct: null
          x-validate: null
        reference:
          description: The Pix key, or the copy and paste code of the brcode
          type: string
          x-struct: null
          x-validate: null
        type:
          description: 'What the Pix pays: a key or a brcode'
          enum:
            - key
            - brcode
          type: string
          x-struct: null
          x-validate: null
      required:
        - amount
        - type
        - reference
        - bank_account_id
      title: V2 Generate pix async create params
      type: object
      x-struct: >-
        Elixir.TrioFoundationWeb.Schemas.Banking.V2.Cashout.GeneratePix.CreateAsyncParams
      x-validate: null
    V2_Generate_pix_response:
      description: >-
        The Pix payment requested. When the organization requires approval for
        Pix payments, `out_document_id` is null until the approval request is
        approved, and `approval_request_id` identifies that request; otherwise
        `approval_request_id` is null.
      example:
        data:
          approval_request_id: null
          out_document_id: 41234d60-f6a9-4c9c-8cc3-5769ce9bbea2
      properties:
        data:
          properties:
            approval_request_id:
              description: ID of the approval request, when the payment needs approval
              format: uuid
              nullable: true
              type: string
              x-struct: null
              x-validate: null
            out_document_id:
              description: ID of the out document created for the payment
              format: uuid
              nullable: true
              type: string
              x-struct: null
              x-validate: null
          required:
            - out_document_id
            - approval_request_id
          type: object
          x-struct: null
          x-validate: null
      required:
        - data
      title: V2 Generate pix response
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Cashout.GeneratePix.Response
      x-validate: null
    V2_error:
      example:
        error:
          error_code: INVALID_PARAMETER
          error_message: 'Invalid parameters: /amount: Invalid integer. Got: string'
          errors:
            - field: /amount
              message: 'Invalid integer. Got: string'
      properties:
        error:
          properties:
            error_code:
              description: >-
                Stable UPPER_SNAKE identifier of the error, for programs and
                logs. Branch on this, not on the message.
              type: string
              x-struct: null
              x-validate: null
            error_message:
              description: Human readable explanation of the error.
              type: string
              x-struct: null
              x-validate: null
            errors:
              description: >-
                Only on INVALID_PARAMETER for a request outside the operation's
                schema: one entry per offending field.
              items:
                properties:
                  field:
                    description: JSON pointer to the field, e.g. /amount.
                    type: string
                    x-struct: null
                    x-validate: null
                  message:
                    description: What is wrong with it.
                    type: string
                    x-struct: null
                    x-validate: null
                required:
                  - field
                  - message
                type: object
                x-struct: null
                x-validate: null
              type: array
              x-struct: null
              x-validate: null
          required:
            - error_code
            - error_message
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: V2 error
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.HTTP.V2Error
      x-validate: null
  securitySchemes:
    authorization:
      scheme: basic
      type: http

````

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