API REFERENCE
Remove the Payment Method
On this page
/api/accounts/{id}/payment-methodDetach the default card on file from an account. After this call GET /api/accounts/{id}/payment-method returns card: null, credit purchases route through checkout again, and auto top-up (if enabled) is turned off because it has nothing to charge. Subscriptions collected by invoice are unaffected. id may be the authenticated account or an organization the caller belongs to.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request DELETE \
--url 'https://api.recoupable.dev/api/accounts/YOUR_ID/payment-method' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Parameters
Path parameters
idstringrequiredThe unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.
Responses
204Payment method detached; no body.+
No response body schema is specified.
401Unauthorized - invalid or missing authentication+
application/json
errorstringrequiredHuman-readable error message.
{
"error": "Unauthorized"
}403Forbidden - the account is not the caller's and not an organization they belong to (an unknown id also returns 403, never 404)+
application/json
errorstringrequiredHuman-readable error message.
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
{
"description": "Detach the default card on file from an account. After this call `GET /api/accounts/{id}/payment-method` returns `card: null`, credit purchases route through checkout again, and auto top-up (if enabled) is turned off because it has nothing to charge. Subscriptions collected by invoice are unaffected. `id` may be the authenticated account or an organization the caller belongs to.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"responses": {
"204": {
"description": "Payment method detached; no body."
},
"401": {
"description": "Unauthorized - invalid or missing authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountPaymentMethodErrorResponse"
},
"example": {
"error": "Unauthorized"
}
}
}
},
"403": {
"description": "Forbidden - the account is not the caller's and not an organization they belong to (an unknown id also returns 403, never 404)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountPaymentMethodErrorResponse"
}
}
}
}
}
}