Swipelux

Delete business customer

Delete a business customer and all associated data

Soft Delete: This operation performs a soft delete. The customer will no longer be retrievable through the API, but data is retained for compliance purposes.

Overview

The DELETE /v1/customers/business/{id} endpoint deletes a business customer. After deletion:

  • The customer is no longer retrievable through the API
  • Associated business data, documents, and shareholders are soft-deleted
  • Creating a new customer with the same email or phone number is allowed
  • Data is retained internally for compliance and audit purposes

HTTP Request

DELETE /v1/customers/business/{id}

Path Parameters

ParameterTypeDescription
idstringRequired. The customer ID (starts with cus_)

Example Request

Response

Success Response (200 OK)

{
  "success": true,
  "message": "Business customer deleted successfully",
  "customerId": "cus_abc123xyz789"
}

Response Fields

FieldTypeDescription
successbooleanWhether the deletion was successful
messagestringHuman-readable success message
customerIdstringThe ID of the deleted customer

Error Responses

404 Not Found

Customer does not exist:

{
  "message": "Customer not found"
}

400 Bad Request

Customer exists but is not a business type:

{
  "message": "Customer is not a business type. Use DELETE /v1/customers/:id for individual customers."
}

401 Unauthorized

Missing or invalid API key:

{
  "message": "Unauthorized"
}

Important Notes

What Gets Deleted

When you delete a business customer, the following are soft-deleted:

  • Customer record (base customer data)
  • Business customer data (KYB information)
  • Business documents (certificates, proof of address, etc.)
  • Shareholders and their documents
  • Associated wallet data

What Happens After Deletion

  1. API Access: Customer cannot be retrieved via GET endpoints
  2. Unique Constraints: Email and phone become available for new customers
  3. Compliance: Data is retained internally for audit/compliance purposes
  4. Wallets: Any associated wallets are also deleted

Difference from Individual Customer Delete

Use the correct endpoint based on customer type:

Customer TypeDelete Endpoint
BusinessDELETE /v1/customers/business/{id}
IndividualDELETE /v1/customers/{id}

Attempting to delete a business customer using the individual endpoint (or vice versa) will result in a 400 error.

Use Cases

ScenarioNotes
Business closureDelete customer after business ceases operations
Data cleanupRemove test or duplicate business customers
Account migrationDelete old account before creating new one
Compliance requestHandle GDPR or similar data deletion requests

Best Practices

  1. Verify Customer Type: Ensure the customer is a business type before calling this endpoint
  2. Export Data First: If needed, retrieve customer data before deletion
  3. Check Dependencies: Ensure no active transfers or pending operations exist
  4. Use Correct Endpoint: Don't mix business and individual delete endpoints