Redirect to another Rest API Url with POST data - Node Js

1.9k Views Asked by At

I have a payment gateway Rest API URL. so I want the redirect to the payment gateway URL from my server-side Rest API when after order details successfully saved in the database.

Example

example.com (Client) -> POST Request -> pay.example.com/order(Nodejs) -> redirect with POST data -> paymentgateway.com/pay/xyz (payment gateway)

so how to redirect to the payment gateway website with POST data in Express Js?.

1

There are 1 best solutions below

3
A.Varma On

Have you tried:

res.redirect('https://app.example.io');

https://expressjs.com/en/api.html#res.redirect