Creates a new transaction in the Paddle API.
paddle_create_transaction(
items,
status = NULL,
customer_id = NULL,
address_id = NULL,
business_id = NULL,
custom_data = NULL,
currency_code = NULL,
collection_mode = NULL,
discount_id = NULL,
billing_details = NULL,
billing_period = NULL,
checkout = NULL,
include = NULL
)
List of item objects. Each must contain `price_id` (Character, required) and `quantity` (integer, required).
Character. Optional. Must be `"billed"` or skipped to let Paddle set the status.
Character. Optional. Paddle customer ID (e.g., "ctm_123").
Character. Optional. Paddle address ID (e.g., "add_456"). Requires `customer_id`.
Character. Optional. Paddle business ID. Requires `customer_id`.
Named list. Optional structured metadata.
Character. Optional. Must be `"USD"`, `"EUR"`, or `"GBP"` if `collection_mode = "manual"`.
Character. Optional. Must be one of `"automatic"` or `"manual"`. Defaults to `"automatic"`.
Character. Optional. Paddle discount ID.
List. Required if `collection_mode = "manual"`. May include: - `payment_terms` → list with `interval` (Character, must be one of `"day"`, `"week"`, `"month"`, `"year"`) and `frequency` (integer) - `enable_checkout` (logical) - `purchase_order_number` (Character) - `additional_information` (Character or null)
List with `starts_at` and `ends_at` in RFC 3339 format. Optional.
List with `url` (Character) to override payment link. Optional.
Character vector. Must be one of `"address"`, `"adjustments"`, `"adjustments_totals"`, `"available_payment_methods"`, `"business"`, `"customer"`, `"discount"`. Optional.
A list containing the created transaction and metadata.
if (FALSE) { # paddle_has_token()
set_paddle_mode("sandbox")
result <- paddle_create_transaction(
items = list(
list(price_id = "pri_123", quantity = 1)
)
)
}