Skip to main content

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you’ve installed the pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.

The billing command

This command manages the organization’s payment method. There is one current card. Updating it opens Stripe Checkout in a browser; the CLI never collects the card number. Usage:
--org is required.

Available sub-commands

Sub-command flag descriptions

Available flags

--org is required.

Global flags

Service tokens need read_payment_method to show the card and write_payment_method to update or delete it.

Examples

Show the current card

Command:

Update the card

Command:
This creates a Checkout session and waits until you finish in the browser. Leave the command running. If it is interrupted, use status with the setup id it printed. Do not run update again while that setup is still pending. Agents should pass --format json. Pending details are written to stderr; a final JSON object is written to stdout when Checkout completes.

Check a setup after an interrupted update

Command:
status does not poll. If the setup is still pending, wait and run the same command again.

Delete the current card

Command:
In JSON mode, pass --force after the user has approved the deletion.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.