Skip to main content
Waffo provides the frontend SDK @waffo/payment-sdk, which supports directly integrating payment and card binding capabilities into merchant pages.

Installation

Initialization

Feature overview

Card tokenization (tokenizationSubmit)

The merchant frontend passes plaintext card data to the SDK, which encrypts the data before transmission. With the frontend SDK binding flow, the merchant does not need PCI DSS certification as long as its backend neither retains nor transmits plaintext card data.

Prerequisites

The merchant backend must first call the Generate API to obtain a tokenSessionId.

Submit card

Handle result

If the Generate request includes notifyUrl, Waffo also sends TOKENIZATION_NOTIFICATION when card binding completes, the Token status changes, or Token data is updated. Use result.tokenId to locate and update your local Token record; apply idempotency to duplicate deliveries of the same event, and continue to process later status changes for the same Token. For status and recovery rules, see Token status. For the complete flow, see Card binding and token management.

Embedded checkout (renderIframe)

Embeds the Waffo checkout as an iframe in the merchant page. Suitable for merchants who do not want to build their own checkout UI. Call /api/v1/order/create from your backend, then pass data.orderAction.webUrl from the successful response to mountCheckout below.
Supports:
  • Custom theme colors
  • Custom logo
  • Apple Pay / Google Pay buttons
  • Multiple languages

Checkout appearance customization

The checkout appearance theme (cashierAppearance), language (cashierLanguage), and payment method filtering are configured through the order-creation paymentInfo parameter. For the full value ranges, format, and examples, see Checkout customization.