#__rob1986__

1 messages · Page 1 of 1 (latest)

glossy bearBOT
mossy basalt
#

Recommend using webhooks for this

#

So on successful payment, your webhook endpoint would just submit the required details

fast mesa
#

is there no way i can submit the form via ajax and then redirect to return_url?

#

the cms i am using doesnt have an easy way to make use of webhooks

mossy basalt
#

So it's a physical form the customer has entered info in on the checkout page?

fast mesa
#

yes

mossy basalt
#

So how does the CMS accept this info? Via an api call?

fast mesa
#

its just a normal form that submits to a particular url, the contents of the form are details of the order

#

i was hoping to pass 3ds, make the ajax call on success, then on the ajax success redirect to the return url

mossy basalt
#

There's not a way to do that exactly. What you can do is store the data the customer enters in the form and then via a webhook endpoint make the ajax call to your cms with that data

fast mesa
#

at what point would i make the ajax call ?

#

from within stripe.confirmPayment ?

mossy basalt
#

No I'm saying you would make that ajax call in the webhook handler code

#

Assuming you only want to make that call on successful payment (after 3ds)

#

Well not ajax

#

But it would be an api call to submit that data (which you should be able to do through the backend too i'd imagine)

#

Otherwise, you could rely on your return url (but that's not recommended in case of browser crashes, accidental closures, etc)