Back to Docs

API Reference

Complete REST API reference for Storlaunch. Base URL: https://storlaunch.forjio.com/api/v1

Checkout Sessions

POST/api/v1/payment/checkout-sessionsAuth required

Create a hosted checkout session. Redirect your customer to the returned checkout URL.

Request body

{
  "amount": 99000,
  "currency": "IDR",
  "description": "Pro Plan - Monthly",
  "customerEmail": "buyer@example.com",
  "successUrl": "https://myapp.com/success",
  "cancelUrl": "https://myapp.com/cancel",
  "paymentMethods": ["qris", "ewallet", "va", "card"]
}

Response

{
  "data": {
    "id": "cs_01HX...",
    "checkoutUrl": "https://storlaunch.forjio.com/checkout/cs_01HX...",
    "status": "pending",
    "expiresAt": "2026-04-05T13:00:00.000Z"
  }
}
GET/api/v1/payment/checkout-sessionsAuth required

List all checkout sessions for your account. Supports cursor-based pagination.

Response

{
  "data": [{ "id": "cs_01HX...", "status": "completed", "amount": 99000 }],
  "meta": { "cursor": "cs_01HX...", "hasMore": true }
}
GET/api/v1/payment/checkout-sessions/:idAuth required

Retrieve a single checkout session by ID.

Response

{
  "data": { "id": "cs_01HX...", "status": "completed", "amount": 99000, "paidAt": "..." }
}

Subscription Plans

POST/api/v1/payment/plansAuth required

Create a subscription plan with recurring billing.

Request body

{
  "name": "Pro Monthly",
  "amount": 99000,
  "currency": "IDR",
  "interval": "month",
  "trialPeriodDays": 14
}

Response

{
  "data": { "id": "plan_01HX...", "name": "Pro Monthly", "interval": "month" }
}
GET/api/v1/payment/plansAuth required

List all plans.

Response

{
  "data": [{ "id": "plan_01HX...", "name": "Pro Monthly", "amount": 99000 }]
}

Subscriptions

POST/api/v1/payment/subscriptionsAuth required

Subscribe a customer to a plan.

Request body

{
  "customerId": "cust_01HX...",
  "planId": "plan_01HX..."
}

Response

{
  "data": { "id": "sub_01HX...", "status": "trialing", "currentPeriodEnd": "..." }
}
PATCH/api/v1/payment/subscriptions/:idAuth required

Update a subscription: cancel, pause, resume, or change plan.

Request body

{ "action": "cancel" }

Response

{
  "data": { "id": "sub_01HX...", "status": "canceled", "canceledAt": "..." }
}

Storefront — Products

POST/api/v1/storefront/productsAuth required

Create a digital product with files and pricing.

Request body

{
  "name": "UI Kit Pro",
  "slug": "ui-kit-pro",
  "description": "500+ components for React",
  "price": 299000,
  "currency": "IDR"
}

Response

{
  "data": { "id": "prod_01HX...", "slug": "ui-kit-pro", "status": "active" }
}
GET/api/v1/storefront/productsAuth required

List all products for your account.

Response

{
  "data": [{ "id": "prod_01HX...", "name": "UI Kit Pro", "price": 299000 }]
}

Storefront — Licenses

GET/api/v1/storefront/licenses/validate

Validate a license key. Public endpoint — no auth required.

Response

{
  "data": { "valid": true, "productId": "prod_01HX...", "activatedAt": "..." }
}

Full endpoint list and SDK examples available on the main documentation page.