Skip to main content

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

ParameterTypeRequiredDescription
idUUIDYesThe unique identifier of the payment method to remove

Response

Success Response

Status Code: 200 OK

Response Body:

{
"message": "Payment method removed successfully"
}

Response Fields

FieldTypeDescription
messagestringConfirmation message

Errors

Status CodeError CodeDescription
400BAD_REQUESTCannot remove the default payment method while other methods exist, or cannot remove the last payment method while a subscription is active
401UNAUTHORIZEDMissing or invalid JWT token
403FORBIDDENUser does not have admin privileges
404NOT_FOUNDPayment 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.