3 Close user account
NOTE: This action is available only to merchants that use the Merchant Specific Bango User Id feature
Success scenario
3.1 Close user account
Test | Action | Expected result |
---|---|---|
1 | Send a valid DELETE request to https://api.bango.net/v5/identity/{bango-user-id} where bango-user-id is the ID of the account to be closed. No body required | An HTTP response code 200 (OK) should be returned with the following body: { "responseCode": "OK", "responseMessage": "Success.", } |
Failure scenarios
3.2 Invalid bangoUserId
Test | Action | Expected result |
---|---|---|
1 | Send a DELETE request with an invalid bangoUserId to https://api.bango.net/v5/identity{invalid-bango-User-Id} | An HTTP response code 404 (Not Found) should be returned with the following body: { "responseCode": "NOT_FOUND", "A MerchantUserAccount with the given id does not exist." } |
3.3 Unauthorized
This scenario can be tested using Prefer Headers.
Test | Action | Expected result |
---|---|---|
1 | Send a valid DELETE request to https://api.bango.net/v5/identity{invalid-bango-User-Id} Option 1: Include the following header in the request:
Option 2: Include the following header in the request:
| An HTTP response code 401 (Connect error) should be returned with the following body: { "responseCode": "UNAUTHORIZED", "responseMessage": "Invalid access credentials." } |
3.4 Service unavailable
This scenario can be tested using Prefer Headers.
Test | Action | Expected result |
---|---|---|
1 | Send a valid DELETE request to https://api.bango.net/v5/identity{invalid-bango-User-Id} Include the following header in the request:
| An HTTP response code 502 (Connect error) should be returned with the following body: { "responseCode": "SERVICE_UNAVAILABLE", "responseMessage": "The server is undergoing maintenance and is not available. Please, try again later." } |
3.5 Internal error
This scenario can be tested using Prefer Headers.
Test | Action | Expected result |
---|---|---|
1 | Send a valid DELETE request to https://api.bango.net/v5/identity{invalid-bango-User-Id} Include the following header in the request:
| An HTTP response code 502 (Connect error) should be returned with the following body: { "responseCode": "INTERNAL_ERROR", "responseMessage": "The server encountered an unexpected condition which prevented it from fulfilling the request." } |