delete Customer
suspend fun deleteCustomer(account: String, memo: String? = null, memoType: String? = null, jwt: String): HttpResponse
Deletes all personal information for a customer (GDPR compliance).
Removes all customer data stored by the anchor. This is used to comply with privacy regulations like GDPR's "right to be forgotten".
Return
HttpResponse - 200 OK on successful deletion
Parameters
account
The Stellar account ID of the customer to delete
memo
Optional memo if account is shared
memo Type
Type of memo (id, text, or hash)
jwt
SEP-10 JWT token proving ownership of the account
Throws
If JWT token is invalid (401)
If customer not found (404)
For other errors
Example:
kycService.deleteCustomer(
account = userAccountId,
memo = null,
memoType = null,
jwt = authToken
)
println("Customer data deleted")Content copied to clipboard