SoraiDocs
GuidesAPI reference

sorai prices create

Add a price to a product.

A product has one price per currency, in a currency the store can take payments in.

sorai prices create --product-id <uuid> --currency <string> --amount-minor <int> --kind <one_time|recurring> [flags]

Flags

  • --store <id|slug>: A store id or slug. Defaults to SORAI_STORE, the saved login's store, or the only store.
  • --product-id <uuid> (required): The product's id, from sorai products list.
  • --currency <string> (required): An ISO 4217 code, such as IDR or USD.
  • --amount-minor <int> (required): The amount in the currency's smallest unit: 1500 is USD 15.00. IDR, JPY, KRW and VND have no decimals, so 150000 is IDR 150,000.
  • --kind <one_time|recurring> (required): one_time, or recurring for a membership.
  • --interval <string>: For a recurring price: month or year.
  • --pay-what-you-want: Let the buyer choose the amount, starting from min_minor.
  • --min-minor <int>: With pay_what_you_want: the lowest amount, in the same units as amount_minor.
  • --dry-run: Print the request it would send, and for an update the fields that would change, without changing anything.

Permissions

Needs a key with the catalog:write permission.

This command changes data. Run it with --dry-run first to see what it would do.

On this page