@vigilkids/checkout-provider-hosted-redirect
v0.1.5
Published
Provider-neutral hosted checkout redirect adapter
Maintainers
Readme
@vigilkids/checkout-provider-hosted-redirect
Provider-neutral browser adapter for the immutable hosted_redirect@1 checkout execution profile. OneX owns provider API calls, provider credentials, order creation, return/cancel authority, and payment truth. This package validates the server-issued HTTPS action, persists no provider data, and performs the browser navigation.
import { HostedRedirectProviderAdapter } from '@vigilkids/checkout-provider-hosted-redirect'
const hostedRedirect = new HostedRedirectProviderAdapter()The adapter requires the server-owned operation expiry and a navigation guard that can prove bounded return authority before leaving the checkout origin. Standalone runtimes persist the checkout credential only in a PayKit-origin, one-time, TTL-bound sessionStorage return record bound to the launch, operation, payment attempt, provider, profile, and result expiry. A successful authoritative return clears the record immediately; retryable failures retain it until expiry, while a missing or invalid record uses product-owned PKCE recovery. Same-origin BFF consumers verify their server-reserved transaction through the guard.
The adapter publishes an immediate, merchant-owned interaction policy because the checkout button activates the server-issued redirect. It contains no provider SDK, provider secret, provider-specific callback parser, or payment business rule. A second hosted checkout provider is enabled through OneX configuration and the same execution profile without changing this package.
