Creates a new price for a product. The price defines how much customers pay, how often, and under what terms.
paddle_create_price(
description,
product_id,
unit_price,
type = NULL,
name = NULL,
billing_cycle = NULL,
trial_period = NULL,
tax_mode = NULL,
unit_price_overrides = NULL,
quantity = NULL,
custom_data = NULL
)
Internal description for your team. Required.
ID of the product this price belongs to. Required.
A list with `amount` (string, lowest denomination, e.g. for 10 USD write 1000 (lowest denomination = cents)) and `currency_code` (3-letter ISO). Required.
Type of item (one of `"standard"` and `"custom"`). Optional. Defaults to `"standard"`.
Name of this price (shown at checkout/invoices). Optional.
List with `frequency` and `interval` (one of `"day"`, `"week"`, `"month"`, `"year"`). Optional. Omit for one-time pricing.
List with `frequency` and `interval` (one of `"day"`, `"week"`, `"month"`, `"year"`). Optional. Requires `billing_cycle`.
One of `"account_setting"`, `"external"`, `"internal"`. Optional.
A list of overrides with `country_codes` (Supported two-letter ISO 3166-1 alpha-2 country code) and `unit_price` (same list as in unit_price parameter). Optional.
List with `minimum` and `maximum` quantity limits. Optional.
Named list of custom metadata. Optional.
A list representing the created price entity and metadata.
if (FALSE) { # paddle_has_token()
set_paddle_mode("sandbox")
result <- paddle_create_price(
description = "Standard monthly subscription",
product_id = "pro_123",
unit_price = list(
amount = "1000", # 10.00 USD
currency_code = "USD"
)
)
}