<!-- ZenPays documentation · https://docs.zenpayz.com/docs/rest-api/endpoints/payout-intents/confirm-payout-intent -->

# Confirm Payout Intent

Submit the required fields to confirm and execute a payout intent.

<EndpointHeader verb="POST" path="/payment/api/v1/payout-intents/{intentId}/confirm" />

## Request

### Path Parameters

<ParamTable
  rows={[
    { name: "intentId", type: "string", required: true, desc: "Payout intent ID" },
  ]}
/>

### Headers

<ParamTable
  label="Header"
  rows={[
    { name: "Authorization", required: true, desc: "`Bearer {api_key}`" },
    { name: "X-Signature", required: true, desc: "HMAC-SHA256 signature" },
    { name: "X-Timestamp", required: true, desc: "ISO 8601 timestamp" },
    { name: "X-Secret-Salt", required: true, desc: "Secret salt for HMAC validation" },
    { name: "Content-Type", required: true, desc: "`application/json`" },
  ]}
/>

### Body Parameters

The body should contain the fields listed in the `requiredFields` array from the [create intent](/docs/rest-api/endpoints/payout-intents/create-payout-intent) response. **Always check `requiredFields`** — the exact fields vary by currency, country, and the TSP selected by smart routing.

:::tip Always use `requiredFields`
When you create a payout intent, the response includes a `requiredFields` array that tells you exactly which fields are needed to confirm. Some fields may be required for one currency but optional for another. Never hardcode assumptions — always read `requiredFields` from the create response.
:::

#### Fiat Payout Fields

<ParamTable
  rows={[
    { name: "beneficiaryAccount", type: "string", desc: "Bank account number (5-34 characters)" },
    { name: "beneficiaryEmail", type: "string", desc: "Beneficiary email address" },
    { name: "beneficiaryBankCode", type: "string", desc: "Bank code in Sulifu format (e.g. `dp_axisbank_in`, `dp_hdfcbank_in`, `dp_sboi_in`)" },
    { name: "beneficiaryIfsc", type: "string", desc: "IFSC code for Indian banks (e.g. `HDFC0001234`)" },
    { name: "beneficiaryName", type: "string", desc: "Full name of the beneficiary" },
    { name: "beneficiaryMobile", type: "string", desc: "Beneficiary phone number with country code" },
    { name: "beneficiaryAddress", type: "string", desc: "Street address" },
    { name: "beneficiaryCity", type: "string", desc: "City" },
    { name: "beneficiaryState", type: "string", desc: "State or province" },
    { name: "beneficiaryPostalCode", type: "string", desc: "Postal/ZIP code" },
    { name: "beneficiaryAccountType", type: "string", desc: "Account type: `CHECKING` or `SAVINGS`" },
    { name: "beneficiaryDocumentId", type: "string", desc: "Government-issued document ID (required in some regions)" },
  ]}
/>

#### Crypto Payout Fields

<ParamTable
  rows={[
    { name: "chain", type: "string", desc: "Blockchain network: `tron`, `ethereum`, `bitcoin`, `solana`, etc." },
    { name: "walletAddress", type: "string", desc: "Destination wallet address" },
    { name: "walletMemo", type: "string", desc: "Memo or destination tag (for XRP, XLM, etc.)" },
  ]}
/>

#### Common Optional Fields

<ParamTable
  rows={[
    { name: "customerId", type: "string", desc: "Customer ID for tracking" },
    { name: "customerEmail", type: "string", desc: "Customer email" },
    { name: "customerPhone", type: "string", desc: "Customer phone number" },
  ]}
/>

### Example: INR Bank Transfer

For INR payouts, the following fields are typically required:

```json
{
  "beneficiaryAccount": "1234567890",
  "beneficiaryEmail": "rajesh@example.com",
  "beneficiaryBankCode": "dp_axisbank_in",
  "beneficiaryAddress": "123 Main Street",
  "beneficiaryCity": "Mumbai",
  "beneficiaryState": "Maharashtra",
  "beneficiaryPostalCode": "400001",
  "beneficiaryName": "Rajesh Kumar",
  "beneficiaryMobile": "+919876543210",
  "beneficiaryIfsc": "HDFC0001234"
}
```

### Example: Crypto (USDT) Payout

