Close Account with Options
PUT/client/users/:correlation_id/profile/closure
This API is used to close the account. It will close the account, cancel all cards and clean following things:
-
Household details
-
Partner Links
-
Terminate all cards
-
Extended Data
-
Save account closure object in account-history table
The request also includes optional settings, where "zeroBalances" allows the account balance to be automatically deleted ("zeroed") and "anonymiseMemberData" allows masking the PII data in the account information. Both are "false" by default, but can be set to "true" to carry out the corresponding function. The response provides a success message for the operation.
Request
Body
| Attribute | Description | Format | Notes |
|---|---|---|---|
| zeroBalances | Describes if we want to zero out the balances along with status change. It will create a discretionary transaction. | boolean: "true" or "false" | Optional, default value is "false" |
| anonymizeMemberData | Describes if we want to mask the PII data of user. Also will set optIn status to declined and mask data to CBProfile Sync | boolean: "true" or "false" | Optional, default value is "false" |
Response
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| message | If all clean up is done properly then "Account Status updated successfully" is sent in response. | String | If parts of clean up did not work, account status is still updated successfully, but the response message shows which parts failed. For example: "Account status updated successfully. Although following clean-up tasks failed: Member Profile Sync, Household Removal." |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | A Deceased or Closed Account cannot be made active again. | INVALID_REQUEST |
Request
Responses
- default
200 - Successful