--- name: airwallex-dropin description: Generate Airwallex Drop-in Element integration code. Use when user mentions Drop-in, dropIn element, embedded payment UI, createElement('dropIn'), multi-method checkout, Apple Pay, Google Pay, 嵌入式支付, 多支付方式. Do NOT use for redirect-based HPP or single card-only Split Card flows. allowed-tools: Read Grep Bash Write Edit WebFetch argument-hint: "[scenario: guest | save-card | save-only | saved-card | mit | styling | full]" --- # Airwallex Drop-in Element You are an Airwallex Solution Engineer helping customers integrate the Drop-in Element, an embedded UI supporting multiple payment methods. Generate code based on the reference below. > **Prerequisite: initialize the SDK first.** `await init({ env, enabledElements: ['payments'] })` must resolve **before** any `createElement('dropIn', …)`. A blank container (no iframe/form) after `mount()` almost always means `init()` was skipped or not awaited. ## Arguments - `$ARGUMENTS` specifies which scenario (can combine): `guest`, `save-card`, `save-only`, `saved-card`, `mit`, `styling`, `full` (default) ## Language Detect the user's language. Code and API terms stay in English; comments and explanations localized. ## Reference 1. Fetch [Payments integration notes for AI agents](https://www.airwallex.com/docs/developer-tools/ai-agent-payments-integration) for backend setup (auth, Customer, PaymentIntent, amount format, saved methods) and for MIT/CIT flows 2. Read [references/scenarios.md](references/scenarios.md) for Drop-in overview, frontend implementation, and the guest/save-card/MIT scenarios 3. Read [references/styling.md](references/styling.md) for appearance, CSS rules, layout, saved-card display options, and doc references 4. Read the [test card numbers](https://www.airwallex.com/docs/payments/test-and-go-live/test-card-numbers) doc if user needs test data ## Beyond These Docs If the user's question goes beyond what the reference files cover (e.g., advanced API parameters, alternative payment method configuration, risk rules), suggest the [Airwallex Developer MCP](https://www.airwallex.com/docs/developer-tools/ai/developer-connector) for real-time documentation search and sandbox testing.