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

# Authorize Payout

Authorize a payout to release funds to your beneficiary by updating its status to `Received`. This endpoint is designed to approve payouts that are in a `pending` or `on-hold` state.

You can identify the payout for authorization using one of the following methods:

* **By `internalId`:** Localpayment's unique transaction identifier.

* **By `externalId`:** Your own unique reference for the transaction.

* **By date range:** Authorize all eligible payouts within a specified period.

A successful request will update the payout status to `Received` and initiate the fund transfer. The response will confirm the authorization status or provide relevant error details.


## OpenAPI

````yaml openapi/localpayment.json POST /api/payout/authorize
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/payout/authorize:
    post:
      summary: Authorize Payout
      operationId: authorize-payout
      parameters:
        - name: Authorization
          in: header
          description: >-
            Bearer access token for authentication. This token is obtained from
            the [Get Access Token](/reference/get-token) or [Refresh Access
            Token](/reference/refresh-token) endpoints.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              anyOf:
                - type: object
                  properties:
                    dateFrom:
                      type: string
                      description: Start day in `yyyy-mm-dd` format.
                    dateTo:
                      type: string
                      description: Final day in `yyyy-mm-dd` format.
                  required:
                    - dateFrom
                    - dateTo
                - type: object
                  properties:
                    externalId:
                      type: string
                      description: >-
                        A unique identifier generated by your system to track
                        the transaction (alphanumeric and hyphens). We recommend
                        using UUID4 to ensure uniqueness.
                  required:
                    - externalId
                - type: object
                  properties:
                    internalId:
                      type: string
                      description: Localpayment transaction identifier.
                  required:
                    - internalId
              x-examples:
                Example 1:
                  dateFrom: '2025-01-09'
                  dateTo: '2025-01-09'
            examples:
              Date:
                value:
                  dateFrom: '2025-01-09'
                  dateTo: '2025-01-09'
              externalID:
                description: Localpayment transaction identifier.
                value:
                  externalId: 1939b376-2aed-4c7a-bc2b-1157702f00b0
              internalId:
                description: >-
                  A unique identifier generated by your system to track the
                  transaction (alphanumeric and hyphens). We recommend using
                  UUID4 to ensure uniqueness.
                value:
                  internalID: 7d7f7fca-e411-4ba6-b46f-b9fed4d5f3d0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: "Status code.\r\n\r\n"
                  message:
                    type: string
                    description: Message with additional information.
                required:
                  - status
                  - message
                x-examples:
                  Example 1:
                    status: 200
                    message: The request will be processed.
              examples:
                The request will be processed:
                  value:
                    status: 200
                    message: The request will be processed.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Additional information of the response.
                  code:
                    type: string
                    description: Status code.
                  messages:
                    type: array
                    description: Message list.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Token class.
                        token_type:
                          type: string
                          description: Token type.
                        message:
                          type: string
                          description: Message with additional information.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                Example 1:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      errors:
                        type: object
                        description: Error information.
                        properties:
                          payOutBy:
                            type: array
                            items:
                              type: string
                          '[0].internalId':
                            type: array
                            items:
                              type: string
                      type:
                        type: string
                      title:
                        type: string
                        description: "Additional information of the response.\r\n\r\n"
                      status:
                        type: integer
                        description: Status code.
                      traceId:
                        type: string
                        description: Error trace identifier.
                    required:
                      - errors
                      - type
                      - title
                      - status
                      - traceId
                  - type: object
                    properties:
                      Status:
                        type: integer
                        description: Status code.
                      Message:
                        type: string
                        description: Message with additional information.
                      TraceId:
                        type: string
                        description: Trace identifier.
                    required:
                      - Status
                      - Message
                      - TraceId
                    x-examples:
                      Example 1:
                        Status: 404
                        Message: This transacion does not exists.
                        TraceId: d11cea70-7f14-4f11-b66e-13f5f56c2e56
                x-examples:
                  Example 1:
                    errors:
                      payOutBy:
                        - The payOutBy field is required.
                      '[0].internalId':
                        - >-
                          Error converting value
                          "7d7f7fca-e411-4ba6-b4f-b9fed4d5f3d2" to type
                          'System.Guid'. Path '[0].internalId', line 1, position
                          53.
                    type: https://tools.ietf.org/html/rfc7231#section-6.5.1
                    title: One or more validation errors occurred.
                    status: 400
                    traceId: 00-6af59d173e66ad4eb215987cd15d57af-bea3981476c0f347-00
              examples:
                The payOutBy field is required:
                  value:
                    errors:
                      payOutBy:
                        - The payOutBy field is required.
                      '[0].internalId':
                        - >-
                          Error converting value
                          "7d7f7fca-e411-4ba6-b4f-b9fed4d5f3d2" to type
                          'System.Guid'. Path '[0].internalId', line 1, position
                          53.
                    type: https://tools.ietf.org/html/rfc7231#section-6.5.1
                    title: One or more validation errors occurred.
                    status: 400
                    traceId: 00-6af59d173e66ad4eb215987cd15d57af-bea3981476c0f347-00
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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