billing

Buy credit now: charges the card on file, or answers with a payment link when there is none [admin or billing role]

Buy credit now (admin or billing role): amount_usd in whole cents, $10 to $10,000. Credit is the only way compute is paid for: the balance is the limit at every door, compute stops at zero with every disk kept, and credit starts it again on the next run_command or create. A new account starts with $0 and no card. With a verified card on file, the card is charged and the answer carries the new balance; pending: true means the card network is still settling the charge and the credit appears when it does - never buy again before get_billing shows it. With no card on file, nothing is charged: the answer carries payment_url, a payment page for that amount. Give it to the person who pays. One payment there adds the credit and saves the card, and after that buy_credits charges the card directly and set_auto_topup works. Calling again for the same amount returns the same open link. A decline names the reason; the card itself changes on the billing page (the refusal carries the link). set_auto_topup keeps the balance funded without asking every time.

post/preview/billing/credits

Request

  • Base URL: https://autoresearch.sfcompute.com
  • URL: https://autoresearch.sfcompute.com/preview/billing/credits
  • Auth: HTTP bearer

Query parameters

workspacestring

Act in this workspace (its slug). Omitted: the token's bound workspace, then the organization's default. Never ambient - there is no switch-workspace mutation on this door.

Request body

amount_usdnumber double required

Dollars to add now: whole cents, $10 to $10,000 (e.g. 100, or 49.99). Charged to the card on file; with no card on file, the amount of the payment link the answer carries.

orgstring nullable

Organization (uuid or name); omitted = your active org.

Response

The capability's JSON result.

objectstring

The resource type, when the result is one resource.

Changes

No recorded changes to this operation across all 1 revision of this API.