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

# Crypto Payout

> Send payouts from an internal wallet to an external wallet.

The Crypto Payout module sends funds from a wallet created in ON RAMP to an external wallet provided by the partner.

## Endpoint

```http theme={null}
POST /v2/transactions/payouts/crypto
```

### Headers

| Header          | Required | Description                  |
| --------------- | -------- | ---------------------------- |
| `Authorization` | Yes      | `Bearer <token>` JWT session |
| `Content-Type`  | Yes      | `application/json`           |

## Create a Crypto Payout

Use this endpoint to request a crypto payout from an internal wallet to a destination address.

### Request

```json theme={null}
{
  "walletId": "550e8400-e29b-41d4-a716-446655440000",
  "destinationWallet": "0x0000000000000000000000000000000000000000",
  "amount": "100",
  "asset": "USDC",
  "blockchain": "Polygon",
  "externalReference": "9dd9614e-5059-4cb5-826c-ef092fd99cb9"
}
```

### Fields

| Field               | Type   | Required | Description                                                 |
| ------------------- | ------ | -------- | ----------------------------------------------------------- |
| `walletId`          | string | Yes      | Identifier of the internal wallet funding the payout.       |
| `destinationWallet` | string | Yes      | Address of the external wallet receiving the payout.        |
| `amount`            | string | Yes      | Crypto amount to send.                                      |
| `asset`             | string | Yes      | Asset to send, such as `USDC` or `USDT`.                    |
| `blockchain`        | string | Yes      | Asset blockchain, such as `Polygon`, `Ethereum`, or `TRON`. |
| `externalReference` | string | Yes      | Unique partner reference used for reconciliation.           |

### Test in Sandbox

Use these parameters as a starting point for a sandbox test:

| Parameter           | Test value                                   | Notes                                     |
| ------------------- | -------------------------------------------- | ----------------------------------------- |
| `baseUrl`           | `https://sandbox-rampa.mesadepagos.com/api`  | Sandbox base URL.                         |
| `token`             | `<TOKEN>`                                    | Replace with the JWT obtained at login.   |
| `walletId`          | `550e8400-e29b-41d4-a716-446655440000`       | Replace with an actual tenant wallet.     |
| `destinationWallet` | `0x0000000000000000000000000000000000000000` | External destination wallet.              |
| `amount`            | `100`                                        | Crypto amount to send.                    |
| `asset`             | `USDC`                                       | `USDT` is also supported.                 |
| `blockchain`        | `Polygon`                                    | `Ethereum` and `TRON` are also supported. |
| `externalReference` | `9dd9614e-5059-4cb5-826c-ef092fd99cb9`       | Must be unique per operation.             |

```bash theme={null}
curl --request POST 'https://sandbox-rampa.mesadepagos.com/api/v2/transactions/payouts/crypto' \
  --header 'Authorization: Bearer <TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{
    "walletId": "550e8400-e29b-41d4-a716-446655440000",
    "destinationWallet": "0x0000000000000000000000000000000000000000",
    "amount": "100",
    "asset": "USDC",
    "blockchain": "Polygon",
    "externalReference": "9dd9614e-5059-4cb5-826c-ef092fd99cb9"
  }'
```

### Response

```json theme={null}
{
  "transactionId": "550e8400-e29b-41d4-a716-446655440001",
  "walletId": "550e8400-e29b-41d4-a716-446655440000",
  "destinationWallet": "0x0000000000000000000000000000000000000000",
  "amount": "100",
  "asset": "USDC",
  "blockchain": "Polygon",
  "externalReference": "9dd9614e-5059-4cb5-826c-ef092fd99cb9",
  "status": "pending_transaction",
  "message": "Payout crypto created"
}
```

## Considerations

* `walletId` must belong to an existing wallet of the authenticated partner.
* `destinationWallet` must use the same `blockchain` sent in the request.
* `externalReference` must be unique per operation to support reconciliation and idempotency.
