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

# Create Outbound Transaction (Brazil)

> Create an outbound transaction (withdraw) from a Brazil (BRL) account.
Requires sufficient net balance. Transaction starts in `processing` status.




## OpenAPI

````yaml /api-reference/openapi.es.yaml post /br/transactions/outbound
openapi: 3.1.0
info:
  title: HG.Cash API
  description: >
    # 🚀 HG.Cash Transaction API


    Modern REST API for users to create outbound transactions from their
    accounts.


    ## 🧾 How it works


    - We assign accounts to your user in HG.Cash

    - When these accounts have transactions (inbound or outbound), HG.Cash will
    notify your backend using the webhook URL you configure in the HG.Cash
    dashboard

    - **Webhook signature (HMAC)**: In account settings you can generate a
    signing secret. When configured, each webhook POST includes the header
    `X-HG-Webhook-Signature: sha256=<hex>` where the value is HMAC-SHA256 of the
    raw JSON body using your secret. Verify this in your endpoint to ensure the
    request is authentic.

    - To create cash-outs (money leaving your accounts), you must call the
    **Cash Out** endpoint: **Create Transaction Request (Cash Out)** (`POST
    /transactions`)


    ## 📊 Getting Started


    1. **Generate your API token** in the account settings page

    2. **Test endpoints** using the interactive documentation below

    3. **Implement** in your backend services (never expose tokens in frontend)

    4. **Monitor** your integration and handle errors appropriately


    ## 🔐 Authentication


    This API uses **Bearer Token** authentication. Include your user API token
    in the Authorization header, for example `Authorization: Bearer
    cash_your_token_here`.


    ## ⚠️ Important Security Notes


    - Never share or expose your user API authentication token

    - Store tokens securely on your backend servers only

    - All API calls must be made from secure backend services

    - Contact administrators immediately if your token is compromised
  version: 1.0.0
  contact:
    name: HG.Cash API Support
    email: api-support@hg.cash
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://hg.cash/api/v1
    description: Production server
  - url: http://dev.hg.cash/api/v1
    description: Development server
security:
  - bearerAuth: []
tags:
  - name: Transactions
    description: >-
      Transaction Management - Create and manage transactions in the HG.Cash
      system. All transaction endpoints require authentication.
  - name: Accounts
    description: >-
      Accounts - Retrieve account information and balances for the authenticated
      user. All account endpoints require authentication.
  - name: Reference Data
    description: >-
      Reference Data - Get reference data like transaction statuses and types.
      These endpoints require authentication.
  - name: Webhooks
    description: Webhooks - Event notifications sent to your HTTP endpoint.
  - name: Brazil
    description: >-
      Transaction management - Create and manage transactions in Pix system for
      Brazil operations
  - name: Chile
    description: Checkout hospedado y payouts bancarios para Chile (CLP)
  - name: Bolivia
    description: Cash-in con QR y payouts ACH para Bolivia (BOB)
  - name: Checkouts
    description: Sesiones de checkout hospedado para AR, BR, CL y BO
paths:
  /br/transactions/outbound:
    post:
      tags:
        - Brazil
      summary: Create Outbound Transaction (Brazil)
      description: >
        Create an outbound transaction (withdraw) from a Brazil (BRL) account.

        Requires sufficient net balance. Transaction starts in `processing`
        status.
      operationId: createBrOutboundTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OutboundTransactionRequest'
      responses:
        '201':
          description: >
            Transaction created. Returns `status: processing` when the provider
            accepted the withdraw (HTTP 200).

            Returns `status: cancelled` when the provider rejected or failed
            (non-200); the transaction is stored and marked cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutboundTransactionResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Account not found
        '409':
          description: Insufficient balance
components:
  schemas:
    OutboundTransactionRequest:
      type: object
      description: >-
        Request to create an outbound transaction (withdraw) for Brazil BRL
        accounts
      required:
        - accountId
        - amount
        - name
        - keyType
        - keyPix
      properties:
        accountId:
          type: string
          format: uuid
        amount:
          type: number
          format: decimal
        name:
          type: string
          description: Recipient name
        keyType:
          type: string
          enum:
            - document
            - email
            - evp
            - phone
            - cnpj
          description: PIX key type (document=CPF, evp=random key)
        keyPix:
          type: string
          description: PIX key value (email, CPF, CNPJ, phone, or random key)
        webhookUrl:
          type: string
          format: uri
    OutboundTransactionResponse:
      type: object
      required:
        - id
        - status
      properties:
        id:
          type: string
          format: uuid
          description: HG.Cash transaction ID
        status:
          type: string
          enum:
            - processing
            - cancelled
          description: >
            - `processing`: Provider accepted the withdraw (HTTP 200).
            Transaction is being processed.

            - `cancelled`: Provider rejected or failed (non-200). Transaction
            was marked cancelled.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        User API authentication token with format `cash_<64-char-hex>`. Sample
        value
        `cash_16cdc3b6f83c72d9d2680adca4f430962981f6bf32613a129dded0aa060387d2`.

````