Skip to Content

Overview

With the SUNBAY Hosted Payment Page (HPP), payment pages and user interaction are hosted by SUNBAY. Customers open checkoutUrl in the browser to choose a method and authorize payment. On your side you mainly create the session, handle redirects, and process notifications—usually without building payment UI.

Which methods (e.g. cards, wallets) appear on checkout is controlled by what you enable in the SUNBAY console (BizHub); disabled methods are not shown.

When to use

AspectDetails
EffortLow—no payment SDK integration on your checkout UI
CustomizationCheckout look & flow provided by SUNBAY; you configure order fields and return URLs
Typical useFast launch, backend-initiated checkout, ecommerce/SaaS with limited front-end changes

Prerequisites

  • SUNBAY merchant account with appId and API credentials
  • Payment methods you need are enabled and configured in the merchant console
  • (Recommended when you need async callbacks) an optional notifyUrl—if omitted, no Webhook is sent
  • A reachable merchantReturnUrl for browser return after payment

Payment flow

Integration steps

Step 1: Create checkout session

Call Create checkout session API with merchantReturnUrl; notifyUrl is optional (send it only when you want Webhooks).

{ "appId": "your_app_id", "referenceOrderId": "ORDER_20240101_001", "transactionRequestId": "TXN_20240101_001", "amount": { "orderAmount": 9999, "priceCurrency": "USD", "taxAmount": 800, "surchargeAmount": 200 }, "description": "Order description", "notifyUrl": "https://your-backend.com/webhook", "merchantReturnUrl": "https://your-store.com/payment/result" }

Step 2: Redirect

Read checkoutUrl from the API response and redirect the customer’s browser. Available methods follow your BizHub configuration.

Step 3: Handle results

After payment, SUNBAY notifies you in two ways:

  • Browser return: user lands on merchantReturnUrl (query params may include order/session hints—verify final state with query/Webhook)
  • Webhook: if you provided notifyUrl, SUNBAY POSTs the outcome there; if you did not, no Webhook is sent (when configured, Webhook is the recommended source of truth)

If you set notifyUrl, treat Webhook as the authoritative outcome; without Webhook, use active query (or another agreed channel) for final status. Do not rely on the browser return alone.

Last updated on