Embed a pre-built checkout element
Drop-in element is a pre-built checkout element that lets you accept multiple payment methods with a single integration. Whether you’re just collecting card payments or using local payment methods, the Drop-in element provides an easy solution to build a customized payments experience. Accepting more payment methods can help your business expand its global reach and improve checkout conversion.
Key features include:
- Automatically adjusts input fields to collect information based on the payment method and country.
- Reduces friction for card payments with input validation, styling and error handling.
- Adds new payment methods to your payment form without requiring code changes in your integration.
To view the checkout experience offered by the Drop-in element, go to the Airwallex demo book store , add items to your shopping cart and click Checkout.
Checkout flow
Choose whether to charge the shopper in a single session on your site or save their payment details for future charges.
Supported features
You can use the following features in your Drop-in element integration.
Style and appearance customization
Localization
3D Secure authentication
Device fingerprinting
Payments for platforms
Fraud protection
FAQ
What payment methods are supported in a Drop-in element integration?
By default, all payment methods activated on your Airwallex merchant account are available to the shopper. To retrieve the list of payment methods supported for your account, call Get available payment method types API.
The payment methods displayed on the payment page will be filtered based on the following fields:
For details on which currencies and countries are supported for each payment method, including integration information, refer to the Payment Methods section.
By default, the order of payment methods on the payment page will be based on the order configured in Get available payment method types API, with applepay, googlepay and paypal displayed at the top if they're supported.
If you want to further restrict the payment methods offered to your shoppers, you can pass the methods[] JS field in createElement(). The payment methods will appear in the order specified in this field.
Can I offer Apple Pay via Drop-in element integration?
Yes, Apple Pay is supported via Drop-in integration. Ensure that your merchant account is enabled for Apple Pay and you have added your domain information on the Airwallex web app > Payments > Settings. For more information, see Enable Apple Pay. Once registered, you can pass applePayRequestOptions JS in createElement to offer Apple Pay. Note that countryCode is mandatory.
1const dropInElement = createElement('dropIn', {2 intent_id: intent.id,3 client_secret: intent.client_secret,4 applePayRequestOptions: {5 countryCode: 'US',6 buttonType: 'buy',7 buttonColor: 'white-with-line',8 },9 currency: 'USD',10});
Can I offer Google Pay via Drop-in element integration?
Yes, Google Pay is supported via Drop-in integration. Ensure that your merchant account is enabled for Google Pay and you have added your domain information on the Airwallex web app > Payments > Settings. For more information, see Enable Google Pay. Once registered, you can pass googlePayRequestOptions JS in createElement to offer Google Pay. Note that countryCode is mandatory.
1const dropInElement = createElement('dropIn', {2 intent_id: intent.id,3 client_secret: intent.client_secret,4 googlePayRequestOptions: {5 countryCode: 'US',6 merchantInfo: {7 merchantName: 'Example Merchant',8 merchantId: '0123456789',9 },10 buttonType: 'buy', // Indicate the type of button you want displayed on your payments form. Like 'buy'11 }12});