past_due subscription back to active

75 views
Skip to first unread message

Jigar Dhulla

unread,
Aug 27, 2015, 10:37:06 AM8/27/15
to Stripe API Discussion
Hi,

This link says,
In order to set a customer's subscription status back to “active” from an “unpaid” or “past_due” state, you will need to open their most recent invoice and successfully pay it.

 But when the subscription's status is past_due, adding the new valid card triggered the payment and the payment was successfully made.

Steps I followed:
1. Account settings for subscription were default.
2. Create a customer, subscribe to a plan with trial period end with 15 minutes, also attach the invalid card 4000 0000 0000 0341 to a customer.
3. Waited for trial period to end. invoice was created properly and subscription went to active.
4. Did not wait for stripe to attempt the charge. Did the same manually from Dashboard. Expected charge.failed, etc events were caught.
5. Added the card, events were triggered correctly
6. But also the payment was paid for the last unsuccessful payment. (Did not have to manually pay the invoice)

I had to manually Pay the invoice when the subscription status was unpaid
1. In account settings, make subscription unpaid if the charge failed on the very first attempt.
2. Create a customer, subscribe to a plan with trial period end with 15 minutes, also attach the invalid card 4000 0000 0000 0341 to a customer.
3. Waited for trial period to end. invoice was created properly and subscription went to active.
4. Did not wait for stripe to attempt the charge. Did the same manually from Dashboard. Expected charge.failed, etc events were caught.
5. Added the card, events were triggered correctly
6. This time I had to pay the invoice manually(as expected).

Am I missing anything ? Can I safely just(not pay the invoice) add the card when subscription status is past_due ?

Thanks and Best Regards,
Jigar Dhulla

Thibaud Spieser

unread,
Aug 27, 2015, 12:12:25 PM8/27/15
to Stripe API Discussion
Hi,
If you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid source: for each of the customer's current subscriptions, if the subscription is in the past_due state, then the latest unpaid, unclosed invoice for the subscription will be retried . (Note also that no invoices pertaining to subscriptions in the unpaid state, or invoices pertaining to canceled subscriptions, will be retried as a result of updating the customer's source.)
I would say that you can just add the card and the invoice will be paid (when the subscription is past_due) and the subscription status will be updated.

Thibaud

Jigar Dhulla

unread,
Aug 27, 2015, 1:22:57 PM8/27/15
to Stripe API Discussion
Hi,

I should have read the docs more carefully. Thanks.
Reply all
Reply to author
Forward
0 new messages