Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Setup payment method on a billing account

Starts saving a payment method for the org: returns a client secret the console confirms with Stripe.js, so card data never reaches Sylphx.

This method is not served on the public API. api.sylphx.com does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Starts saving a payment method for the org: returns a client secret the console confirms with Stripe.js, so card data never reaches Sylphx. The saved method becomes the account's default and is charged off-session for each finalized invoice.

Not available yet. Sylphx Billing is declared in the registry but no backend serves it: every call answers 501 with the problem code UNIMPLEMENTED.

  • Path POST https://api.sylphx.com/v1/orgs/acme/billing_accounts/billing-account:setupPaymentMethod
  • Scope billing:admin
  • Effect write — a successful call changes state.
  • Collection billing_accounts

#Request

FieldTypeWhat it is
namestringThe billing account, orgs/{org}/billing_accounts/default. Required.

#Response

FieldTypeWhat it is
providerstringThe provider, stripe. Output only.
client_secretstringThe provider's client secret for this setup; single use. Output only.
publishable_keystringThe provider's publishable key for its client library. Output only.

#Errors

  • UNAUTHENTICATED — No valid key or token was presented.
  • PERMISSION_DENIED — The key lacks the method's permission.
  • RESOURCE_NOT_FOUND — The named Resource does not exist or is not visible.
  • UNAVAILABLE — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/billing_accounts/billing-account:setupPaymentMethod" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'