Developer forum

Forum » Ecommerce - Standard features » Stripe checkout and callbacks

Stripe checkout and callbacks

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

We're seeing some orders using Stripe fail when the customer closes the browser when on the Stripe site. When the happenes, the payment is completed but the ordert in DW is not. Does Stripe use server-to-server callbacks or does it solely depend on the browser redirect? If the former, is there anything we need to set up in Stripe for that? The docs don't mention it.

Thanks!

Imar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Imar

Stripe does not automatically do server-to-server but has to be configured to use a webhook - that needs to be setup in Strip admin panel. Dynamicweb does not have an endpoint that understands that webhook, so currently it is not possible.

When starting a payment with Stripe, a payment intent is created in Stripe - but we do not store a reference for it. I think it is possible to query the Stripe API like this: 

/v1/payment_intents/search?query=metadata['orderId']:'12345'

and then flip the order to complete if it is not and the intend is completed.

So the correct solution would be to add a webhook endpoint in DW that understands the Stripe webhook for the 3 scenarios DW understands - payments, savedcards and recurring.

BR Nicolai

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks Nicolai. So for the time being, until I build something custom, we do depend on the user leaving the brower open as the intend ID is sent back to DW aftewr payment completes where it's looked up to complete the order?

Imar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

That is correct.

Is this a DW9 or a DW10

 

You must be logged in to post in the forum