Search...
Log inGet started
Airwallex logo
Home
Core API
Payments
Transactional FX
Payouts
Issuing
Back to home
OverviewChoose your payments solutionGet started with payments
Online payments
Invoice integrations
Payment methods
Payment methods overviewGlobal
CardsApple Pay
Enable Apple Pay
Hosted Payment PageEmbedded ElementsDrop-in ElementNative APIMobile SDKUse your own certificate
Google Pay™
PayPal
Paysafecard
Skrill
Airwallex Pay
Klarna - BETA
EU & UK
APAC
NORTH AMERICA & LATAM

Use your own certificate

Airwallex allows you to use your own certificate to decrypt payment token received from Apple Pay. This is especially useful when you have an active integration with multiple gateways and would like to manage the token decryption by yourself.

Before you begin

  1. Create a developer account on Apple Pay developer portal. Ensure you have an active email address linked to the account to be able to receive notifications on certificate expiry.
  2. Enable Apple Pay payment method for the merchant account at Airwallex. You are not required to add additional domain information on the Airwallex web app when using your own certificate.
  3. Create a merchant identifier on the Apple Pay developer portal, which uniquely identifies you as a Apple Pay merchant. Note that this merchant id never expires.
  4. Create a payment processing certificate that will be used to encrypt the payment token returned from the Apple Server. This certificate is linked to the merchant identifier created in Step 3. This step requires creation of Certificate Signing Request (CSR), covered in the above link, post which a certificate will be issued by Apple.
  5. (Optional) Enable Apple Pay on the developer portal for your mobile application. This step is optional and required only if you would like to support mobile applications. It is not required if you wish to process web-based transactions only.
  6. Validate your merchant domain so that a secure connection can be established between your domain and the Apple servers.
  7. Create a merchant identity certificate that will enable you to request a Apple Pay payment session . Ensure you select the merchant identifier created in Step #3 while creating a merchant identity certificate. You will also be required to generate a CSR file to be able to receive a merchant identity certificate.

Step 2: Request a payment session

Request Payment session for each Apple Pay transaction and complete merchant validation using the output received from the Payment session response.

Step 3: Decrypt the payment data

Decrypt the payment data using the payment processing certificate based on the event OnPaymentAuthorized

Step 4: Confirm the PaymentIntent

Confirm the PaymentIntent using the Airwallex API API using the decrypted payment token information.

Example code

JSON

Subscription payments

Save payment details for future 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 applepay payment method is active with recurring transaction mode, the merchant can choose Apple Pay as payment methods for subscriptions. Refer sample response below

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

  1. Apple Pay payment request - As explained at the start of this page, you need to create ApplePayPaymentRequest and include the information about subscription payment along with lineitem details. See below samples :

Fixed Subscription Payment with deferred start

Variable Subscription Payment with deferred start

  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 applepay payment method is active with recurring transaction mode, the merchant can choose Apple Pay as payment methods for subscriptions. Refer sample response below

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

  1. Apple Pay payment request - As explained at the start of this page, you need to create ApplePayPaymentRequest and include the information about subscription payment along with lineitem details. See below samples :

Fixed Subscription Payment with immediate start

Variable Subscription Payment with immediate start

  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
On this page