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

# Send funds via Wallet

Send funds via Wallet using Localpayment's API. This guide covers everything you need to know about creating payouts, handling responses, managing transaction status, and meeting country-specific requirements.

Wallet payouts allow you to send funds directly to the beneficiary's digital wallet. You can initiate these transfers through either:

* **Localpayment Business Portal**: User-friendly interface for [manual transaction management.](https://docs.localpayment.com/docs/internal-transfers)
* **API Integration**: Programmatic access for automated payout processing.

This guide focuses on API implementation, covering the complete flow from initialization to completion.

## Before You Begin

Ensure you have:

* Valid [API credentials ](https://docs.localpayment.com/docs/api-keys-and-environments.md)(access token).
* Complete beneficiary information.
* Proper account [setup](https://docs.localpayment.com/docs/setup-guide.md) for your target country.
* Understanding of country-specific requirements (see [Country Requirements](#country-specific-requirements) below).

***

## Step 1: Initialize the Payout Transaction

To create a bank transfer payout, send a `POST` request to the **[Create a Payout](https://docs.localpayment.com/reference/create-a-payout.md)** endpoint with `paymentMethod.type` set `Wallet`.

### Endpoint

```
POST https://api.stage.localpayment.com/api/payout/
```

### Required Headers

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

### Key Request Parameters

The request requires several key objects:

| Object | Description | Required |
| - | - | - |
| `beneficiary` | Recipient details including bank information | ✅ |
| `sender` | Sender information for compliance | ✅ |
| `merchant` | Merchant/business details | ✅ |
| `paymentMethod` | Payment method configuration | ✅ |
| `amount` | Transaction amount | ✅ |
| `currency` | Transaction currency code | ✅ |
| `country` | Target country code | ✅ |

### Example Request (Bolivia)

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
curl --request POST \
     --url https://api.stage.localpayment.com/api/payout/ \
     --header 'Authorization: Bearer <your_access_token>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "value": {
    "externalId": "07e80cf6-b11b-479c-ad9a-b952ec256cdb",
    "country": "BOL",
    "currency": "BOB",
    "amount": 1000,
    "paymentMethod": {
      "type": "Wallet",
      "code": "0021",
      "flow": "direct"
    },
    "beneficiary": {
      "name": "John",
      "lastName": "Doe",
      "type": "INDIVIDUAL",
      "document": {
        "type": "CI",
        "id": "7794986"
      },
      "bank": {
        "name": "Yape",
        "code": "990",
        "account": {
          "alias": "+59112345678"
        }
      }
    },
    "sender": {
      "type": "INDIVIDUAL",
      "name": "David",
      "lastName": "Doe",
      "document": {
        "type": "CI",
        "id": "4812012-1B"
      }
    },
    "merchant": {
      "type": "COMPANY",
      "name": "Company Name"
    },
    "accountNumber": "{{accountNumber}}",
    "conceptCode": "0039"
  }
}
'
```

***

## Step 2: Handle the Response

### Successful Response

A successful response includes detailed transaction information and tracking identifiers:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "externalId": "07e80cf6-b11b-479c-ad9a-b952ec256cdb3",
  "internalId": "9cbdb959-acb0-49e5-a52a-a8f9dddcde15",
  "paymentMethod": {
    "code": "0021",
    "name": "BCP",
    "description": "Yape",
    "paymentMethodType": "Wallet"
  },
  "country": "BOL",
  "currency": "BOB",
  "amount": 1000,
  "accountNumber": "{{accountNumber}}",
  "clientCode": "0001",
  "clientName": "Acme",
  "status": {
    "code": "100",
    "description": "Received",
    "detail": "The payout was received"
  },
  "beneficiary": {
    "bank": {
      "name": "Yape",
      "code": "990",
      "countryISOCode3": null,
      "branch": null,
      "account": {
        "number": null,
        "type": null,
        "alias": "+59112345678",
        "pixKey": null,
        "phone": null
      }
    },
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "CI",
      "id": "7794986"
    },
    "userReference": null,
    "email": null,
    "phone": null,
    "birthdate": "0001-01-01T00:00:00Z",
    "nationality": null,
    "address": null
  },
  "merchant": {
    "type": "COMPANY",
    "name": "Company Name",
    "lastname": null,
    "document": null,
    "userReference": null,
    "email": null,
    "phone": null,
    "birthdate": "0001-01-01T00:00:00Z",
    "nationality": null,
    "address": null
  },
  "sender": {
    "type": "INDIVIDUAL",
    "name": "David",
    "lastname": "Doe",
    "document": {
      "type": "CI",
      "id": "4812012-1B"
    },
    "userReference": null,
    "email": null,
    "phone": null,
    "birthdate": "0001-01-01T00:00:00Z",
    "nationality": null,
    "address": null
  },
  "comment": null,
  "exchangeRateToken": null,
  "date": {
    "creationDate": "2025-10-10T22:03:25.5138845Z",
    "processedDate": "2025-10-10T22:03:25.5140817Z"
  },
  "errors": null,
  "internalLoteID": "151880"
}
```

### Key Response Fields

| Field | Description | Use Case |
| - | - | - |
| `internalId` | Localpayment's unique transaction identifier | Transaction tracking and support |
| `externalId` | Your reference number | Internal reconciliation |
| `status.code` | Current transaction status code | Status monitoring |
| `date.creationDate` | When transaction was created | Audit trail |
| `date.processedDate` | When transaction began processing | Processing time calculation |

### Error Response

When a request fails, you'll receive detailed error information:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
[
  {
    "externalId": "1736488884",
    "internalId": "cd052d8c-8406-45f8-98aa-aff9876c3285",
    "status": {
      "code": "801",
      "description": "Rejected",
      "detail": "Params error"
    },
    "errors": [
      {
        "code": "300",
        "description": "Invalid param + [paymentMethod.code] + doesn't exist for PAYMENT_METHOD_TYPE BankTransf"
      },
      {
        "code": "300",
        "description": "Invalid param + [beneficiary.document.id] + doesn´t match regex ^(20|23|24|25|26|27|30|33|34)-?\\d{2}[.]?\\d{3}[.]?\\d{3}-?\\d$"
      }
    ],
    "comment": "Addicional informetion"
  }
]
```

***

## Step 3: Track Transaction Status

After submitting a payout, monitor its progress through these methods:

> [card] [Webhooks (Recommended)](https://docs.localpayment.com/docs/webhooks.md)
>
> Receive real-time notifications when transaction status changes. Most efficient for production environments.

> [card] [Status API Endpoint](https://docs.localpayment.com/reference/get-transaction-status.md)
>
> Query transaction status programmatically. Useful for polling or recovering lost webhook notifications.

> [card] [Business Portal View](https://docs.localpayment.com/docs/dashboard-overview.md)
>
> Visual interface for monitoring transactions. Great for manual oversight and detailed transaction analysis.

### Common Status Codes

| Code | Status | Description |
| :- | :- | :- |
| `100` | `Received` | The payout was received. |
| `101` | `Locked` | The payout has been confirmed and passed AML validations. |
| `102` | In Progress | The payout has been sent to the bank. |
| `104` | `PendingAuth` | The payout is pending of authorization by client. |
| `200` | `Completed` | The payout was debited. |
| `300` | `Rejected` | Invalid param + \[param name] + \[reason]. |

> [!NOTE]
>
> **Complete Reference**
>
> View all status codes in our [Transaction Status Documentation](https://docs.localpayment.com/reference/transaction-status-error-codes).

***

## Step 4: Transaction Approval

For enhanced security, certain transactions require [two-person approval](https://docs.localpayment.com/docs/approvals-and-double-signature.md):

1. **Initiator**: Submits the payout request.
2. **Approver**: Reviews and confirms the transaction.

This process can be managed through the [Business Portal](https://docs.localpayment.com/docs/dashboard-review-payout.md) or [API endpoints](https://docs.localpayment.com/reference/authorize-payout.md).

> [!NOTE]
>
> **Security Note**
>
> Approval requirements help prevent unauthorized transactions and ensure compliance with local regulations.

***

## Country-Specific Requirements

Implementation details vary by country. Any country not explicitly mentioned adheres to the standard procedure without special requirements. Review these requirements before integration:

> [tab] Bolivia
>
> **YAPE Payments:**
>
> * `paymentMethod.code`: Set to 0021.
> * `beneficiary.bank.code`: Set to 990.
> * `beneficiary.bank.account.alias`: Must contain the beneficiary’s phone number in the format +591XXXXXXXX (full international format).
> * Omit the following fields: `beneficiary.bank.account.type` and `beneficiary.bank.account.number`.

> [tab] Peru
>
> **Special Requirements:**
>
> * `paymentMethod.code`: Set to 0171.
> * `beneficiary.bank.account.alias`: Set to a 9-digit mobile number starting with 9 (e.g., 987654321).
> * Omit the following fields: `beneficiary.bank.account.type` and `beneficiary.bank.account.number`.
> * `beneficiary.bank.code`:
>   * YAPE: Set to 901.
>   * PLIN: Set to 902.
>   * LIGO: Set to 921.
>   * DALE: Set to 922.

> [tab] Costa Rica
>
> **SINPE Móvil Payments:**
>
> * `paymentMethod.code`: Set to 0071.
> * `beneficiary.bank.account.alias`: Set to the beneficiary's phone number in the format +506XXXXXXXX (full international format).
> * `beneficiary.bank.name` and `beneficiary.bank.code`: Set to the name and code of the beneficiary's bank (the bank the phone number is registered to), from the [Bank Codes table](https://docs.localpayment.com/docs/costa-rica.md#bank-codes).
> * Omit the following fields: `beneficiary.bank.account.type` and `beneficiary.bank.account.number`.
>
> Available 24/7, including weekends and public holidays.

***

## Testing Your Integration

### Sandbox Environment

Use the staging environment for testing:

```
https://api.stage.localpayment.com/api/payout/
```

### Test Scenarios

Verify your integration handles these scenarios:

1. **Successful Transaction**: Standard payout flow
2. **Validation Errors**: Invalid bank account, missing fields
3. **Processing Delays**: Transactions that take time to process
4. **Failed Transactions**: Insufficient funds, blocked beneficiaries
5. **Status Updates**: Webhook handling and status polling

***

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