Delete merchant
Deletes a merchant of your company. It only works for a merchant with no linked data: no transaction, alert, event, dispute, evidence or enrollment. It is meant to undo a registration made by mistake.
A merchant with history cannot be deleted. To mark that it left, save status: "inactive" with Edit merchant; to stop receiving its alerts, request the deactivation of its enrollments.
Endpoint
Section titled “Endpoint”DELETE
https://api.rapidchargeback.com/api/v1/merchants/:merchant_idAuthentication
Section titled “Authentication”Authorization: Basic base64(client_id:client_secret)URL parameters
Section titled “URL parameters”| Param | Type | Description |
|---|---|---|
merchant_id | string (UUID) | The merchant id |
Request example
Section titled “Request example”curl -X DELETE https://api.rapidchargeback.com/api/v1/merchants/00000000-0000-0000-0000-000000000001 \ -H "Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ="Response
Section titled “Response”Deleted
Section titled “Deleted”HTTP/1.1 204 No ContentNo body.
Merchant with history
Section titled “Merchant with history”HTTP/1.1 409 Conflict{ "error": { "code": "MERCHANT_HAS_HISTORY", "message": "Merchant has data (transactions, alerts, events, disputes or enrollments) and cannot be deleted. Set its status to inactive and request deactivation of its enrollments instead" }}Nothing was deleted. As the message says, save status: "inactive" and request the deactivation of its enrollments (see above).
Errors
Section titled “Errors”| HTTP | Code | When |
|---|---|---|
| 404 | MERCHANT_NOT_FOUND | The merchant does not exist, belongs to another company, or the id is not a UUID |
| 409 | MERCHANT_HAS_HISTORY | The merchant has linked data |
| 403 | KYB_NOT_APPROVED, COMPANY_NOT_ACTIVE, COMPANY_BLOCKED | Company without an approved registration, inactive or blocked |
| 429 | RATE_LIMIT_EXCEEDED | More than 60 writes per minute |
| 503 | SERVICE_UNAVAILABLE | Temporarily unavailable: repeat after Retry-After |
- Repeating after a
503: if the merchant had already been deleted, the new call responds404 MERCHANT_NOT_FOUND. - Activity: the deletion shows up in the dashboard Activity as made by the integration.