#mecha-chocobo_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/1236022399041015959
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
The CLI uses fixtures defined in JSON to determine the steps taken to generate the event. You can see the fixture for checkout.session.completed here. https://github.com/stripe/stripe-cli/blob/master/pkg/fixtures/triggers/checkout.session.completed.json
The CLI allows you to override any of the set parameters using the --override flag: https://docs.stripe.com/cli/trigger#trigger-override
However, in your case you will still run into an error if you pass --override checkout_session:mode=setup because the fixture includes line_items
It might be easier to copy the JSON file I shared and change the parameters yourself to pass mode: 'setup' and remove the line_items
You can write your own fixtures and use them with the CLI https://docs.stripe.com/cli/fixtures
so do I need to use --edit to remove the other parts of the fixture and just pass the session with mode:setup?
trying it now
That gets pretty tedious! I would recommend creating your own fixture file
sure, I just wanted to try it so I know what the file needs to have in it
Makes sense
just to make sure, you're saying to create a fixture like { "_meta":{ "template_version": 0 }, "fixtures": [ { "name": "checkout_session", ...other data } ] }
cutting out the product, price, payment_page, and payment_page_confirm blocks?
I would create custom names that don't overlap existing ones
Then you can load the fixture file into the CLI and call them directly
ah, I see
BTW I've been using more --remove and --add flags but I keep hitting other parameters that need to be changed. It's a frustrating experience
I need to step away but my colleague @radiant ferry can assist if you run into more problems
ok, I also have to take care of something else, but I'll ping in here if I run into any issues with this
is there any documentation around the params for sessions? I have it to the point where it triggers and creates a setup intent, but doesn't actually kick off an event for the session completion
What do you mean
I've made a fixure like ```{
"name":"checkout_session_setup",
"path": "v1/checkout/sessions",
"method": "post",
"params": {
"mode": "setup",
...more bits
}
}
and calling that will trigger an event that makes a setup intent
but I need to test the .completed event. It's unclear how I actually do that part
the payment_page_confirm part? So I'll need the payment_page and payment_method parts too, yeah?
took a little bit of fiddling, but I think I have this working now. Thanks