Log inGet started
Airwallex logo
Home
Online Payments
Treasury
Transactional FX
Payouts
Issuing
Scale
Open Banking
Developer Tools
API Reference
Home
Online Payments
Overview
Starting with paymentsAirwallex platform overviewOnline payments modelPricing model
Payment Methods
OverviewGlobal
CardsPaysafecardSkrillPayPalApple PayGoogle Pay™
Enable Google Pay™Hosted Payment PageEmbedded ElementsDrop-in Element
Native API
Airwallex Pay - coming soon
EU & UKAPACUS & LATAM

Drop-in Element

Refer to the Drop-in Element integration guide for step-by-step instructions on how to embed multiple payment methods on your checkout page.

Google Pay™ is supported via Drop-in integration. Ensure that your merchant account is enabled for Google Pay on the Airwallex web app > Payments > Settings page. For more information, see 'Enable Google Pay' section. Once registered, you can pass googlePayRequestOptions JS in createElement() to offer Google Pay. Note that countryCode is mandatory.

const dropInElement = createElement("dropIn", {
     intent_id: intent.id,
     client_secret: intent.client_secret,
     googlePayRequestOptions: {
       countryCode: 'US',
       merchantInfo: {
         merchantName: "Example Merchant",
       },
       buttonType: 'buy', // Indicate the type of button you want displayed on your payments form. Like 'buy'
     },
});

Subscription payments

Airwallex allows you to create a PaymentConsent with the shopper to initiate future payments using shopper’s saved payments details. For more information, see Save payment details for future payments . You need to add additional information about the order & terms of the payment to display this information on the payment sheet.

  1. See below example to understand how to setup recurring with Google Pay without payment
createElement("dropIn",{
      mode: 'recurring',
      client_secret: intent.client_secret ?? '',
      currency: 'USD',
      customer_id: 'your customer id',
      ...
      googlePayRequestOptions: {
       countryCode: 'US',
       displayItems:[{
       label: "monthly"
       price: "1"
       status: "FINAL"
       type: "LINE_ITEM"
    }],
   }
})
  1. See below example to understand how to setup recurring with Google Pay with payment
createElement("dropIn",{
      mode: 'recurring',
      intent_id: 'xxx',
      client_secret: 'you client secret',
      currency: 'USD',
      customer_id: 'your customer id',
      ...
      googlePayRequestOptions: {
       countryCode: 'US',
       displayItems:[{
       label: "monthly"
       price: "1"
       status: "FINAL"
       type: "LINE_ITEM"
    }],
   }
})