> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mangopay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server.

# API - Apr 14, 2025

Added

## Endpoints to close user accounts

Platforms can close Mangopay Accounts thanks to the two new endpoints:

* [DELETE Close a Natural User](/api-reference/users/close-natural-user)
* [DELETE Close a Legal User](/api-reference/users/close-legal-user)

This endpoint allows your platform to close a Mangopay Account, as per Mangopay's [terms and conditions](https://mangopay.com/terms-and-conditions), in the event that the agreement between the user and the platform comes to an end.

Closing a user is irreversible and immediate, and can only be done if all their wallets are empty.

Once a user is closed, they are unable to take actions or use Mangopay services.

Prevented actions return the following 400 response if `UserStatus` is `CLOSED`:

**`400`**

```json 400 
{
    "Message": "User closed: No action can be performed",
    "Type": "user_closed",
    "Id": "553d1f4a-8df9-4a5f-ab76-66ea235b5e85#1744650845",
    "Date": 1744650846,
    "errors": null
}
```

Two new `ResultCode` errors have been added for cases where a transfer is requested to or from a wallet owned by a closed user:

* [002601](/errors/codes/002601) - User owning debited wallet is closed and cannot transfer to another wallet
* [002602](/errors/codes/002602) - User owning credited wallet is closed and and cannot receive funds from another wallet