Airwallex sandbox environment

I have to do sandbox environment for Airwallex payment gateway. So I need information about that.

I was looking at various methods to integrate Airwallex Hosted Payment Page.

The simplest option being add a standard button with custom Javascript.

Here is the code

const airwallexJs = document.createElement('script');
    airwallexJs.onload = () => {
    Airwallex.redirectToCheckout({
          env: 'demo',
          mode: 'payment',
          currency: 'replace-with-your-currency',
          intent_id: 'replace-with-your-intent-id', // Required, must provide intent details
          client_secret: 'replace-with-your-client-secret', // Required
          theme: {
            // Must provide theme to display the checkout page properly
            fonts: [
              // Customizes the font for the payment elements
              {
                src:
                  'https://checkout.airwallex.com/fonts/CircularXXWeb/CircularXXWeb-Regular.woff2',
                family: 'AxLLCircular',
                weight: 400,
              },
            ],
          },
        });
    };
    airwallexJs.src ="https://checkout.airwallex.com/assets/elements.bundle.min.js";
    document.head.appendChild(airwallexJs);

1 Like

thanks for providing response, but I have to test for only backend using spring boot framework.

WeWeb creates a frontend app, so everything on the backend needs to be handled there.

The WeWeb app can communicate with this backend through API calls though.

thanks, but what should be required parameters for payment and how to add redirect ULR?

Hi WeWeb,
can you provide detailed integration of the Airwallex Hosted Payment Page with required parameters like amount,currency etc.

Not sure I understand the direction you are going but I’m adding this as I recently investigated integrating Airwallex HPP. There is sufficient documentation to assess a variety of integration types that might suit your needs.

In short;

  • Make an api request to obtain an access token
  • Make a request to create a payment-intent. It’s in this call you can pass your frontend variables; amount, currency etc.
  • Call the HPP by using the code snippet I provided above, and replace the ‘intent_id’ and ‘client_secret’ from the response of the previous calls.

Disclaimer; I had originally intended to utilise airwallex for accepting online payments as I already have a global account, but as a solo founder (and non developer) I discontinued for various reasons at this point in time. I hope to utilise it in the future as it can significantly reduce transaction and currency conversion costs.

Here are some helpful resources for others investigating;
Airwallex payment demo

Airwallex Hosted Payment Page
https://www.airwallex.com/docs/online-payments__global__google-paytm__hosted-payment-page

hi,
thanks for helping. If anything is required I willl let you know.

Hi,
now I can be redirected to HPP but which response will I get after successful payment? Like payment ID, status etc.