JavaScript SDK events cart.confirmed

We did custom payment integration and after successful payment we are submitting request at this url

https://payment.snipcart.com/api/private/custom-payment-gateway/paymente

In our Ui we register cart.cnfirmed event and expecting this event to be fired. but event is not fired.

we just want an orderId after successful payment. please help us on that !

When integrating a custom payment gateway, the javascript SDK is not available. The SDK is used solely within the cart. When the payment is completed, you should be redirected from the custom payment page to the order completed page (of the cart). The id of the order will be in the url.
Ie: https://yourwebsite.com/#/order/ORDER_ID

We did custom payment gateway integration in our Snipcart integration. After successful payment we are receiving the URL with payment-session id and it redirected to order detail page.

In this whole process, don’t know how to get the OrderId. As we have to show our custom order detail page (we don’t want to redirect to snipcart order detail page) with other captured information for which we need the OrderId.

Is there any way to get the OrderId in custom payment gateway integration process?

@lea after successfull payment snipcart return this url ,but this url in last transaction id not orderId, please tell me how to get order id

https://payment.snipcart.com/redirect/{public key}/authorize/e78f7ab-f73d5a67-b0dc-460d-ac0e-7396c2c5d3dd

When order completed, our customer get an email from Snipcart. And in our part we are receiving the URL which returns the value like https://payment.snipcart.com/redirect/{public key}/authorize/{paymentSessionId}.

Now how we can provide the order tracking functionality to our customer.

This is where we are stuck. We are planning to save OrderId with Invoice Number and Email in our database. So that our customer can enter the invoice number and email in our tracking page and we will get it’s OrderId and then based on the OrderId we can get the Order’s current status using Snipcart API.

I’d recommend using our Webhooks for this. When a new order is completed, you can receive the order details via a HTTP request. Documentation for this can be found here.

I’m pretty sure this would be the way to go here.

Let us know if that helps!