API Reference

The Hosted Checkout Page

The Hosted Checkout Page (HCP) is a Paystrator-provided payment page for clients who do not want to build their own checkout UI. It wraps our existing APIs (Receive Money and Get Status), into a ready-to-use payment page with tenant branding and flexible configuration.

Key Features:

  • Hosted Checkout URL generated via API
  • Custom branding: title, logo, favicon, fonts, colors
  • Success / Cancel redirects configurable via dashboard or API override
  • Static or dynamic amount: prefilled by API or entered by the end-user
  • Payment type selection: virtual account, eWallet, QR code, credit card
  • Auto-direct when only one payment type is available
  • Final page rendering when all required attributes are provided

Style it with Your Branding

You can go to the dashboard, and customize the checkout page so that it's align with your branding. Simply go to SettingsCheckout Page, and start configuring your Checkout Page


Using the Hosted Checkout API

Read how to call the hosted checkout API here


Best Practices

  • Always send Idempotency-Key to avoid duplicated checkouts on retries.

  • Keep externalId unique (e.g., order/invoice number).

  • Configure successUrl/cancelUrl defaults in Dashboard → Checkout Settings; override per request only when needed.

  • For one-click experiences, pre-fill:

    • qrcode: amount
    • virtual_account: amount + code + name
    • ewallet: amount + code

Environments

  • Sandbox: relaxed provider checks, test flows.
  • Production: requires valid provider mappings; stricter validation.

Rate Limits

  • Default: 60 req/min/tenant (subject to plan).
  • 429 returned if exceeded. Include Retry-After.

FAQ

Q: Can I change the branding? A: Yes, in Dashboard → Settings → Checkout Page (title, colors, logo, favicon, font, button radius).

Q: Do I need to poll status? A: No. Use Webhooks. Poll /v1/get-status only as fallback or for reconciliation.

Q: Can I force only one payment type? A: Yes. Send type in the request. If you omit it and only one type is enabled for your tenant, the page auto-directs to that one.