# Get payout status

Returns the current state of a withdrawal owned by the authenticated merchant.

## Request fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `transaction_id` | String | Yes | Merchant withdrawal transaction ID |

## cURL example

```bash
curl -X POST https://api.niripay.com/api/v1/merchant/withdrawals/status \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transaction_id":"WD-2026-001"}'
```

## JavaScript example

```js
const withdrawalStatus = await niripayJson("/api/v1/merchant/withdrawals/status", {
  transaction_id: "WD-2026-001"
});
```

## Success response

```json
{
  "status": "success",
  "data": {
    "transaction_id": "WD-2026-001",
    "amount": 5000,
    "status": "success",
    "proof": "UTR1234567890123456",
    "fees": {
      "percentage": 3,
      "fixed_amount": 2,
      "total_amount": 152.0,
      "total_debit_amount": 5152.0
    }
  }
}
```

All successful status responses include `fees` (an object or null). Other response fields depend on the withdrawal state:

- `pending`: includes `transaction_id`, `amount`, and `status`.
- `success`: also includes `proof`, which contains the bank UTR.
- `failed`: the amount is reversed and credited back to the merchant wallet.
