Close a Legal User
Changed onPermanently close a user account so it can no longer be used.
This endpoint allows your platform to close a Mangopay Account, as per Mangopay's terms and conditions, in the event that the agreement between the user and the platform comes to an end.
<Warning icon="fa-regular fa-triangle-exclamation"> **Caution – Closure is irreversible**Calling this endpoint immediately and permanently changes the UserStatus to CLOSED if the API call is successful. This cannot be undone, even by Mangopay.
Your platform can re-register the user using POST Create a Legal User (SCA). </Warning>
Closure is only possible if all wallets held by the user are empty. Closure is allowed for both UserCategory OWNER and PAYER and for all types of Legal user (Business, Partnership, Organization, Soletrader).
When a User is closed (whether via this endpoint or by Mangopay):
- The UserStatus changes to CLOSED (and the USER_ACCOUNT_CLOSED webhook is sent)
- The user has inflows and outflows blocked (and the relevant webhooks are sent)
- The user object remains available via the API and Dashboard for historical purposes
Closing a user account does not affect Mangopay's data retention obligations or processes. Personal data associated with the closed account will be retained in accordance with Mangopay's data retention policies.
<Note icon="fa-regular fa-circle-info"> **Note – Do not overuse OAuth token endpoint if automating calls**If you are writing a script to close a set of users, ensure you do not call the OAuth token endpoint before each DELETE call. You must use your authentication for the full duration of its lifetime, as described in the authentication guide.
Overuse of the OAuth token endpoint is a security and performance risk and may result in preventative action from Mangopay. </Note>
Request
- Base URLhttps://api.sandbox.mangopay.com
- URLhttps://api.sandbox.mangopay.com/v2.01/{ClientId}/users/legal/{UserId}
- AuthHTTP bearer
Path parameters
Platform's API account identifier, associated with the API key.
The unique identifier of the user.
Response
No Content – Closure was successful
Changes
- warning
deleted the
headerrequest parameterAuthorization - info
the endpoint scheme security
oauth2was added to the API
- warning
- info
api operation id
close_legal_userremoved and replaced withusers_close_legal_user
- info