SDK Integration Overview

Build a highly customizable, seamless checkout payment experience with Onerway SDK (Payment Intents).

Overview

Use Web SDK integration when you need a merchant-hosted checkout UI on your own site while delegating sensitive payment data handling and 3D Secure/SCA flows to Onerway.

Compared with Hosted Checkout, Web SDK gives you stronger UX and flow control, but requires frontend-backend orchestration. Compared with Direct API integration, Web SDK preserves customization while reducing PCI DSS scope (typically SAQ A) and implementation complexity.

Integration profile

Integration complexity
Checkout form
Embedded components (UI Elements) + merchant-owned checkout flow
Technical requirements
Front-end/back-end collaboration and baseline payment state management

Core strengths and ideal scenarios

  • Deeply customize checkout pages while preserving brand consistency
  • Let Onerway handle sensitive card data (PAN) to reduce local PCI DSS scope
  • Support advanced transaction models including card tokenization, recurring subscription charges, and authorization

SDK capabilities

  • Initialize checkout instances with session identifiers such as transactionId
  • Seamlessly integrate card payments and payment methods such as Apple Pay and Google Pay (APMs)
  • Natively support multidimensional scenarios including DIRECT, TOKEN, and SUBSCRIBE
  • Provide rich CSS variables and theme customization interfaces to match merchant UI standards

Web SDK payment interaction sequence

Use the following implementation sequence:

  1. Collect checkout context: The merchant frontend collects base business parameters such as amount, currency, merchant order ID, and user context.
  2. Request transaction creation: The frontend securely sends the checkout request to the merchant backend.
  3. Initialize a payment intent: The merchant backend calls the Onerway order API and retrieves the unique transaction credentials: transactionId and redirectUrl.
  4. Return session identifiers: The merchant backend returns required parameters such as transactionId and redirectUrl to the frontend.
  5. Load the component library: The merchant frontend loads the official Onerway JavaScript SDK.
  6. Mount the checkout component: The frontend initializes the SDK with transactionId and redirectUrl, then mounts it to the target DOM container.
  7. Collect payment inputs and authenticate: The customer enters payment details in SDK-rendered fields. The SDK handles encrypted transmission and triggers Strong Customer Authentication (SCA), including 3D Secure challenge flows, when required by risk strategy.
  8. Handle frontend status feedback: Use synchronous SDK events only for customer-facing states such as processing, success, or failure.
  9. Finalize payment state on the backend: Treat verified webhook notifications as the authoritative transaction result. Use query/polling only as a complementary recovery mechanism to support fulfillment, accounting, and shipping workflows.

Supported scenario capabilities

Web SDK basic integration and UI customization

Learn how to load the SDK, initialize instances, manage component lifecycles, and deeply customize form styles through CSS properties.

Integration guideUI customization
One-time payments (DIRECT / AUTH)

Designed for common one-time charge scenarios (Sale/Auth). Use SDK components to securely collect card data and complete authorization and capture.

One-time paymentAuthorization and capture
Secure card binding and tokenization (TOKEN)

Generate and store payment tokens during or outside checkout to reduce repeat-purchase friction and improve conversion.

TokenizationFaster repeat checkout
Subscription (SUBSCRIBE)

Support flexible recurring billing plans for subscription payments.

Auto-renewalAdvanced scenario

Integration boundary comparison

DimensionHosted CheckoutWeb SDKDirect API
Page controlLow (rendered and hosted by Onerway)Medium to high (merchant controls layout; core payment form is component-based)Very high (full-stack merchant-built flow)
Engineering effortVery low (backend redirect integration only)Medium (frontend-backend coordination for state and event handling)High (requires low-level payment routing and exception handling)
PCI DSS scopeSAQ ATypically SAQ A (subject to implementation scope and compliance assessment)At least SAQ D or higher (high compliance cost)
Recommended team profileLimited engineering resources, fast go-live validationTeams prioritizing branded native UX with solid engineering capabilitiesTeams with professional payment gateway engineering and high compliance maturity
Typical business scenariosStandard DTC e-commerce, outsourced business linesBrand flagship checkout and unified cross-channel checkout UIPlatform-level payment routing (Payment Orchestration)