Check the card on file
--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:
--json, it prints the checkout the API returns under checkout, and
whether the browser opened it:
- Browser opens
- --no-browser
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.
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.