Delete Payment Method
Delete a specific payment method by ID.
Request
curl -X DELETE \
https://api.basistheory.ai/tenants/your-tenant-id/payment-methods/26859380-7829-4ee1-8a0a-38927881e7ef \
-H 'Authorization: Bearer your-api-key'
URL Parameters
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
tenantId | true | string | null | The tenant ID. |
id | true | string | null | The payment method ID to delete. |
Response
// No content - successful deletion
The successful deletion returns a 204 No Content
status with an empty response body.
Important Considerations
Irreversible Action
- Permanent deletion: Once deleted, the payment method cannot be recovered
- Active credentials: Any active purchase intents using this payment method will be invalidated
- References: Any stored references to this payment method ID will become invalid
Security
- Authentication required: Valid API key must be provided
- Authorization check: User must have permission to delete the payment method
- Audit trail: Deletion is logged for compliance and security purposes
Best Practices
- Confirm before deletion: Always confirm with the user before permanent deletion
- Check dependencies: Verify no active transactions depend on this payment method
- Alternative approach: Consider marking as inactive instead of deletion for audit purposes
- Error handling: Implement proper error handling for deletion failures
Error Handling
{
"error": {
"status": 401,
"type": "unauthorized",
"title": "Unauthorized",
"message": "Missing or invalid API key was provided."
}
}