#redtopia - subscriptions

1 messages · Page 1 of 1 (latest)

slow glade
#

To clarify, are you using Stripe Subscriptions?

#

Or are you just using PaymentIntents and making your own Subscription system?

weak dragon
#

no, it's an internal subscription system

slow glade
#

Basically set the expiration date of the card in between the first payment and second

weak dragon
#

I have it all working using payment intents but I need to emulate a failure on an auto renewal

slow glade
#

Yeah so above would fail due to expiration date

#

Does it matter the type of failure?

weak dragon
#

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.

slow glade
weak dragon
#

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

slow glade
#

You could use any of the declined payments cards to simulate a decline

weak dragon
#

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.

gaunt gust
#

this is the test card you want, that test card can be attached but it will decline for a payment

weak dragon
#

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?

gaunt gust
#

It'll stay open for a bit. But otherwise no, you just ask a new question in #dev-help

weak dragon
#

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

dense lava
#

👋

#

Let me know if you don't figure it out!