curl -X POST "https://api.nedzo.ai/v1/workspaces/19c3b12f-ec54-43ad-8686-00e921f1befd/billing/payment-methods/attach" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"paymentMethodId": "pm_1234567890abcdef"
}'
{
"paymentMethod": {
"id": "pm_1234567890abcdef",
"type": "card",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2030,
"isDefault": true,
"createdAt": "2026-04-17T10:30:00Z"
},
"isDefault": true
}
Billing
Attach payment method
Attach a Stripe PaymentMethod to a workspace’s billing customer via the Nedzo REST API. The first attached method automatically becomes the default.
POST
/
workspaces
/
{workspaceId}
/
billing
/
payment-methods
/
attach
curl -X POST "https://api.nedzo.ai/v1/workspaces/19c3b12f-ec54-43ad-8686-00e921f1befd/billing/payment-methods/attach" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"paymentMethodId": "pm_1234567890abcdef"
}'
{
"paymentMethod": {
"id": "pm_1234567890abcdef",
"type": "card",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2030,
"isDefault": true,
"createdAt": "2026-04-17T10:30:00Z"
},
"isDefault": true
}
string
required
Workspace UUID
string
required
Stripe PaymentMethod ID (starts with
pm_), already confirmed against the setup intent on the frontend.curl -X POST "https://api.nedzo.ai/v1/workspaces/19c3b12f-ec54-43ad-8686-00e921f1befd/billing/payment-methods/attach" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"paymentMethodId": "pm_1234567890abcdef"
}'
{
"paymentMethod": {
"id": "pm_1234567890abcdef",
"type": "card",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2030,
"isDefault": true,
"createdAt": "2026-04-17T10:30:00Z"
},
"isDefault": true
}
Was this page helpful?
