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

# Create a Payout

> Initiate a batch payout to multiple recipients using either PayID or BSB-enabled accounts. This API enables efficient bulk payment processing, allowing merchants to handle payouts to multiple recipients in a single request.

If a payout fails due to insufficient funds and the `is_retry` flag is set to true, the system will continue to attempt processing until sufficient funds become available, either through a balance top-up or new incoming payments.

Payment statuses:
  - **created**: Payout created and pending further processing.
  - **processing**: Payout has been topped up to the corresponding PayID and is currently being processed.
  - **scheduled**: Waiting for funds to be debited from the payer's account; the payout is scheduled but not yet executed.
  - **completed**: Payout completed successfully for the entire batch. Note that individual transaction failures do not affect the completion status of the overall batch.

Important notes:
  - If using a phone number as the PayID, prefix it with the country code, separated by a dash. For example: `+61-412345678`.
  - PayIDs using email addresses must be in lowercase (e.g., `johnwick@gmail.com`).
  - **Either `payid` or both `bsb` and `account_number` are required**. You cannot use both `payid` and `bsb/account_number` in the same request for a single transaction.




## OpenAPI

````yaml /api/openapi/v1-reference.yaml post /v1/payouts
openapi: 3.0.3
info:
  title: Payment APIs (AUD only)
  description: >-
    ## Introduction

    The Payment API Solution (AUD) offers developers a comprehensive suite of
    API services to build innovative AUD payment solutions efficiently. These
    APIs enable seamless transactions using various payment methods and
    functionalities, ensuring a robust, reliable, and scalable payment
    infrastructure tailored for the Australian market.

    ### Key Features

    - **Payment Methods**:
      - **Payment Link**: Supports payments via card and PayID.
      - **PayID**: Provides instant payments using a unique identifier.
      - **PayTo**: Enables scheduled or recurring payments.
      - **BSB/Account Number**: Allows direct bank transfers.
      - **Payout**: Manage payouts to designated accounts.

    - **Additional Functionalities**:
      - **Balance Management**: Real-time balance inquiries and updates.
      - **Reporting Services**: Generate detailed transaction and payment reports.

    This documentation provides detailed guidance for integrating these
    capabilities into your application.
  termsOfService: https://helloclever.co/terms
  contact:
    email: support@helloclever.co
  version: 1.0.11
servers:
  - url: https://api.cleverhub.co/api
    description: Sandbox Environment
  - url: https://api-merchant.helloclever.co/api
    description: Production Environment
security: []
paths:
  /v1/payouts:
    post:
      tags:
        - AUD Payout
      summary: Create a Payout
      description: >
        Initiate a batch payout to multiple recipients using either PayID or
        BSB-enabled accounts. This API enables efficient bulk payment
        processing, allowing merchants to handle payouts to multiple recipients
        in a single request.


        If a payout fails due to insufficient funds and the `is_retry` flag is
        set to true, the system will continue to attempt processing until
        sufficient funds become available, either through a balance top-up or
        new incoming payments.


        Payment statuses:
          - **created**: Payout created and pending further processing.
          - **processing**: Payout has been topped up to the corresponding PayID and is currently being processed.
          - **scheduled**: Waiting for funds to be debited from the payer's account; the payout is scheduled but not yet executed.
          - **completed**: Payout completed successfully for the entire batch. Note that individual transaction failures do not affect the completion status of the overall batch.

        Important notes:
          - If using a phone number as the PayID, prefix it with the country code, separated by a dash. For example: `+61-412345678`.
          - PayIDs using email addresses must be in lowercase (e.g., `johnwick@gmail.com`).
          - **Either `payid` or both `bsb` and `account_number` are required**. You cannot use both `payid` and `bsb/account_number` in the same request for a single transaction.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payout_transaction_details
                - scheduled_at
                - description
                - endpoint_url
              properties:
                payout_transaction_details:
                  type: array
                  description: List of payout transaction details.
                  items:
                    type: object
                    required:
                      - payee
                      - email
                      - amount
                    properties:
                      payee:
                        type: string
                        pattern: ^(?![!])(?<![!])^[a-zA-Z0-9 ']*$
                        description: Full name of the payee.
                        example: John Doe
                      address:
                        type: string
                        description: Full address of the payee.
                        example: 123 Example Street, Sydney, NSW 2000
                      email:
                        type: string
                        description: Payee's email address (required).
                        example: john.doe@example.com
                      amount:
                        type: number
                        description: The payout amount for this transaction.
                        example: 150
                      payid:
                        type: string
                        description: >-
                          The payee's PayID (required if `bsb` and
                          `account_number` are not provided).
                        example: john.doe@example.com
                      payid_type:
                        type: string
                        enum:
                          - email
                          - phone
                          - abn
                        description: >
                          Type of PayID.


                          - **email**: Email address.

                          - **phone**: Phone number with country code. For
                          example, `+61-412345678`

                          - **abn**: Australian Business Number.
                        example: email
                      bsb:
                        type: string
                        description: The BSB number, required if `payid` is not provided.
                        example: '123456'
                      account_number:
                        type: string
                        description: >-
                          The payee's account number, required if `payid` is not
                          provided.
                        example: '987654321'
                scheduled_at:
                  type: string
                  format: date-time
                  description: >-
                    Scheduled date and time for the payout transaction. This
                    date-time is in UTC.
                  example: '2024-01-01T10:00:00'
                description:
                  type: string
                  minLength: 5
                  maxLength: 140
                  description: Brief description of the payout purpose.
                  example: Monthly payout for January
                is_retry:
                  type: boolean
                  default: false
                  description: >
                    Indicates if the system should retry the payout in case of
                    insufficient funds. Default is false. If set to true, the
                    system will continue to try until the balance is sufficient,
                    either through top-up or new payments.
                  example: true
                external_id:
                  type: string
                  description: >-
                    A custom identifier provided by the merchant for tracking
                    purposes.
                  example: custom-payout-id-123
                endpoint_url:
                  type: string
                  format: uri
                  description: >
                    URL that Hello Clever will invoke when the status of the
                    transaction changes. The client must expose a TLS
                    1.2-secured endpoint with a certificate from a well-known
                    commercial certificate authority. Self-signed or internally
                    signed certificates are not accepted.
                  example: https://merchant.example.com/payout_status_callback
                authorization_header:
                  type: string
                  description: >
                    Authorization header value for securing the callback request
                    to the specified endpoint.
                  example: Bearer your_secret_token
      responses:
        '200':
          description: Payout batch created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutObject'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '422':
          description: Unprocessable Entity
      callbacks:
        payoutCallback:
          '{$request.body#/endpoint_url}':
            post:
              requestBody:
                description: PayoutObject
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/PayoutObject'
              responses:
                '200':
                  description: Callback received successfully
                '400':
                  description: Bad request
                '401':
                  description: Unauthorized
              method: post
              type: path
            path: '{$request.body#/endpoint_url}'
