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

# Approvals & Double Signature

Some payout transactions require additional authorization before they can be processed. This guide explains when authorization is needed and how to approve payouts through different methods.

## When Authorization Is Required

Additional authorization is required for payouts created under these conditions:

* **API payouts**: Created via API with `requireAuth` parameter set to `true`.
* **Business Portal payouts**: Created directly in the Localpayment Business Portal.

### Authorization Methods

The method for authorizing payouts depends on how they were originally created:

**Business Portal-Created Payouts**

For payouts created in the [Business Portal](https://docs.localpayment.com/docs/dashboard-review-payout.md), a second user with authorization permissions must authorize.

**API-Created Payouts**

For payouts created via API, use the [Authorize Payout](https://docs.localpayment.com/reference/authorize-payout.md) endpoint to programmatically approve transactions.

***

## Prerequisites

Before authorizing payouts, ensure you have:

* An **initialized payout transaction** with `PendingAuth` status
* Valid API credentials with authorization permissions
* The transaction identifier (`internalId` or `externalId`) or date range for bulk authorization

***

## Authorizing Payouts via API

### Endpoint

```http theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
POST https://api.stage.localpayment.com/api/payout/authorize
```

### Authentication

Include your access token in the request headers:

```http theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
Authorization: Bearer <your_access_token>
```

### Key Request Parameters

You can authorize payouts using one of three methods:

| Parameter | Type | Description | Required |
| - | - | - | - |
| `internalId` | string | Localpayment's unique transaction identifier | ✅ (Option 1) |
| `externalId` | string | Your system's unique transaction identifier | ✅ (Option 2) |
| `dateFrom` | string | Start date for bulk authorization (YYYY-MM-DD) | ✅ (Option 3) |
| `dateTo` | string | End date for bulk authorization (YYYY-MM-DD) | ✅ (Option 3) |

> [!NOTE]
>
> **Choose one authorization method**
>
> Use either a specific transaction ID (`internalId` or `externalId`) for single transactions, or date range (`dateFrom` and `dateTo`) for bulk authorization.

### Example Requests

> [tab] Single Transaction (External ID)
>
> ```curl theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> curl --request POST \
>      --url https://api.stage.localpayment.com/api/payout/authorize \
>      --header 'Authorization: Bearer <your_access_token>' \
>      --header 'Content-Type: application/json' \
>      --data '{
>        "externalId": "1939b376-2aed-4c7a-bc2b-1157702f00b0"
>      }'
> ```

> [tab] Single Transaction (Internal ID)
>
> ```curl theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> curl --request POST \
>      --url https://api.stage.localpayment.com/api/payout/authorize \
>      --header 'Authorization: Bearer <your_access_token>' \
>      --header 'Content-Type: application/json' \
>      --data '{
>        "internalId": "7d7f7fca-e411-4ba6-b4f5-b9fed4d5f3d2"
>      }'
> ```

> [tab] Bulk Authorization (Date Range)
>
> ```curl theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> curl --request POST \
>      --url https://api.stage.localpayment.com/api/payout/authorize \
>      --header 'Authorization: Bearer <your_access_token>' \
>      --header 'Content-Type: application/json' \
>      --data '{
>        "dateFrom": "2024-01-01",
>        "dateTo": "2024-01-31"
>      }'
> ```

***

## Response Handling

### Success Response

When authorization is successful, you'll receive:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "status": 200,
  "message": "The request will be processed."
}
```

#### Key Response Fields

| Field | Type | Description |
| - | - | - |
| `status` | integer | HTTP status code (200 for success) |
| `message` | string | Confirmation message indicating the request is being processed |

### Error Responses

#### Validation Errors

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "errors": {
    "externalId": [
      "The externalId field is required."
    ]
  },
  "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"
}
```

## Best Practices

* Always validate transaction details before authorization
* Use HTTPS for all API requests
* Store access tokens securely
* Implement proper error handling and logging

### Recommended Workflow

1. **Create Payout**: Generate payout with `requireAuth=true`
2. **Verify Status**: Confirm transaction status is `PendingAuth`
3. **Review Details**: Validate transaction information
4. **Authorize**: Call the authorization endpoint
5. **Handle Response**: Process success/error responses appropriately
6. **Monitor**: Track transaction status changes via webhooks

***

## Resources & Next Steps

Maximize your integration success with these essential resources

> [card] [Webhook Integration](https://docs.localpayment.com/docs/webhooks.md)
>
> Set up real-time notifications for transaction status updates.

> [card] [Reporting Business Portal](https://docs.localpayment.com/docs/balance-report.md)
>
> Access detailed analytics, reporting tools, and reconciliation features.

> [card] [Transaction Monitoring](https://docs.localpayment.com/reference/transaction-status-error-codes)
>
> Learn to query transaction status and implement comprehensive tracking.

> [card] [API Reference](https://docs.localpayment.com/reference/exchange-bulk.md)
>
> Complete endpoint documentation with interactive examples.

> [!NOTE]
>
> **Pro Tip**
>
> Always test your workflow in our sandbox environment before deploying to production. This ensures your error handling, webhook processing, and status tracking work correctly across all scenarios.

***

> [!NOTE]
>
> **Need Help?**
>
> Contact our [support team](mailto:support@localpayment.com) if you experience any issues or need assistance for integration.


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