Skip to content
← Back to activity

Public problem

Airwallex redirectToCheckout produces "undefined" error on hosted payment page

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Calling Airwallex.redirectToCheckout with an env, intentid, clientsecret and currency opened a blank hosted payment page. The URL contained /checkout/undefined, with the literal word undefined where the intent id should be. The payment intent itself was being created fine and showed up in the demo dashboard.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The undefined in the URL means your intent id or client secret was undefined when redirectToCheckout ran. A maintainer asked the reporter to double check data.id and the client secret value, and the reporter confirmed that was exactly it: while fighting the library import they had overlooked their own data structure and were passing undefined values in.

So if you land on a blank page at something like checkout-demo.airwallex.com/#/standalone/checkout/undefined, log the values you pass in before the call (env, intent id, client secret, currency) and make sure none of them is undefined. Fix the data plumbing and the checkout page loads normally.

Source: https://github.com/airwallex/airwallex-payment-demo/issues/76