Skip to main content
Set a saved payment method as primary and/or change its auto-top-up fallback priority
Audience: application and coding agent.

Request body

Send isPrimary, priority, or both. Unknown fields return 400 validation_error, so typos such as isPrimarry fail before any payment-method side effect.

Canonical metadata

  • requestId
  • traceparent

Example request

Payment-method management requires a WorkOS bearer session with billing:manage. API keys are rejected so saved payment methods stay limited to interactive billing administrators.

Example response

Give this prompt to your agent

Failure posture

  • treat non-2xx responses as contract-aware failures, not free-form errors
  • preserve requestId and traceparent in logs and downstream reports
  • if provenance or freshness metadata is present, return it unchanged so trust is not lost in the handoff