Skip to content

Support external submission for embedded CardView #1200

Description

@PrinceD96

Summary

Allow embedded CardView consumers to hide the native submit button and submit the component from a merchant-owned CTA.

Motivation

CardView currently always renders the native submit button and does not expose an imperative submit API. Checkout screens with a persistent or anchored pay button therefore have to show two submit buttons or maintain a local patch of the SDK.

Proposed solution

  • Add card.showSubmitButton?: boolean, defaulting to true, and map it to the iOS and Android Card Component configurations.
  • Expose a CardViewHandle ref with submit(): void, matching the imperative submit pattern in Adyen Web.
  • Keep the existing callback flow: a successful imperative submission invokes onSubmit with the same data and component proxy as the native button.
  • When an embedded submission fails and the merchant calls component.hide(false), stop the native loading state so the same form can be retried; successful completion keeps the existing cleanup behavior.

All existing behavior remains unchanged unless showSubmitButton is explicitly set to false.

Acceptance criteria

  • The native Card Component submit button can be hidden on iOS and Android.
  • An embedded card can be submitted through a React ref.
  • External submission preserves the existing onSubmit callback contract.
  • Failed submissions can be retried without remounting the card form.
  • Default CardView behavior remains unchanged.
  • The public API and configuration docs include the new options.

Alternatives considered

Keeping the native button visible does not work for layouts that already have a primary checkout CTA. Reimplementing card fields outside Components or patching the package locally adds unnecessary integration and maintenance cost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions