#jairo.paymefy-checkout-webhooks

1 messages · Page 1 of 1 (latest)

radiant thistleBOT
rich jay
uncut gust
#

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

rich jay
#

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 the payment_method_types parameter:
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.

uncut gust
#

so, its absolutely mandatory to install the stripe cli to receive the async response from stripe?

rich jay
#

Not at all, it's just for testing

uncut gust
#

then, If I create an endpoint to receive the async stripe response, how i configure it?

rich jay
#

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.

uncut gust
#

sure

#

let me try to explain again

rich jay
#

jairo.paymefy-checkout-webhooks

uncut gust
#

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?

Learn how to fulfill orders after a customer pays with Stripe Checkout or Stripe Payment Links.

rich jay
#

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.

uncut gust
#

ok, many thanks toby

rich jay
#

Any time!

uncut gust
#

just one more question please

rich jay
#

Sure

uncut gust
#

how can i register an endpoint using the API?

rich jay
uncut gust
#

ok, thanks for your help, I really appreciate it 👍

rich jay
#

Happy to, you know where to find us if any more questions come up.