---
title: "Update a recipient in a batch"
method: PATCH
path: "/api/v1/payment-batch/{batchId}/recipients/{recipientId}"
tags: ["Payment Batches"]
---

# Update a recipient in a batch

`PATCH /api/v1/payment-batch/{batchId}/recipients/{recipientId}`

## Request

- Base URL: `https://sandbox.api.afriex.com`
- URL: `https://sandbox.api.afriex.com/api/v1/payment-batch/{batchId}/recipients/{recipientId}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/afriex/apis/afriex-business-api/docs/api/v1/payment-batch/:batchId/recipients/:recipientId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Replaces the recipient's account details and amount. Pass `paymentMethodId` to update that saved account in place. A `recipientId` that is not in this batch is refused with `400`, not `404`. Requires the `PAYMENT_BATCH.UPDATE` key permission.

## Request body

- PaymentBatchRecipientRequest: The account to pay, in the same shape POST /api/v1/payment-method accepts, plus the amount to pay it in this batch. `accountName`, `accountNumber` and `institution` are required for most channels: `institution` is not used for `UPI` and `INTERAC`, and `accountName` and `accountNumber` are not used for `VIRTUAL_BANK_ACCOUNT`. `paymentMethodId` updates an existing saved account of this business in place instead of creating one.
  - `paymentMethodId` string: Id of a saved account of this business to update with these details. An id that is not one of this business's accounts is refused with `400`.
  - `channel` 'BANK_ACCOUNT' | 'MOBILE_MONEY' | 'VIRTUAL_BANK_ACCOUNT' | 'ACH_BANK_ACCOUNT' | 'INTERAC' | 'UPI' | 'SWIFT' | 'WE_CHAT', required
  - `accountName` string: Not used for `VIRTUAL_BANK_ACCOUNT`.
  - `accountNumber` string: Not used for `VIRTUAL_BANK_ACCOUNT`.
  - `countryCode` string, required
  - `institution` object: As on POST /api/v1/payment-method. Not used for `UPI` and `INTERAC`.
  - `amount` object, required
    - `value` string, required
    - `currencyCode` string, required

## Response `200`

The saved account. The full recipient shape comes from the recipient list.

- object
  - `data` PaymentBatchRecipientSaved: What creating or updating a recipient returns: the saved account only. The full recipient shape, with the amount and `recipientId`, comes from the recipient list.
    - `id` string: The saved account's id (the `paymentMethodId` in the list).
    - `channel` string
    - `countryCode` string

## Other responses

- `400`: The request is invalid, the `batchId` in the path is not a valid id (`INVALID_BUSINESS_PAYMENT_BATCH_REQUEST`), or it came from an IP outside the business's whitelist, carried a bad payload signature or named an unsupported `x-api-version`.
- `401`: Missing or invalid API key, or a key without the permission this endpoint requires.
- `404`: No batch with this id belongs to the calling business.
- `500`: Server error.
- `503`: Temporarily unavailable: an upstream service failed or timed out, or the API is momentarily offline. Retry with backoff and honour the Retry-After header when present.

---

[API](https://skmtc.dev/afriex/apis/afriex-business-api.md) - [All operations](https://skmtc.dev/afriex/apis/afriex-business-api/llms.txt) - [OpenAPI document](https://skmtc.dev/afriex/apis/afriex-business-api/revisions/d94198b6c256?raw)