```json
{
  "chain": "tron",
  "walletAddress": "TXyz123abc456def789ghi"
}
```

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "intentId": "poi_mnblh1o5_e8190e32",
    "status": "processing",
    "payoutId": "payout_1774778823937_17298d89",
    "externalPayoutId": "po6efbc8502da51774842226226",
    "amount": "100.00000000",
    "currency": "INR",
    "processingFee": "0.00000000",
    "totalDebitedAmount": "100.00000000",
    "confirmedAt": "2026-03-29T10:07:05.144Z"
  },
  "message": "Payout intent confirmed",
  "error": null,
  "meta": {
    "request_id": "req_xxxxx",
    "timestamp": "2026-03-29T10:07:05.148Z",
    "processing_time_ms": 1515,
    "api_version": "v1",
    "endpoint": "POST /payout-intents/{intentId}/confirm",
    "user_type": "merchant"
  }
}
```

### Response Fields

<ParamTable
  rows={[
    { name: "intentId", type: "string", desc: "The payout intent ID" },
    { name: "status", type: "string", desc: "Intent status (`processing`)" },
    { name: "payoutId", type: "string", desc: "Internal payout ID for tracking" },
    { name: "externalPayoutId", type: "string", desc: "TSP transaction ID — use this to match with webhook callbacks" },
    { name: "amount", type: "string", desc: "Payout amount" },
    { name: "currency", type: "string", desc: "Payout currency" },
    { name: "processingFee", type: "string", desc: "Processing fee charged" },
    { name: "totalDebitedAmount", type: "string", desc: "Total amount debited from wallet (amount + fee)" },
    { name: "confirmedAt", type: "string", desc: "ISO 8601 timestamp of confirmation" },
  ]}
/>

:::tip Linking confirm response to webhooks
The `externalPayoutId` in the confirm response matches the `transactionId` in webhook callbacks. Use this to link the payout intent confirmation to the webhook status updates:
- **Confirm response**: `intentId` + `payoutId` + `externalPayoutId`
- **Webhook callback**: `intentId` + `payoutId` + `transactionId` (same as `externalPayoutId`)
:::

### Error Responses

<ErrorTable
  rows={[
    { code: "PAYOUT_INTENT_CONFIRM_FAILED", status: "400", message: "Missing required fields, expired intent, or insufficient wallet balance" },
    { code: "VALIDATION_ERROR", status: "400", message: "Invalid field values (e.g. unsupported bank code)" },
    { code: "NOT_FOUND", status: "404", message: "Intent not found or does not belong to this merchant" },
  ]}
/>

:::note Common Errors
- **"Required bank_code in extra field"** — You're missing `beneficiaryBankCode` in your confirmation payload. Check `requiredFields` from the create response.
- **"Beneficiary address fields required"** — For non-USDT payouts, address fields (`beneficiaryAddress`, `beneficiaryCity`, `beneficiaryState`, `beneficiaryPostalCode`) are mandatory.
- **"Unsupported bank code"** — Use the ZenPays bank code format: `dp_{bankname}_in` (e.g. `dp_hdfcbank_in`, `dp_axisbank_in`, `dp_sboi_in`). The available codes are listed in the `options` array of the `beneficiaryBankCode` field in `requiredFields`.
:::

<CodeRail>

## Examples

<Tabs groupId="language">
  <TabItem value="curl" label="cURL" default>

```bash
curl -X POST "https://api.zenpayz.com/payment/api/v1/payout-intents/poi_mnblh1o5_e8190e32/confirm" \
  -H "Authorization: Bearer zp_test_xxxxx" \
  -H "X-Timestamp: 2026-03-29T10:07:00.000Z" \
  -H "X-Signature: a1b2c3d4e5f6..." \
  -H "X-Secret-Salt: your_secret_salt" \
  -H "Content-Type: application/json" \
  -d '{
    "beneficiaryAccount": "1234567890",
    "beneficiaryEmail": "rajesh@example.com",
    "beneficiaryBankCode": "dp_axisbank_in",
    "beneficiaryAddress": "123 Main Street",
    "beneficiaryCity": "Mumbai",
    "beneficiaryState": "Maharashtra",
    "beneficiaryPostalCode": "400001",
    "beneficiaryName": "Rajesh Kumar",
    "beneficiaryMobile": "+919876543210",
    "beneficiaryIfsc": "HDFC0001234"
  }'
```

  </TabItem>
  <TabItem value="javascript" label="JavaScript">

```javascript
const response = await fetch(
  'https://api.zenpayz.com/payment/api/v1/payout-intents/poi_mnblh1o5_e8190e32/confirm',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'X-Timestamp': timestamp,
      'X-Signature': signature,
      'X-Secret-Salt': secretSalt,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      beneficiaryAccount: '1234567890',
      beneficiaryEmail: 'rajesh@example.com',
      beneficiaryBankCode: 'dp_axisbank_in',
      beneficiaryAddress: '123 Main Street',
      beneficiaryCity: 'Mumbai',
      beneficiaryState: 'Maharashtra',
      beneficiaryPostalCode: '400001',
      beneficiaryName: 'Rajesh Kumar',
      beneficiaryMobile: '+919876543210',
      beneficiaryIfsc: 'HDFC0001234',
    }),
  }
);

const result = await response.json();
console.log(result.data.payoutId); // 'payout_xxxxx'
console.log(result.data.status);   // 'processing'
```

  </TabItem>
  <TabItem value="sdk" label="SDK">

```javascript
const result = await zenpays.payouts.confirmPayoutIntent('poi_mnblh1o5_e8190e32', {
  beneficiaryAccount: '1234567890',
  beneficiaryEmail: 'rajesh@example.com',
  beneficiaryBankCode: 'dp_axisbank_in',
  beneficiaryAddress: '123 Main Street',
  beneficiaryCity: 'Mumbai',
  beneficiaryState: 'Maharashtra',
  beneficiaryPostalCode: '400001',
  beneficiaryName: 'Rajesh Kumar',
  beneficiaryMobile: '+919876543210',
  beneficiaryIfsc: 'HDFC0001234',
});

console.log(result.payoutId); // 'payout_xxxxx'
console.log(result.status);   // 'processing'
```

  </TabItem>
</Tabs>

</CodeRail>

## Related Endpoints

- [Create Payout Intent](/docs/rest-api/endpoints/payout-intents/create-payout-intent)
- [Get Payout Intent](/docs/rest-api/endpoints/payout-intents/get-payout-intent)
- [List Payout Intents](/docs/rest-api/endpoints/payout-intents/list-payout-intents)
- [Cancel Payout Intent](/docs/rest-api/endpoints/payout-intents/cancel-payout-intent)
