> ## 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.

# Create an Immediate Charge

> Use this endpoint to create an immediate Pix collection (cobrança imediata) with a dynamic QR Code that is valid for a defined period.

**Notes:**
- Each immediate collection is unique and can only be paid once
- Amount and expiration time are required
- Transaction ID (txId) must be unique per receiver
- Status changes to COMPLETED when payment is received



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml post /v1/collections/immediate
openapi: 3.1.0
info:
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  title: Pix BTG API
  version: 1.12.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/collections/immediate:
    post:
      tags:
        - Immediate Collections
      summary: Create an Immediate Charge
      description: >-
        Use this endpoint to create an immediate Pix collection (cobrança
        imediata) with a dynamic QR Code that is valid for a defined period.


        **Notes:**

        - Each immediate collection is unique and can only be paid once

        - Amount and expiration time are required

        - Transaction ID (txId) must be unique per receiver

        - Status changes to COMPLETED when payment is received
      operationId: collection-create-immediate
      parameters:
        - description: Account ID (UUID format)
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: Account ID (UUID format)
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateImmediateCollectionInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImmediateCollectionOutput'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    CreateImmediateCollectionInput:
      additionalProperties: false
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          examples:
            - customerId: '67890'
              orderId: '12345'
          type: object
        amount:
          examples:
            - '100.00'
          minLength: 1
          type: string
        debtorDocument:
          examples:
            - '52998224725'
          type: string
        debtorName:
          examples:
            - João da Silva
          type: string
        description:
          examples:
            - 'Payment for order #12345'
          type: string
        expirationSeconds:
          examples:
            - 3600
          format: int64
          minimum: 1
          type: integer
        locationInformation:
          $ref: '#/components/schemas/LocationInformationDTO'
        metadata:
          additionalProperties: {}
          type: object
        receiverKey:
          examples:
            - '+5511999999999'
          minLength: 1
          type: string
        tags:
          examples:
            - - ecommerce
              - subscription
          items:
            type: string
          type: array
        transactionAmount:
          examples:
            - '150.00'
          type: string
        txId:
          examples:
            - TXabcdefghijklmno123456789
          minLength: 1
          type: string
        withdrawalAmount:
          examples:
            - '50.00'
          type: string
      required:
        - txId
        - receiverKey
        - amount
        - expirationSeconds
      type: object
    ImmediateCollectionOutput:
      additionalProperties: false
      properties:
        additionalInfo:
          additionalProperties:
            type: string
          examples:
            - customerId: '67890'
              orderId: '12345'
          type: object
        amount:
          examples:
            - '100.00'
          type: string
        createdAt:
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        debtorDocument:
          examples:
            - '52998224725'
          type: string
        debtorName:
          examples:
            - João da Silva
          type: string
        description:
          examples:
            - 'Payment for order #12345'
          type: string
        emv:
          examples:
            - 00020126580014br.gov.bcb.pix...
          type: string
        expirationSeconds:
          examples:
            - 3600
          format: int64
          type: integer
        id:
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        locationUrl:
          examples:
            - https://api.example.com/qr/550e8400
          type: string
        metadata:
          additionalProperties: {}
          type: object
        receiverKey:
          examples:
            - '+5511999999999'
          type: string
        status:
          examples:
            - ACTIVE
          type: string
        tags:
          examples:
            - - ecommerce
              - subscription
          items:
            type: string
          type: array
        txId:
          examples:
            - TXN123456789
          type: string
        updatedAt:
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      required:
        - id
        - txId
        - status
        - amount
        - receiverKey
        - expirationSeconds
        - createdAt
        - updatedAt
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        code:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    LocationInformationDTO:
      additionalProperties: true
      properties:
        categoryCode:
          examples:
            - '5411'
          type: string
        merchantCity:
          examples:
            - São Paulo
          type: string
        merchantName:
          examples:
            - Loja ABC
          type: string
        postalCode:
          examples:
            - 01310-100
          type: string
      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.