on_hold state.
For subscriptions in
on_hold state, updating the payment method automatically creates a charge for remaining dues, generates an invoice, and reactivates the subscription to active state upon successful payment.Use Cases
- Active subscriptions: Update payment method when a card expires or customer wants to use a different payment method
- On hold subscriptions: Reactivate subscriptions that went on hold due to failed payments by updating the payment method
- Payment method management: Switch between saved payment methods or add new ones
To list existing payment methods for a customer, use the List Payment Methods API. This helps you retrieve available payment method IDs when using
type: "existing" to update a subscription’s payment method.Behavior for Active Subscriptions
When updating the payment method for an active subscription:- The payment method is updated immediately
- No charge is created
- The subscription remains active
- Future renewals will use the new payment method
Behavior for On Hold Subscriptions
When updating the payment method for a subscription inon_hold state:
- A charge is automatically created for remaining dues
- An invoice is generated for the charge
- The payment is processed using the new payment method
- Upon successful payment, the subscription is reactivated to
activestate - You’ll receive webhook events:
payment.succeededfollowed bysubscription.active
Webhook Events
When updating a payment method for anon_hold subscription, you’ll receive the following webhook events:
payment.succeeded- The charge for remaining dues was successfulsubscription.active- The subscription has been reactivated
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Subscription Id
Body
application/json