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

# Payin

> Receive QR payments and review ACH deposit availability in v3.

The Payin module generates QR codes to receive payments in Bolivia. Authenticate with [POST /v3/auth/login](https://docs.mesadepagos.com/en/v3/auth.md) and send `Authorization: Bearer {accessToken}` with each request.

## Create a QR Deposit

```http theme={null}
POST /v3/transactions/deposit/qr
```

### Conditional fields by `fundingSource`

| Field | `balance` | `conversion` |
| - | - | - |
| `cryptoAmount` | Optional | Required |
| `fiatAmount` | Required | Optional |
| `depositAddress` | Optional | Required |
| `asset` | Optional, defaults to `USDC` | Optional, defaults to `USDC` |
| `blockchain` | Optional, defaults to `Polygon` | Optional, defaults to `Polygon` |

`fundingSource`, `referenceId` (1–100 characters), and `fiatCurrency: "BOB"` are always required. `country` defaults to `BO`. `description` accepts up to 60 characters. `qrExpirationTime` uses `HH:MM:SS` and defaults to `00:15:00`. Optional fields may be omitted; `null` is not accepted. With `conversion`, `depositAddress` must be non-empty and the fiat amount is calculated from the crypto amount, exchange rate, and fees.

### Request (`fundingSource: conversion`)

```json theme={null}
{
  "cryptoAmount": 10,
  "asset": "USDC",
  "blockchain": "Polygon",
  "fiatCurrency": "BOB",
  "referenceId": "ORDER-1001",
  "country": "BO",
  "depositAddress": "0x0000000000000000000000000000000000000000",
  "fundingSource": "conversion",
  "description": "Payment for order 1001",
  "qrExpirationTime": "00:15:00"
}
```

### Request (`fundingSource: balance`)

```json theme={null}
{
  "fiatAmount": 100,
  "fiatCurrency": "BOB",
  "referenceId": "ORDER-1002",
  "country": "BO",
  "fundingSource": "balance",
  "description": "Payment for order 1002",
  "qrExpirationTime": "00:15:00"
}
```

### Response

```json theme={null}
{
  "transactionId": "550e8400-e29b-41d4-a716-446655440000",
  "type": "deposit_express",
  "transactionStatus": "pending_transaction",
  "requestedCryptoAmount": "10",
  "calculatedFiatAmount": "69.60",
  "exchangeRate": "6.96",
  "feeAmount": "0.00",
  "asset": "USDC",
  "country": "BO",
  "countryName": "Bolivia",
  "qrCodeBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
  "referenceId": "ORDER-1001",
  "fiatCurrency": "BOB"
}
```

Display `qrCodeBase64` to the customer. Creating the QR returns HTTP `201`; payment confirmation arrives through a `transaction_updated` webhook. See [Webhooks](https://docs.mesadepagos.com/en/v3/webhooks.md) for the notification contract and [QR API reference](https://docs.mesadepagos.com/en/v3/api-reference/payin/crear-deposito-qr.md) for the complete schema.

## ACH Deposits

> [!NOTE]
>
> ACH deposits are currently restricted to the dashboard. This endpoint is not
> available for direct partner integrations.

```http theme={null}
POST /v3/transactions/deposit/ach
```

This flow generates a crypto address and amount to fund the business merchant account in BOB. `amount` is the BOB amount to receive. `externalReference` must be unique (1–100 characters), and `blockchain` must be `Ethereum` or `Polygon`.

```json theme={null}
{
  "assetDeposit": "USDC",
  "blockchain": "Polygon",
  "amount": 696,
  "externalReference": "DEPOSIT-1001"
}
```

### Response: HTTP 201

```json theme={null}
{
  "transactionId": "550e8400-e29b-41d4-a716-446655440000",
  "transactionStatus": "pending_transaction",
  "externalReference": "DEPOSIT-1001",
  "cryptoAmount": "100.00000000",
  "fiatAmount": "696.00",
  "fiatCurrency": "BOB",
  "depositAddress": "0x0000000000000000000000000000000000000000",
  "exchangeRate": "6.96000000",
  "asset": "USDC",
  "blockchain": "Polygon"
}
```

After the full crypto amount is confirmed, the ACH transfer is requested. Amounts in the response are decimal strings, and status changes are notified through `transaction_updated`. An existing external reference returns HTTP `409`.

## Errors

QR requests return HTTP `400` for validation errors, `401` for authentication failures, `404` when the provider cannot find the transaction, `422` for a permanent rejection, `500` for an internal error, and `503` when the provider is unavailable. Review the API reference for response bodies.


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