Skip to main content
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
}

Documentation Index

Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt

Use this file to discover all available pages before exploring further.

workspaceId
string
required
Workspace UUID
paymentMethodId
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
}