Skip to content

WIP: Embedded Buy: Feat - Cards payment option added to Moonpay Embedded-buy - #2380

Draft
Gamboster wants to merge 11 commits into
bitpay:developfrom
Gamboster:feat/moonpayEmbeddedCardsPaymentOpt
Draft

WIP: Embedded Buy: Feat - Cards payment option added to Moonpay Embedded-buy#2380
Gamboster wants to merge 11 commits into
bitpay:developfrom
Gamboster:feat/moonpayEmbeddedCardsPaymentOpt

Conversation

@Gamboster

@Gamboster Gamboster commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Adds Cards as a payment option for the MoonPay embedded (headless) buy flow,
alongside the existing Apple Pay support. No SDK: the flow is built on the
MoonPay frames protocol, same as Apple Pay.

Flow:

  • The checkout screen lists the customer's saved cards
    (GET /platform/v1/payment-methods). If there are none, it opens the
    add-card frame (/platform/v1/add-card) to collect the card.
  • Once a card is selected, the quote is re-requested with that card's
    paymentMethodId, so the amounts, fees and disclosures shown on screen come
    from the same quote that will be charged.
  • Paying mounts the headless buy frame (/platform/v1/buy) with that quote's
    signature. Challenges (3DS/SCA) reuse the existing challenge frame.
  • Multiple saved cards can be picked from a bottom sheet; unusable cards
    (expired/declined/blocked) are listed but not selectable.

Cards embedded only works through MoonPay's connect flow. If the customer
isn't connected, or another partner is selected, the flow falls back to the
standard (Kayak) MoonPay flow.

Config: embeddedBuyDisabled stays as the global kill switch for the embedded
flow. On top of it, each embedded payment method can now be disabled
independently via moonpay.config.paymentMethods.applePayEmbedded.disabled and
.cardEmbedded.disabled.

Also in this PR:

  • Embedded buy is no longer restricted to iOS/US: it is now available in all
    MoonPay supported countries except the UK, and Apple Pay's device support
    check only gates Apple Pay instead of the whole flow.
  • MoonPay transaction details now reconcile fiat_total_amount (the amount
    actually charged) instead of fiat_base_amount, which matters for cards
    because the final total can differ from the quoted one.
  • Adjustments to the "Add cards" WebView modal to adapt its behavior on Android.

@Gamboster
Gamboster marked this pull request as draft September 8, 2026 18:45
@Gamboster
Gamboster force-pushed the feat/moonpayEmbeddedCardsPaymentOpt branch from e584dfa to 20220af Compare September 8, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant