Search...
Log inGet started
Airwallex logo
Home
Core API
Payments
Transactional FX
Payouts
Issuing
Back to home
OverviewChoose your payments solutionGet started with payments
Supported currencies
Online payments
Invoice integrations
Payment methods
Payment Methods OverviewGlobal
CardsAirwallex Pay
Apple Pay
Google Pay™
Enable Google Pay™Hosted Payment PageEmbedded ElementsDrop-in ElementNative API
Mobile SDKEnable express checkoutTest your integration
Klarna
Afterpay / Clearpay
PayPal
Skrill
EU & UK
APAC
NORTH AMERICA & LATAM

Native API

Our Native API integration allows you to handle your front-end interactions completely, this gives you the desired flexibility. However, this also means that you need to handle a few interactions with Google in order to support Google Pay™.

Events & functions you need to handle in integration with Google Pay API:

  1. isReadyToPay : This function is to determine a user's ability to return a form of payment from the Google Pay API.
  2. LoadPaymentData : This method presents a Google Pay payment sheet that allows selection of a payment method and optionally configured parameters. This method must be called while the browser processes an activation behavior as a result of a click event.

Identify your payment processor

You need to identify the Payment processor in the TokenizationSpecification message to google. Google will use these identifiers to encrypt the Payment token using the Public key of the Payment processor.

Sample code

It is important to note that you can use Airwallex certificates to process Google Pay payments only on the web, if you are using Native API to process mobile based transactions then you should have your own Google Pay Gateway ID & certificates.

Below are the steps you need to follow to integrate Google pay via Native API:

  1. Create a payment Intent Create a Payment Intent through the Airwallex API - see full details here API.

  2. Confirm the payment Intent Confirm a Payment Intent through the Airwallex API - see full details here API. Encrypted Payment token data received should be included in this API call.

Endpoint: POST pci-api-demo.airwallex.com/api/v1/pa/payment_intents/{{payment_intent_id}}/confirm

Sample request

  • payment_data_type : Type of the payment data details. One of tokenized_card, encrypted_payment_token
  • encrypted_payment_token : A UTF-8 encoded, serialized JSON object with the keys specified. Refer this link for more information

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.

Save payment details without payment

  1. Create customer - You need to create customer API if it is a new customer

  2. Get available payment method types - If Google Pay payment method is active with recurring transaction mode, the merchant can choose Google Pay as payment methods for subscriptions. Refer sample response below

Endpoint : GET /api/v1/pa/config/payment_method_types

  1. Google Pay payment data request - As explained at the start of this page, you need to create Payment Data Request and include the information about subscription payment along with lineitem details. See below sample :
JSON
  1. Create a Payment Method - Create a Payment method through the Airwallex API - see full details here API. Sample below:
JSON
  1. Create a Payment consent - Create a Payment consent through the Airwallex API - see full details here API. See sample request below:

    JSON
  2. Verify Payment consent - Verify the Payment consent through the Airwallex API - see full details here API. See sample below:

JSON

Save payment details with payment

  1. Create customer - You need to create customer API if it is a new customer

  2. Get available payment method types - If googlepay payment method is active with recurring transaction mode, the merchant can choose google Pay as payment methods for subscriptions. Refer sample response below

Endpoint : GET /api/v1/pa/config/payment_method_types

  1. Google Pay payment data request - As explained at the start of this page, you need to create GooglePayPaymentDataRequest and include the information about subscription payment along with lineitem details. See below sample :
JSON
  1. Create a Payment Method - Create a Payment method through the Airwallex API - see full details here API. Sample below:
JSON
  1. Create a Payment consent - Create a Payment consent through the Airwallex API - see full details here API. See sample request below:

    JSON
  2. Create a Payment Intent - for the order with the customer ID. This step is only needed for shopper wishes to pay for the first order in the payment method binding process.

  3. Confirm Payment Intent - Confirm the Payment intent through the Airwallex API - see full details here API. This request should refer to PaymentConsent ID created in Step#5, see sample request below:

JSON