Returns a transaction that can be passed to a checkout to update payment details. Only for subscriptions where `collection_mode` is `automatic`.

paddle_get_update_payment_transaction(id)

Arguments

id

Character. Required. Paddle ID of the subscription (e.g. "sub_abc123").

Value

A list containing transaction details for payment method update.

Details

Depending on subscription status: - For `past_due`, returns the most recent failed transaction. - For `active`, creates a new zero-amount transaction.

Examples

if (FALSE) { # paddle_has_token()
set_paddle_mode("sandbox")
result <- paddle_get_update_payment_transaction(
  id = "sub_123"
)
}