Skip to content
Go To Dashboard

Set default payment method

PATCH /v1/billing/payment-methods/{id}/default

No authentication required.

ParameterTypeRequiredDescription
idstringYesPayment method ID
Terminal window
curl -X PATCH "https://api.sapiom.ai/v1/billing/payment-methods/:id/default" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"cardBrand": "visa",
"cardLast4": "4242",
"cardExpMonth": 12,
"cardExpYear": 2025,
"cardFunding": "credit",
"isDefault": true,
"status": "active",
"createdAt": "2024-01-15T10:30:00.000Z"
}
StatusCodeDescription
401-Unauthorized
404-Payment method not found

See Error Codes for full reference.