This guide walks you through the foundational integration of Subotiz’s payment capabilities using our Hosted Checkout solution (hosted mode) to quickly implement a payment flow. Subotiz provides complete payment capabilities that support core features such as subscription management and transaction processing, making it suitable for various business scenarios including AI platforms, SaaS applications, and more.
return_url: Redirect URL after payment success — the default value when using the API to create a checkout session.
cancel_url: Redirect URL after payment cancellation — the default value when using the API to create a checkout session.
Priority rule: URLs supplied at session creation override the defaults set here. We recommend setting a global default here for convenience, and passing a custom URL via the API for specific scenarios.
access_no: Unique identifier for the integrating party
merchant_id: Unique merchant identifier
API Key: API authentication key. See Authentication for how to obtain it (Keep strictly confidential, never expose on the client-side)
2
Obtain Product Information
Create products and product pricing within the Subotiz merchant platform. Store the product and price information on your server. Creating a Checkout Session relies on the pricing_id of the product pricing to dynamically retrieve product information.
Create a Product
Create Product Pricing
3
Create a Checkout Session
Use the API to create a checkout session, retrieve the payment page URL, and guide the customer through completing the payment.Request example:
Extract parameters: obtain the X-Timestamp from the request headers (denoted as timestamp), and get the raw request body content (denoted as body).
Construct the signature string: format is ${timestamp}.${body}.
Compute the signature: using the API Key assigned by Subotiz as the key, compute the signature value via the HMAC-SHA256 algorithm (see the example below).
Compare and verify: compare the calculated signature with the X-Signature value from the request headers. If they match, the request is legitimate.