You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the examples given for creating and retrieving a payment, we need the payment.id to retrieve the status of a payment. But we can't return any data while giving a 302 redirect with response.writeHead(302, { Location: payment.getPaymentUrl() }) . So what is a good flow to return the paymentid back with the API call? This paymentid is needed to show the current status of the payment on the frontend.
One option is not automatically redirect and return JSON data - any other way?
The text was updated successfully, but these errors were encountered:
The payment flow is asynchronous so you can't process the payment status directly after you create the payment and redirect the customer to the payment URL. When the payment changes state Mollie will call your webhook URL. https://github.com/mollie/mollie-api-node/blob/master/examples/2-webhook-verification.js#L42 On the webhook URL you can load the payment and process the state.
In the examples given for creating and retrieving a payment, we need the payment.id to retrieve the status of a payment. But we can't return any data while giving a 302 redirect with
response.writeHead(302, { Location: payment.getPaymentUrl() })
. So what is a good flow to return the paymentid back with the API call? This paymentid is needed to show the current status of the payment on the frontend.One option is not automatically redirect and return JSON data - any other way?
The text was updated successfully, but these errors were encountered: