# Confirm a Batch

**POST** `/batches/{batchId}/confirm`

Base URL: `https://api.uat.triple-a.io/api/fiat-payout/v1`

This endpoint will confirm the batch and send all Transfers to providers.

## Authorization

- oauth2 (http, bearer)

## Path parameters

- `batchId` (string, required)

## Body

Content type: `application/json`

- `payment_method` ("crypto_page" | "prefunding" | "crypto_address" | "payment_initiation" | "bank_transfer" | "card" | "customer_account")
  The method to use to pay the transfer. If `payment_method` was specified when creating the transfer (quote time), the same value must be provided here — otherwise the request will be rejected with `invalid.payment_method`.
- `success_url` (string)
  Webpage to redirect the customer to on successful payment. We inject some information into the URL as URL parameters.
- `cancel_url` (string)
  Webpage to redirect the customer to on cancelled payment. We inject some information into the URL as URL parameters.
- `amount_to_pay` (number)
  the amount to pay in the sending currency of the transfer
- `cryptocurrency` ("BTC" | "ETH" | "USDT" | "testBTC" | "USDT_TRC20" | "USDT_POLY" | "USDT_SOL" | "sats" | "USDC" | "USDC_POLY" | "USDC_ARB" | "USDC_SOL" | "PYUSD" | "PYUSD_SOL")
  the cryptocurrency used to pay
- `card_id` (string<uuid>)

Example:

```json
{
  "payment_method": "crypto_page",
  "success_url": "string",
  "cancel_url": "string",
  "amount_to_pay": 100,
  "cryptocurrency": "BTC",
  "card_id": "00000000-0000-0000-0000-000000000000"
}
```

## Responses

### 200

The Batch has been confirmed by the Merchant.

- `id` (string<uuid>)
  Batch Identifier
- `external_id` (string)
  Batch Reference provided by API caller
- `status` ("created" | "processing" | "rejected" | "waiting_confirmation" | "confirmed" | "expired" | "partial_submitted" | "submitted" | "partial_completed" | "completed")
  Batch Status
- `reason` (object[])
  - `csvLine` (number)
    CSV line number for the Batch error
  - `message` (object[])
    The error message
    - `message` (string)
    - `errors` (object[])
      - `errorCode` (string)
      - `message` (string)
- `payment` (object)
  Payment
  - `id` (string<uuid>)
    Payment Identifier
  - `status` (string)
    Payment status
  - `reason` (string<uuid>)
    Failed/Declined Reason
  - `url` (string)
    CDN of payment page
  - `crypto_address` (string)
    Cryptocurrency token address
  - `crypto_currency` (string)
    Cryptocurrency value
  - `crypto_network` (string)
    The blockchain to use to pay
  - `expires_at` (string<date-time>)
    The expiration of the address
  - `card_issuer_country` (string)
    The issuer country of card if payment is made via card
  - `reference_number` (string)
    Payment reference number
  - `iban` (string)
    IBAN
- `total_transfers` (number)
  Total number of transfers in the batch
- `total_sending_amount` (object[])
  - `currency` (string<iso-4217>)
    The currency
  - `amount` (number<double>)
    The total amount for the currency
- `total_receiving_amount` (object[])
  - `currency` (string<iso-4217>)
    The currency
  - `amount` (number<double>)
    The total amount for the currency
- `total_fees` (object[])
  - `currency` (string<iso-4217>)
    The currency
  - `amount` (number<double>)
    The total amount for the currency
- `expires_at` (string<date-time>)
  Creation Timestamp
- `created_at` (string<date-time>)
  Creation Timestamp
- `updated_at` (string<date-time>)
  Update Timestamp

Example:

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "external_id": "string",
  "status": "created",
  "reason": [
    {
      "csvLine": 0,
      "message": [
        {
          "message": "string",
          "errors": [
            {
              "errorCode": null,
              "message": null
            }
          ]
        }
      ]
    }
  ],
  "payment": {
    "id": "00000000-0000-0000-0000-000000000000",
    "status": "string",
    "reason": "00000000-0000-0000-0000-000000000000",
    "url": "string",
    "crypto_address": "string",
    "crypto_currency": "string",
    "crypto_network": "string",
    "expires_at": "1970-01-01T00:00:00.000Z",
    "card_issuer_country": "USA",
    "reference_number": "MFB-870989-FPP",
    "iban": "FR7630006000011234567890189"
  },
  "total_transfers": 0,
  "total_sending_amount": [
    {
      "currency": "string",
      "amount": 0.001
    }
  ],
  "total_receiving_amount": [
    {
      "currency": "string",
      "amount": 0.001
    }
  ],
  "total_fees": [
    {
      "currency": "string",
      "amount": 0.001
    }
  ],
  "expires_at": "1970-01-01T00:00:00.000Z",
  "created_at": "1970-01-01T00:00:00.000Z",
  "updated_at": "1970-01-01T00:00:00.000Z"
}
```

### 400

Error defines errors may be returned from the system.

- `message` (string)
- `errors` (object[])
  - `errorCode` (string)
  - `message` (string)

Example:

```json
{
  "message": "string",
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ]
}
```

### 409

Error defines errors may be returned from the system.

- `message` (string)
- `errors` (object[])
  - `errorCode` (string)
  - `message` (string)

Example:

```json
{
  "message": "string",
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ]
}
```