Skip to content

Delete a beneficiary

DELETE
/api/global/beneficiaries/{uuid}
Code sample: cURL
curl -X DELETE "https://api.payhero.africa/api/global/beneficiaries/a2e0434e-17ae-41b1-a1cf-1694ad63ee99" \
-u "API_USERNAME:API_PASSWORD"

Permanently removes the beneficiary. To keep the record but stop it transacting, send {"is_active": false} to the update endpoint instead.

uuid
required
string format: uuid

The beneficiary’s uuid, as returned on create.

Example
a2e0434e-17ae-41b1-a1cf-1694ad63ee99

The beneficiary was deleted.

Media typeapplication/json
object
message
string
Example
{
"message": "beneficiary deleted successfully"
}

Missing or invalid Basic auth credentials.

Media typeapplication/json
object
error_code
string
error_message
string
status_code
integer
Example
{
"error_code": "invalid_argument",
"error_message": "the transaction amount is insufficient as it wont cater for cost: (4.62)",
"status_code": 400
}

No beneficiary with that UUID exists on the account behind your API key. A UUID that belongs to another merchant also returns 404 — never 403.

Media typeapplication/json
object
error_code
string
error_message
string
status_code
integer
Examples
ExampleUnknown uuid
{
"error_code": "not_found",
"error_message": "beneficiary \"a2e0434e-17ae-41b1-a1cf-1694ad63ee99\" does not exist",
"status_code": 404
}