Sends a preview request to Paddle to simulate a transaction without creating it.
paddle_preview_transaction(
items,
customer_id = NULL,
currency_code = NULL,
discount_id = NULL,
ignore_trials = NULL,
customer_ip_address = NULL,
address = NULL
)
List of lists. Required. Each must include `price_id` and `quantity`.
Character. Optional. Customer ID prefixed with "ctm_".
Character. Optional. Must be valid ISO 4217 code.
Character. Optional. Discount ID prefixed with "dsc_".
Logical. Optional. If TRUE, disables trial discounts.
Character. Optional. Valid IPv4 or IPv6.
Named list. Optional. Must include `country_code` (2-letter) and optionally `postal_code`.
A list with previewed transaction data.
if (FALSE) { # paddle_has_token()
set_paddle_mode("sandbox")
result <- paddle_preview_transaction(
items = list(list(price_id = "pri_123", quantity = 2)),
customer_id = "ctm_123",
currency_code = "EUR",
discount_id = "dsc_123",
ignore_trials = TRUE,
customer_ip_address = "8.8.8.8"
)
}