#redtopia - subscriptions
1 messages · Page 1 of 1 (latest)
To clarify, are you using Stripe Subscriptions?
Or are you just using PaymentIntents and making your own Subscription system?
no, it's an internal subscription system
So I think you could use test clocks with this: https://stripe.com/docs/billing/testing/test-clocks
Basically set the expiration date of the card in between the first payment and second
I have it all working using payment intents but I need to emulate a failure on an auto renewal
yes, I need it to fail due to a payment method failure
so looks like test clocks are used to test stripe subscriptions... not what I need, correct?
I know I can create a payment method that expires tomorrow, and then wait until tomorrow to run a test, but what I want to do is maybe borrow a payment method ID that I could use to create a payment intent object that will fail when created. I'm using off_session payment intents for this.
We have these test cards: https://stripe.com/docs/testing#declined-payments
and just so you know, I need it to fail due to a payment method failure so that I know whether or not to expire the subscription
I wonder if the card labeled "Decline after attaching" would work
You could use any of the declined payments cards to simulate a decline
the problem is that I need to setup the first payment using a card that works
I cannot do that when I use a test card that will be declined.
this is the test card you want, that test card can be attached but it will decline for a payment
yea, that's what I have my eye on... I'm going to give that a try
thanks... can I resume this thread if I run into any issues?
looks like I'm having an issue using that card. When I change the payment method for a subscription, I am using the setupIntent api. In doing so, I thought that I am attaching the customer ID to that card. However, when I try to subsequently create a paymentIntent object to charge the card, I get the error that the customer isn't attached to that card.
oh wait... forget it... I think I see an error in my code. I could be grabbing the wrong customer