#jairo.paymefy-checkout-webhooks
1 messages · Page 1 of 1 (latest)
Hi 👋 I'm not exactly sure I'm grasping what you're looking for, but I think setting up a webhook endpoint may be it.
https://stripe.com/docs/webhooks
https://stripe.com/docs/payments/checkout/fulfill-orders
the thing is that I dont want to modify my infrastructure using the stripe client
so I guess maybe there is a way just specifyng a callback url
Pasting your additional context here also:
Also I want to hide some payment methods and the email address box, is that possible?
If you want to limit the payment methods offer, you can explicitly declare that via thepayment_method_typesparameter:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types
It is not possible to suppress the email address field, but you can prepopulate it by either passing the ID of an existing Customer or by providing the email address in the customer_email field:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_email
You control where the customer is directed after they complete the checkout process via the success_url and cancel_url parameters. I would not recommend relying on those for triggering your downstream processes though, if the customer unexpectly loses network connectivity and can't access those pages those processes may not kick off.
so, its absolutely mandatory to install the stripe cli to receive the async response from stripe?
Not at all, it's just for testing
then, If I create an endpoint to receive the async stripe response, how i configure it?
Can you elaborate on what part of that process you're unclear on? You would need to create an endpoint on your server, how you do so and how you configure it is up to you and depends on the web framework that you're using in your server.
jairo.paymefy-checkout-webhooks
I just created a checkout page, with success url and cancel url, everything works fine.
What is still missing is that I want to fulfill my order, so Im following this guide https://stripe.com/docs/payments/checkout/fulfill-orders
But I don’t understand how it works, seems like I have to install a stripe client to get the responses, instead of get a POST request or something similar.
The desired thing for me, will be to send to the checkout session creation, the url when I have to receive the data to fulfill my order. Seems like this is not how it works?
With webhook endpoints, you build an endpoint on your server, that accepts requests and responds to them. You then register that endpoint with Stripe through your dashboard (or via the API). When registering the endpoint you decide what Events to have us send to it, whenever those Events occur (for this scenario checkout.session.completed would be a good choice). Then when those Events occur, we send a request to your endpoint. That Event will contain the Checkout Session object so, once you've confirmed the validity of the request and send a response acknowledging you successfully received it, you can then use that data to trigger your downstream processes.
The Stripe CLI that is used in those docs, is used to trigger test Events, but that is optional. You can also test by going through your test flow which will generate Events.
ok, many thanks toby
Any time!
just one more question please
Sure
how can i register an endpoint using the API?
That endpoint, along with a list of the parameters that it accepts can be found in our API spec here:
https://stripe.com/docs/api/webhook_endpoints/create
ok, thanks for your help, I really appreciate it 👍
Happy to, you know where to find us if any more questions come up.