Skip to main content

Delete user

Remove the authenticated user within the network scope of their user access token.

Domain
Users and identity
Owning service
Merchant management
Intended for
Customer application · user to server
Supported authorization
Authenticated user Bearer token

Headers#

3
AuthorizationstringRequired
Accepted or forwarded by the API Gateway for this operation.
X-Device-IdstringOptional
Accepted or forwarded by the API Gateway for this operation.
X-Merchant-IdstringOptional
Accepted or forwarded by the API Gateway for this operation.

Path parameters#

1
user_idstring<uuid>Required
Value substituted for `user_id` in the endpoint path.

Request body#

0
This endpoint does not accept a request body.

Response#

6
204The request was accepted or completed. Inspect the response payload for the business outcome.
400The request is malformed or fails validation.
401The supplied credentials or caller context are invalid.
404The requested resource or route was not found.
500The service could not complete the request. Retry only when the operation is safe or idempotent.
503The service could not complete the request. Retry only when the operation is safe or idempotent.

Before you delete a user#

  • Obtain the customer's user access token through the authentication flow.
  • Set the path user ID to the authenticated customer's UUID. A customer can delete only their own user.
  • Confirm that the customer intends to remove their account from the network associated with that token.

Understand the deletion scope#

For a network-scoped token, deletion removes the user's membership and addresses in that network and requests removal of their cards in the same network. It does not imply deletion from every DEUNA network. A DEUNA-wide account token also removes the account and its network memberships. Successful deletion removes the user's active sessions.

Do not treat this operation as confirmation that every historical payment record or all personal data has been erased. Confirm the required account and data-removal scope with your DEUNA Technical Account Manager before building an account-closure flow.

Send the deletion request#

Use the sandbox base URL below for testing and https://api.deuna.io for production. Send the customer's Bearer token in the Authorization header. The endpoint has no query parameters or request body.

curl --request DELETE \
  --url 'https://api.sandbox.deuna.io/users/USER_ID' \
  --header 'Authorization: Bearer USER_ACCESS_TOKEN'

Verify the result#

A successful request returns HTTP 204 No Content with an empty body. Clear the customer's local session and return them to your signed-out experience. Do not parse the response as JSON or wait for a payment webhook to confirm this operation.

Handle errors and uncertain results#

HTTP 400 can indicate that the path user differs from the token's user. HTTP 401 means the user token cannot authorize the request; HTTP 404 means the requested record was not found. Correct the request or authentication before retrying.

A timeout or server error can occur after part of the deletion has taken effect. HTTP 503 can occur during session cleanup after deletion. Do not assume that a retry will return the same response or automatically repeat the request. Check the account state with DEUNA support when the outcome is uncertain. No idempotency-key contract is defined for this operation.

See response codes and troubleshooting for general error handling.