Skip to main content
Render the Buy button frame into your UI. The frame renders a payment button — card, Apple Pay, or Google Pay, depending on what’s available — and runs the buy pipeline on tap. Use it when you want a single payment button instead of orchestrating individual payment-method frames yourself.
The buy button covers card, Apple Pay, and Google Pay. For bank transfers (SEPA), render your own button and open the headless Buy frame with client.setupBuy() instead.
Like the headless Buy frame, the buy button can emit a challenge event mid-pipeline. Render a separate challenge frame using client.setupChallenge() at the URL from the event payload.
Setup buy button

Parameters

This method does not require a separate auth token. The client uses stored credentials from an active connection.

BuyButtonEvent

onEvent receives events as the buy pipeline progresses.

FrameTransaction

FrameTransaction is a discriminated union — the failure variant carries failureReason, the non-failure variant always carries id. Pass id to client.getTransaction() to poll for the final status.

BuyButtonEventError

Result

client.setupBuyButton() returns a Result<BuyButtonFrame, SetupBuyButtonError>.

Result envelope

Result<BuyButtonFrame, SetupBuyButtonError>

BuyButtonFrame

SetupBuyButtonError

types.ts