Testing past-due subscriptions and expired cards

2,018 views
Skip to first unread message

Ken Bowen

unread,
Sep 26, 2014, 1:33:47 PM9/26/14
to api-d...@lists.stripe.com
For testing parts of the API:
A) I’m looking for the quickest way to force a subscription into past-due status. Our subscriptions have a 30 day trial period, without a card submitted. As soon as the subscription is set up, I use the Stripe dashboard to edit the subscription and end the trial period asap (usually it’s the “today” date). But then the subscription doesn’t usually pass into the past-due state until the next day, which I understand for normal operation. However, is there a way to “cheat” and force it into past-due sooner?

B) Is there a way to create a card that is already expired, or to force the expiration date of an existing test card backwards to become expired? I want to check out our code for letting the user update the expiration date of an expired card.

Thanks in advance,
Ken Bowen

Matthew Arkin

unread,
Sep 26, 2014, 1:41:34 PM9/26/14
to api-d...@lists.stripe.com
Hi Ken, 
For letter A. through the API you can set trial_end to "now". 
Letter B is tricky, There is the test card "4000000000000069  Charge will be declined with an expired_card code." however, this card would fail to attach to a customer, and all charges against it would fail. Maybe a Striper has an idea on how to best simulate a customer whose card expires during a subscription.


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Ken Bowen

unread,
Sep 26, 2014, 2:12:42 PM9/26/14
to api-d...@lists.stripe.com
Hi Matt,

Is “now” different from setting trial_end to today’s date on the calendar or leaving the field blank?
The API immediately pops up the calendar when I click in the trial_end field.
I left the trial_end field empty, and it did the following:
1) if there was a valid card present for the customer, it converted the subscription to Active
2) if there wasn’t a valid card present, I got the following (and the dialog stayed up):
To add a paid subscription, this customer needs an active credit card. Add one

Cheers,
Ken
Reply all
Reply to author
Forward
0 new messages