Update a subscription
Subscription object
Change the default payment method
Setdefault_payment_method to the ID of a payment method belonging to the subscription’s customer. Pass null to remove the default payment method.
Change the default payment method
collection_method (charge_automatically or send_invoice). Switching to send_invoice clears the default payment method type, since invoices are no longer charged automatically.
Reschedule billing
To move the point in the billing cycle that future periods are calculated from, setbilling_anchor to a Unix timestamp. By default, this only affects the next period going forward.
Reanchor the next billing period
Set
billing_cycle_reset to true to reset the entire current billing cycle around the new anchor, rather than only the next period.end_date to a Unix timestamp, or null to let it continue indefinitely.
Change the end date
Schedule a cancellation
Setcancel_at to a Unix timestamp to automatically cancel the subscription at a future date. The date must be at least one day in the future. Pass null to remove a scheduled cancellation.
Schedule a cancellation
You can also set
credit_note_data on the same request to have Yorlet automatically issue a credit note when the subscription is later closed. To cancel a subscription immediately instead of scheduling it, use the Cancel a subscription endpoint.Pause or resume collection
Setpause_collection to stop Yorlet from collecting payment on new invoices, while still generating them according to behavior. Pass null to resume collection immediately.
Pause collection
Apply a coupon
Setcoupon to the ID of a coupon to apply a discount to the subscription.
Apply a coupon
Add a one-off invoice item
Useadd_invoice_items to add one-time charges to the next invoice generated by the subscription, without changing the recurring items.
Add a one-off invoice item
To change the recurring items on a subscription (for example, updating the rent amount), use the Subscription Items API instead. Set
proration_behavior on the subscription update to create_prorations or none to control whether prorated invoice items are generated when a subscription item changes.