#hun_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/1448344283571556577
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
You can create a checkout session in setup mode so that you can attach the 4000000000000341 (decline after attaching) card to the customer: https://docs.stripe.com/testing#declined-payments . Then set it as the default payment method on the customer and advance time
Two follow up questions:
-
Why setup mode? Should I be using a
subscriptionmode instead ofsetupfor live? I'm assuming using setup mode here is only intended for triggering the event after advancing the clock yes? There are some workflows that fires off internally, which is the reason why I've always just used the 4242 test card to run from start to finish, I'm not sure ifsetupmode is any different. Please correct me. -
I don't see an option on the dashboard to attach an existing customer to a test clock. Where should I be looking?
- You said it's for an existing subscription. Setup mode checkout sessions simply allow you to set up a payment method for future payments for a customer. https://docs.stripe.com/payments/save-and-reuse
- You can't. You need to create the customer with a test clock: https://docs.stripe.com/billing/testing/test-clocks/api-advanced-usage?dashboard-or-api=api
So really what you need to do here is create test clock and customer first
Then pass the customer id to the checkout session creation request so it's used
So complete flow would look like: