Prerequisites
- A connected customer (via
client.getConnection()orclient.connect()). - A UI surface where you can render the widget frame (for example, a modal or full-screen container).
Get a quote
Request a quote for the transaction. The widget requires an executable quote with a wallet address. If you include apaymentMethod in the quote, the widget pre-selects
that method. If you omit it, the customer picks one inside the widget.
Supported
paymentMethod.type values include credit_debit_card,
google_pay, sepa_bank_transfer, gbp_bank_transfer,
gbp_open_banking_payment, pix_instant_payment, interac, paypal,
revolut_pay, venmo, and moonpay_balance. If the pre-selected method is
unavailable for the customer, the widget falls back to the payment selection
screen. Passing apple_pay pre-selects the card form instead — use the
headless Apple Pay flow for native
Apple Pay.Render the widget
Pass the quote signature tosetupWidget. The widget handles the
entire purchase flow inside the iframe.
Widget
Transaction statuses
- waitingAuthorization: The transaction has been created but the customer needs to complete an authorization step (for example, 3-D Secure).
- Pending: The payment has been accepted and the assets are being transferred.
- Complete: The transaction is finalized and the assets have been delivered.
- Failed: The transaction has failed. No payment was applied.
Compare payment methods
The widget is one of five ways to run a buy. See Choose a payment method to compare it with Apple Pay, Google Pay, card, and the buy button. UsegetPaymentMethods() to
determine which methods are available and choose the flow that fits your
experience.