API integrations: Power your app with our flexible API

Tap into our developer-friendly API to easily manage payments, subscriptions, and analytics, while delivering a seamless user experience. Built for mobile games, SaaS tools, and digital content, our payment system streamlines billing so you can avoid Apple’s 30% App Store commission.

Build your subscription page

01

Add a pricing preview page

Create a page on your site that showcases your product and pricing, and lets customers subscribe to a plan. When they proceed to Checkout, they’re redirected to a hosted page that completes the purchase and locks in the order details.

02

Add a return page

Build a page that displays order confirmation messaging or details after checkout. Link this page to the Checkout Session return_url, which Subotiz redirects customers to once their purchase  is complete.

03

Add a cancel page

Create a cancel page that Subotiz redirects to if a customer exits the Checkout process . Link it to the cancel_url, in your Checkout Session.

04

Add a webhook url

Create a /webhook endpoint, to receive real-time subscription events like payments, renewals and cancellations. Use it to verify subscription status after checkout and keep your system up to date.

Call the Subotiz API

Create a checkout session URL

The Checkout Session controls what your customer sees in the hosted payment page, such as line items, the order amount and currency, and acceptable payment methods.
Name
Provider
Hub-Timestamp
The millisecond timestamp
Content-Type
Application/json
Request-Id
The unique ID of the request
Hub-Access-No
Merchant unique id
Hub-Signature
Digital signature for request validation
Key
Type
Required
Description
access_no
string
Y
The assigned merchant number
sub_merchant_id
string
Y
The sub-merchant number of the merchant
order_id
string
Y
Order number
customer_id
string
N
Customer object id
email
string
Y
customer's email
line_items
Array(struct)
N
price object message
return_url
varchar
N
Subotiz redirects to after the customer completes the checkout
cancel_url
varchar
N
Subotiz redirects to when the customer clicks the back button in Checkout
callback_url
varchar
N
merchant listens to events related to subscription activity
Key
Type
Required
Description
code
string
Y
return code
message
string
N
code message
data
Object
N
Checkout session message
data.session_id
string
N
Session id
data.session_url
string
N
https://xxxx/api/v1/checkout/{session_id}

API demo

curl --location 'https://checkout.subotiz.com/api/v1/session'
--header 'request-id: req_1747377952155'
--header 'Content-Type: application/json'
--data-raw '{
"access_no": "600001",
 "sub_merchant_id": "364861",
 "order_id": "order_20260603_03",
 "email": "customer001@example.com",
 "line_items": [
   {
     "price_id": "521564108747754572",
     "quantity": "1"
   }
 ],
 "return_url": "https://example.com/success",
 "cancel_url": "https://example.com/cancel",
 "callback_url": "https://api.example.com/webhook"
}

{
   
"code": "success",
   
"message": "",
   
"data": {
       
"session_id": "526296135225065446",
       
"session_url": "https://checkout.subotiz.com/checkout/526296135225065446"
   }
}

Redirect to the checkout session

After creating the session, redirect your customer to the Checkout URL provided in the session response. Once they complete or cancel checkout, Subotiz will redirect them to your configured return or cancel URL.

Fulfill the subscription

Merchants listen to events related to subscription activity. After a successful payment and redirect to the return page, Subotiz will notify the payment result and subscription status using callback URL, verify that the subscription status is active and grant your customer access to the products and features they subscribed to.