List and reschedule payments related to subscriptions.
Summary
Functions
List all paid and upcoming (unpaid) payments
Change the due date of the upcoming subscription payment
Types
Functions
@spec list(list_args()) :: {:ok, [t()]} | {:error, Paddle.Error.t()}
List all paid and upcoming (unpaid) payments
Examples
Paddle.SubscriptionPayment.list()
{:ok, [%Paddle.SubscriptionPayment{
id: 8936,
subscription_id: 2746,
amount: 1,
currency: "USD",
payout_date: "2015-10-15",
is_paid: 0,
is_one_off_charge: 0,
receipt_url: "https://www.paddle.com/receipt/469214-8936/1940881-chrea0eb34164b5-f0d6553bdf"
}]}
@spec reschedule(integer(), Date.t(), keyword()) :: {:ok, nil} | {:error, Paddle.Error.t()}
Change the due date of the upcoming subscription payment
Note: You may need to first call Paddle.SubscriptionPayment.list/1 to obtain an upcoming (unpaid) payment ID value to make this call.
Examples
Paddle.SubscriptionPayment.reschedule(10, ~D[2015-10-15])
{:ok, nil}