Tokolaku Subscription API

Paket developer (sandbox/pro) — sesi login.

GitHub OpenAPI

Operations 2

GET /api/dev/subscription Lihat paket developer saat ini #
POST /api/dev/subscription/checkout Buat invoice upgrade ke paket Pro #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tokolaku-id:tokolaku-id-subscription-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tokolaku-id-subscription-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tokolaku Engine Subscription API
  version: 1.0.0
  description: 'REST API untuk integrasi bot AI, pengiriman pesan (WhatsApp/Instagram/Messenger via BYON), webhook real-time, dan manajemen sub-akun/reseller di Tokolaku.


    **Autentikasi**

    - Endpoint publik `/api/v1/*` (Messaging): header `Authorization: Bearer ` (format `tk_live_sk_...` / `tk_test_sk_...`). Setiap key punya scope (`chat:write`, `messages:write`, dst).

    - Endpoint dashboard `/api/dev/*`: sesi login (cookie) developer — dipanggil dari aplikasi/dashboard kamu sendiri, bukan server-to-server publik.


    **Webhook (kami → aplikasi kamu)**

    Event `message.received` dan `message.status` dikirim sebagai `POST` ke URL webhook yang kamu daftarkan, dengan header:

    - `X-Tokolaku-Event`: nama event (mis. `message.received`)

    - `X-Tokolaku-Signature`: `sha256=`

    - `X-Tokolaku-Delivery`: id pengiriman (dipakai juga untuk dedup saat retry)


    Body mengikuti skema `WebhookEvent`. Balas `2xx` untuk menandai sukses; kegagalan di-retry dengan backoff eksponensial (60s → 1920s, hingga 6x).'
  contact:
    name: Tokolaku
    url: https://tokolaku.id
servers:
- url: https://api.tokolaku.id
  description: Production
security:
- bearerAuth: []
tags:
- name: Subscription
  description: Paket developer (sandbox/pro) — sesi login.
paths:
  /api/dev/subscription:
    get:
      tags:
      - Subscription
      summary: Lihat paket developer saat ini
      security:
      - sessionAuth: []
      responses:
        '200':
          description: Detail paket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
              example:
                plan: pro
                status: active
                current_period_end: '2026-10-04T00:00:00.000Z'
                price_idr: 149000
      operationId: getApiDevSubscription
      x-operation-id-source: derived
  /api/dev/subscription/checkout:
    post:
      tags:
      - Subscription
      summary: Buat invoice upgrade ke paket Pro
      description: Membuat (atau memakai ulang invoice pending < 60 menit) invoice Duitku untuk upgrade ke paket Pro, lalu mengembalikan URL redirect pembayaran.
      security:
      - sessionAuth: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Invoice berhasil dibuat
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutResponse'
              example:
                order_id: TKLS-ABC123-XYZ789
                redirect_url: https://app.duitku.com/checkout/...
        '404':
          description: Organisasi tak ditemukan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: no_org
                  message: Organisasi tak ditemukan
        '502':
          description: Gateway pembayaran gagal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: gateway_failed
                  message: gagal
      operationId: postApiDevSubscriptionCheckout
      x-operation-id-source: derived
components:
  schemas:
    ErrorEnvelope:
      type: object
      description: Envelope error konsisten untuk semua endpoint Engine API.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
          - code
          - message
      required:
      - error
    Subscription:
      type: object
      properties:
        plan:
          type: string
          enum:
          - sandbox
          - pro
        status:
          type: string
        current_period_end:
          type:
          - string
          - 'null'
          format: date-time
        price_idr:
          type: number
      required:
      - plan
      - status
      - current_period_end
      - price_idr
    CheckoutResponse:
      type: object
      properties:
        order_id:
          type: string
        redirect_url:
          type: string
        reused:
          type: boolean
      required:
      - order_id
      - redirect_url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Secret key developer, format `tk_live_sk_...` (produksi) atau `tk_test_sk_...` (sandbox). Kirim via header `Authorization: Bearer <key>` (atau `X-API-Key: <key>`).'
    sessionAuth:
      type: apiKey
      in: cookie
      name: session
      description: Endpoint dashboard `/api/dev/*` diautentikasi via sesi login developer (cookie), bukan API key — dipanggil dari aplikasi/dashboard kamu sendiri saat sudah login.