Remove Payment Method
Remove a stored payment method from the organization. If this is the default payment method and other methods exist, you must set a new default before removing it.
Request
DELETE /billing/payment-methods/{id}
Authentication
Requires an Admin Bearer JWT token.
Authorization: Bearer <access_token>
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The unique identifier of the payment method to remove |
Response
Success Response
Status Code: 200 OK
Response Body:
{
"message": "Payment method removed successfully"
}
Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Confirmation message |
Errors
| Status Code | Error Code | Description |
|---|---|---|
400 | BAD_REQUEST | Cannot remove the default payment method while other methods exist, or cannot remove the last payment method while a subscription is active |
401 | UNAUTHORIZED | Missing or invalid JWT token |
403 | FORBIDDEN | User does not have admin privileges |
404 | NOT_FOUND | Payment method with the specified ID does not exist or does not belong to your organization |
Example
Request
curl -X DELETE https://api.entryguard.io/api/v1/billing/payment-methods/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Response
{
"message": "Payment method removed successfully"
}
Notes
- You cannot remove the last payment method if you have an active paid subscription. Cancel your subscription first or add a new payment method.
- If you attempt to remove the default payment method while other payment methods exist, you will receive an error. Set another payment method as default first.
- The removal is logged in the audit trail with event type
PAYMENT_METHOD_DELETED.