components:
  schemas:
    PayoutObject:
      type: object
      properties:
        id:
          type: integer
          description: >
            A unique identifier assigned to the payout payment, used for
            tracking and referencing purposes within the system.
          example: 12345
        uuid:
          type: string
          description: >
            A unique UUID assigned to the payout payment, providing a globally
            unique reference for the transaction.
          example: 550e8400-e29b-41d4-a716-446655440000
        description:
          type: string
          description: >
            A description of the payout payment, providing context or additional
            information such as the purpose of the payout.
          example: 'Payout for invoice #12345'
        payid:
          type: string
          description: >
            The PayID used for topping up the payout payment, allowing for easy
            routing of funds to the correct recipient.
          example: sample@payid.com
        total_amount:
          type: string
          description: >
            The total amount of all transactions included in the payout,
            providing the complete value being paid out.
          example: '1000.00'
        total_refund:
          type: string
          description: |
            The total amount that has been refunded to the payee, if applicable.
          example: '100.00'
        total_failed_transactions:
          type: string
          description: >
            The total number of transactions within the payout that failed to
            complete successfully.
          example: '2'
        scheduled_at:
          type: string
          format: date-time
          description: >
            The date and time when the payout transaction is scheduled to occur,
            expressed in UTC.
          example: '2024-12-31T23:59:59Z'
        status:
          type: string
          enum:
            - created
            - processing
            - scheduled
            - completed
            - expired
          description: |
            The current status of the payout payment. Possible values include:
            - `created`: The payout has been created but not yet processed.
            - `processing`: The payout is currently being processed.
            - `scheduled`: The payout is scheduled for a future date.
            - `completed`: The payout has been completed successfully.
            - `expired`: The payout has expired.
          example: processing
        export_url:
          type: string
          format: uri
          description: >
            A URL for downloading an attachment related to the payout payment,
            such as a receipt or transaction details.
          example: https://example.com/download/payout_attachment
        payout_notification:
          type: object
          description: >
            Details regarding the merchant callback settings for payout status
            updates, including the endpoint URL and authorization header.
          properties:
            endpoint_url:
              type: string
              format: uri
              description: >
                An internet-accessible URL that will be invoked when the status
                of the payout changes, allowing the merchant to receive
                real-time updates.
              example: https://merchant.com/payout_callback
            authorization_header:
              type: string
              description: >
                The authorization header value to be used in the callback
                request, helping ensure the request is authenticated.
              example: Bearer your_token
        error_code:
          type: string
          description: >
            An error code associated with the payout, indicating any issues that
            occurred during processing.
          example: HC_PAYOUT1
        error_message:
          type: string
          description: >
            A description of the error encountered during the payout process,
            providing context for troubleshooting.
          example: >-
            Insufficient funds to payout. Please top up balance in the
            dashboard.
        is_retry:
          type: boolean
          description: >
            Indicates whether the payout is being retried after a previous
            failure.
          example: false
        external_id:
          type: string
          description: >
            A custom identifier for the payout, provided by the merchant for
            tracking and reference purposes.
          example: custom-payout-id-6789
        payout_transactions:
          type: array
          description: >
            A list of individual transactions that are part of the payout,
            including details such as payee information and transaction status.
          items:
            type: object
            properties:
              id:
                type: integer
                description: >
                  A unique identifier assigned to the payout transaction, used
                  for tracking and referencing purposes.
                example: 123
              balance_id:
                type: string
                description: >
                  The UUID of the balance transaction associated with the
                  payout, providing a reference to the specific balance
                  movement.
                example: 550e8400-e29b-41d4-a716-446655441111
              payee:
                type: string
                description: >
                  The name of the payee receiving the payout, used to identify
                  the recipient of the funds.
                example: John Doe
              payid:
                type: string
                description: >
                  The PayID of the payee, used to route the payout to the
                  correct recipient.
                example: payee@payid.com
              payid_type:
                type: string
                description: >
                  The type of PayID being used by the payee. Valid values
                  include:

                  - `EMAIL`: An email address.

                  - `PHONE`: A phone number.

                  - `ABN`: An Australian Business Number.
                enum:
                  - EMAIL
                  - PHONE
                  - ABN
                example: EMAIL
              bsb:
                type: string
                description: >
                  The Bank-State-Branch (BSB) number of the payee's account,
                  used to identify the bank and branch for the transaction.
                example: '123456'
              account_number:
                type: string
                description: >
                  The account number of the payee, used to route the payout to
                  the correct bank account.
                example: '987654321'
              amount:
                type: string
                description: >
                  The amount being paid to the payee as part of the payout
                  transaction.
                example: '500.00'
              status:
                type: string
                description: >
                  The current status of the payout transaction. Possible values
                  include:

                  - `created`: The transaction has been created but not yet
                  processed.

                  - `processing`: The transaction is currently being processed.

                  - `settled`: The transaction has been completed successfully.

                  - `failed`: The transaction failed to complete successfully.
                enum:
                  - created
                  - processing
                  - settled
                  - failed
                example: settled
              error_message:
                type: string
                description: >
                  An error message providing details about why the payout
                  transaction failed, if applicable.
                example: Payment failed due to insufficient funds.
              created_at:
                type: string
                format: date-time
                description: >
                  The date and time when the payout transaction was created,
                  expressed in UTC.
                example: '2024-01-01T00:00:00Z'

````

## Related topics

- [Create a Payout](/api/payout/create-a-payout.md)
- [Create Payout Batch via File](/api/aud-payout/create-payout-batch-via-file.md)
- [Multi-Currency Payout API Reference (v2)](/api/v2/payout.md)
