Web Integration Overview
The PayUp Web Integration API powers the hosted checkout experience and the browser SDK. Use this guide to understand the sequence of calls and where to find schema-level details.
Flow Summary
Web / storefront integration
Initialize the SDK
CallPOST /v1/tokenizefrom your storefront with thetk_client token (x-client-tokenheader) and the browser'sOrigin. A scoped frontend creation SDK token is returned.Create the session
Submit linked products (storeCode+quantity) toPOST /v1/checkout/web/sessionwith the creation token. Inline priced products are not allowed from the browser.Redirect the shopper
Send customers to the returnedredirectUrl. It includes?sdk_token=with a session-scoped checkout token (limited to OTP permissions, bound to that session) — not your creation token.Checkout page
The hosted checkout uses the checkout token to load session details (GET /v1/checkout/session/{token}), send/verify OTP (/v1/checkout/verification/*), and process payment (POST /v1/payments/processwith the verification token).
Backend integration
Authenticate
CallPOST /v1/authwith yourpk_*/sk_*API key pair. A backend creation SDK token is returned.Create the session
CallPOST /v1/checkout/backend/sessionwith inline or linked products and an optional pre-verifiedcustomer. NoOriginheader is required.Redirect the shopper
Same as the web flow:redirectUrlcarries a session-scoped checkout token for the hosted checkout page.
Security notes
- Creation tokens (from
/v1/tokenizeor/v1/auth) must never be exposed in browser URLs orlocalStoragefor checkout. - The checkout token in
redirectUrlcannot create new sessions or set product prices. - A checkout token is bound to one
sessionIdand cannot read another session's details.
Reference
Payment API– the public payment surface: auth, tokenize, checkout sessions, verification, and payments.Merchant API– the merchant dashboard admin endpoints.
When you extend the integration (for example, to support additional payment methods), update the schema in openapi/payup-public.yml and re-run npm run build to regenerate the reference.