Altostrat Studio is here — the AI-native network operations IDE for engineers running production. Terminal, diagrams, runbooks, and Copilot in one workspace. Get started →
curl --request DELETE \
--url https://v1.api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId}/payment-methods/{paymentMethodId} \
--header 'Authorization: Bearer <token>'{
"type": "unprocessable_entity",
"code": "cannot_detach_default_with_subscriptions",
"message": "Cannot delete the default payment method while active subscriptions exist. Please set another payment method as default first.",
"doc_url": "https://docs.altostrat.io/errors/cannot_detach_default_with_subscriptions"
}Detaches a payment method from a billing account. You cannot detach the only payment method on an account, nor can you detach the default payment method if there are active subscriptions.
curl --request DELETE \
--url https://v1.api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId}/payment-methods/{paymentMethodId} \
--header 'Authorization: Bearer <token>'{
"type": "unprocessable_entity",
"code": "cannot_detach_default_with_subscriptions",
"message": "Cannot delete the default payment method while active subscriptions exist. Please set another payment method as default first.",
"doc_url": "https://docs.altostrat.io/errors/cannot_detach_default_with_subscriptions"
}Documentation Index
Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Enter your JWT in the format: Bearer {token}
The ID of the workspace.
"ws_a1b2c3d4e5f6g7h8"
The ID of the billing account, which corresponds to a Stripe Customer ID (cus_...).
"cus_a1b2c3d4e5f6g7h8"
The ID of the Stripe Payment Method (pm_...).
"pm_a1b2c3d4e5f6g7h8"
The payment method was detached successfully.
Was this page helpful?