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
TS Definitions
TS Definitions
types.ts