Reputation: 41
I want to test the following scenarios which are included in the stripe subscription status documentation. Can anyone please suggest a test card in stripe to test it?
Scenario 1
Incomplete_expired- The initial payment on the subscription failed and no successful payment was made within 23 hours of creating the subscription. These subscriptions do not bill customers. This status exists so you can track customers that failed to activate their subscriptions.
Scenario 2
Unpaid- The latest invoice hasn’t been paid but the subscription remains in place. The latest invoice remains open and invoices continue to be generated but payments aren’t attempted.
Upvotes: 3
Views: 5265
Reputation: 1091
For incomplete_expired
- just pay with card which need 3d secure like 4000002500003155
and don't make card authentication, subscription will move to incomplete after 3 hours, after 23 hours subscription status will move from incomplete
to incomplete_expired
.
For unpaid
status Stripe says some additional setting should be applied
https://stripe.com/docs/api/subscriptions/object#subscription_object-status
Upvotes: 1
Reputation: 347
Have a look at the SO question: Simulate Stripe Subscription Renewal Failure
The idea is to create a user with a valid payment method and then change the payment method later on via the dashboard for example.
Upvotes: 0
Reputation: 1963
You should use a test card where the payment will be declined for the initial subscription invoice payment. There's a full list here, but 4000000000000002
will return a generic card_declined
error which should be sufficient for this testing case.
Upvotes: 0