Skip to content

purchase-options

Manage purchase options for one-time products.

Relationship to one-time-products

Purchase options are part of the modern monetization API. They define how a one-time product can be purchased (pricing phases, eligibility, regional overrides). Use gpc otp to manage the products themselves, and gpc purchase-options to manage the purchase options attached to them.

Commands

CommandDescription
purchase-options listList purchase options
purchase-options getGet a purchase option
purchase-options createCreate a purchase option
purchase-options activateActivate a purchase option
purchase-options deactivateDeactivate a purchase option

purchase-options list

List all purchase options for the app.

Synopsis

bash
gpc purchase-options list [options]

Options

FlagShortTypeDefaultDescription
--sortstringSort by field (prefix with - for descending)

Example

bash
gpc purchase-options list --app com.example.myapp

purchase-options get

Get details of a specific purchase option.

Synopsis

bash
gpc purchase-options get <id>

Example

bash
gpc purchase-options get po_launch_promo --app com.example.myapp

purchase-options create

Create a new purchase option from a JSON file.

Synopsis

bash
gpc purchase-options create --file <path>

Options

FlagShortTypeDefaultDescription
--filestring(required)Path to JSON file with purchase option data

Example

bash
gpc purchase-options create \
  --app com.example.myapp \
  --file purchase-option.json

Preview without creating:

bash
gpc purchase-options create \
  --app com.example.myapp \
  --file purchase-option.json \
  --dry-run

purchase-options activate

Activate a purchase option so it becomes available to users.

Synopsis

bash
gpc purchase-options activate <id>

Example

bash
gpc purchase-options activate po_launch_promo --app com.example.myapp

Preview:

bash
gpc purchase-options activate po_launch_promo --app com.example.myapp --dry-run

purchase-options deactivate

Deactivate a purchase option. Users will no longer see it.

Synopsis

bash
gpc purchase-options deactivate <id>

Example

bash
gpc purchase-options deactivate po_launch_promo --app com.example.myapp

Preview:

bash
gpc purchase-options deactivate po_launch_promo --app com.example.myapp --dry-run

Released under the MIT License.