Skip to main content
The organization payment method is the card Photon charges. It is separate from the plans, subscriptions, and usage under project billing. It uses the selected organization.

Check the card on file

With --json, the command prints the API’s response as Photon sends it. Photon’s API defines that response as card metadata only: cardOnFile, and in paymentMethod (which can be null) the card’s brand, expiry month and year, and last four digits, with no processor identifiers. Before it prints a card on file, the CLI checks the brand, last four digits, and expiry, and fails with ORGANIZATION_PROTOCOL_ERROR when they aren’t valid card details. Without --json, it shows card details only when cardOnFile is true.

Add or replace a card

setup creates a hosted HTTPS checkout and opens it in your browser:
With --json, it prints the checkout the API returns under checkout, and whether the browser opened it:
When the browser opens, Opened secure payment setup in your browser. still goes to stderr as text, for the person at the terminal. The checkout URL never goes to stderr: with --json, it’s only in the JSON on stdout.
The checkout URL is a bearer credential for the checkout session: anyone who has it can use the session. Text output prints it only when the browser doesn’t open, but the JSON always holds it, so keep JSON output out of shared logs.
Invalid or non-HTTPS checkout URLs are rejected before they are opened or displayed.
This command replaced photon account billing payment, which now only points here.