#alexis_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1221743041581158442
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- alexis_subscription-events, 2 days ago, 9 messages
Hi, let me help you with this.
The easiest way is to create an actual Subscription in Test mode, and use test clocks: https://docs.stripe.com/billing/testing/test-clocks
I've already looked at this but I don't see how I can do, for example, test that the customer's subscription is not renewed because their bank card does not go through for one reason or another?
Can I execute anything with any client already register ? Like take one of the client I have in test mode, and send a update of his subscription which simulated a card refused ? Or something like that
Subscription declines is best tested with 3DSecure test cards: https://docs.stripe.com/testing?testing-method=card-numbers#authentication-and-setup
You can use the "Always authenticate" test card which will work when used on-session, but it will fail for the subsequent automatic charges.
Ok so how I trigger customer.subscription.updated with status = unpaid on a specific client in test mode ?
An already register customer
I have customers with active subscriptions in Stripe, which are linked to my app. I would like to be able to change their subscription status in order to verify that the webhooks and the code that I have associated with them in my endpoints do what I expect.
As I suggested, you can use the 3DS test cards that always require authentication. Use the Test clock in order not to have to wait for the time to pass.
I used the card with "Fond insuffisants" here : https://docs.stripe.com/testing?testing-method=card-numbers#authentification-et-configuration, then I used the Test Clock to renewel the subscription. I have received a customer.subscription.updated with status = active, is this normal ? Should I not have a status = unpaid with this card ?
It will make a few attempts before marking the Subscription as unpaid.
I also don't think you should be able to add this card to a Subscription, since it is supposed to always fail. That's why I suggested using 3DS card - it will work for on-session payments, when you create the Subscription, but will fail for the subsequent Subscription renewals.
The card is in the "Authentication 3D Secure" section, how could I know it's not a 3DS card ? Which one should I use in this case ?
I suggest using this one
Ok I get it, I didn't used test clock correctly, thanks for the help !
Happy to help.
I have another question, sorry ! Is this normal that when I set a card 42424242424242 with a expiration date to 12/2024, and then I renewel the subscription the 25/03/2025, that the renewel is ok ? How to configure a card that expires between the subscription creation period and the renewal period? So I can test that the renewel didn't work.
I guess the expiry date for test cards don't matter. There's a test card that declines with Expired card decline, however, again, you won't be able to test it with Subscription renewal because it will fail when you try to attach it. So the only way to test failure on Subscription renewal is 3DS cards.
Yes but I can't set a card which is declined on a customer profile in "default payment method", the card is refused instantly, I wan't to get the rejection when I set the renewel, how can I do that ?
That's what I was saying above, it's impossible, unfortunately. You can only replicate this flow with 3DS card.
Ok but this only test that the 3DS didn't worked, right ? Not that the card is perished or has insufficient funds?
Yes, but the only difference will be the error code.
Ok thanks, that the point I didn't get but ok, I think I have to trust your process.
Yes, unfortunately, there's no way to test other error codes right now.