Skip to main content
DELETE
https://api-dev.weir.ai/
/
org
/
card
/
:cardId
curl -X DELETE 'https://api.weir.ai/org/card/card_123456789' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'x-source: console'
{
  "message": "Card deleted successfully",
  "status": "success"
}

Delete Payment Card

Remove a payment card from your organization.
Caution: If this is the only payment card and you have active subscriptions, you may need to add another card first.
curl -X DELETE 'https://api.weir.ai/org/card/card_123456789' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'x-source: console'
{
  "message": "Card deleted successfully",
  "status": "success"
}

Path Parameters

cardId
string
required
Unique identifier of the card to delete.

Usage Examples

const deleteCard = async (cardId, accessToken) => {
  const response = await fetch(`https://api.weir.ai/org/card/${cardId}`, {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'x-source': 'console'
    }
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};