paddle_create_price: Create a Paddle Price

View source: R/prices.R

paddle_create_priceR Documentation

Create a Paddle Price

Description

Creates a new price for a product. The price defines how much customers pay, how often, and under what terms.

Usage

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
)

Arguments

description

Internal description for your team. Required.

product_id

ID of the product this price belongs to. Required.

unit_price

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

Type of item (one of '"standard"' and '"custom"'). Optional. Defaults to '"standard"'.

name

Name of this price (shown at checkout/invoices). Optional.

billing_cycle

List with 'frequency' and 'interval' (one of '"day"', '"week"', '"month"', '"year"'). Optional. Omit for one-time pricing.

trial_period

List with 'frequency' and 'interval' (one of '"day"', '"week"', '"month"', '"year"'). Optional. Requires 'billing_cycle'.

tax_mode

One of '"account_setting"', '"external"', '"internal"'. Optional.

unit_price_overrides

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.

quantity

List with 'minimum' and 'maximum' quantity limits. Optional.

custom_data

Named list of custom metadata. Optional.

Value

A list representing the created price entity and metadata.

Examples


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"
 )
)


paddleR documentation built on June 24, 2025, 9:07 a.m.