Transactions

Buy prepaid products, check status, and report on transaction history.

Connection settings
No credentials set.
POST /api/v2/transaction/topup Requires auth

Creates a prepaid top-up transaction. The request is accepted as Pending and settles asynchronously (finish via webhook or by polling GET /transaction/detail).

Headers

HeaderRequiredDescription
useridRequiredAccount user ID.
api-keyRequiredAccount client API key.

Body parameters

FieldTypeRequiredDescription
transactionIdstringRequiredUnique ID for this purchase. Duplicates return 400.
customerIdstringRequiredDestination phone number in +62 or local format, e.g. +628123456789.
productIdstringRequiredProduct code from GET /product/all, e.g. TLKOM10.
curl -X POST "http://localhost:4907/api/v2/transaction/topup" \
  -H "userid: " \
  -H "api-key: " \
  -H "Content-Type: application/json" \
  -d '{
    "transactionId": "TRX-20260907-0001",
    "customerId": "+628123456789",
    "productId": "TLKOM10"
  }'
Example response
{
  "code": 201,
  "status": "Pending",
  "data": {
    "transactionId": "TRX-20260907-0001",
    "refId": "SAT2409070000001",
    "date": "2026-09-07T08:30:00.000Z",
    "product": {
      "code": "TLKOM10",
      "name": "Telkomsel 10.000",
      "detail": "Paket isi ulang Telkomsel 10k",
      "category": "Mobile",
      "type": "Prepaid",
      "price": 12000,
      "status": "Active",
      "operator": "Telkomsel"
    },
    "customerId": "+628123456789",
    "price": 12000,
    "priceAdminFee": 0,
    "priceDisclaimer": 0,
    "priceSubTotal": 12000,
    "action": "Top Up",
    "payment": {
      "status": "Success",
      "method": { "id": "sat-deposit", "name": "Sama alThawaf Deposit", "disclaimer": 0 }
    },
    "sn": "",
    "message": "",
    "note": "",
    "status": "Pending",
    "userId": "",
    "user": {
      "userId": "",
      "name": "",
      "email": "ops@example.com",
      "status": "Active",
      "validate": true,
      "platform": { "key": "***", "balance": 988000 }
    },
    "code": 201
  }
}
Balance deduction

The prepaid balance is deducted immediately when the request is accepted. If the supplier ultimately fails, the amount is refunded automatically and a 400 / Error status (with webhook) is delivered.

Try it
GET /api/v2/transaction/detail Requires auth

Returns a single transaction. Look it up either by the transactionId or by the platform refId.

Headers

HeaderRequiredDescription
useridRequiredAccount user ID.
api-keyRequiredAccount client API key.

Query parameters

ParamTypeRequiredDescription
refIdstringOne ofPlatform reference ID (from a previous response).
transactionIdstringOne ofClient transaction ID. When used, it is scoped to the account.
# by client ID
curl "http://localhost:4907/api/v2/transaction/detail?transactionId=TRX-20260907-0001" \
  -H "userid: " \
  -H "api-key: "

# by the platform reference ID
curl "http://localhost:4907/api/v2/transaction/detail?refId=SAT2409070000001" \
  -H "userid: " \
  -H "api-key: "
Example response
{
  "code": 200,
  "status": "Success",
  "data": {
    "transactionId": "TRX-20260907-0001",
    "refId": "SAT2409070000001",
    "date": "2026-09-07T08:35:00.000Z",
    "product": {
      "code": "TLKOM10",
      "name": "Telkomsel 10.000",
      "detail": "Paket isi ulang Telkomsel 10k",
      "category": "Mobile",
      "type": "Prepaid",
      "price": 12000,
      "status": "Active",
      "operator": "Telkomsel"
    },
    "customerId": "+628123456789",
    "price": 12000,
    "priceAdminFee": 0,
    "priceDisclaimer": 0,
    "priceSubTotal": 12000,
    "action": "Top Up",
    "payment": {
      "status": "Success",
      "method": { "id": "sat-deposit", "name": "Sama alThawaf Deposit", "disclaimer": 0 }
    },
    "sn": "7755112233",
    "message": "Pembelian Telkomsel 10.000 Ke +628123456789 berhasil, SN = 7755112233",
    "note": "",
    "status": "Success",
    "userId": "",
    "user": {
      "userId": "",
      "name": "",
      "email": "ops@example.com",
      "status": "Active",
      "validate": true,
      "platform": { "key": "***", "balance": 988000 }
    },
    "code": 200
  }
}
FieldTypeDescription
transactionIdstringThe original transaction ID.
refIdstringPlatform transaction ID.
datestringLast update (or creation) time, ISO 8601.
productobjectProduct snapshot (code, name, price, operator…).
customerIdstringDestination phone number.
price / priceAdminFee / priceDisclaimer / priceSubTotalnumberCost breakdown in IDR.
actionstringTop Up or Pay.
paymentobjectPayment settlement detail.
snstringSerial number delivered by the supplier on success.
messagestringHuman readable outcome message.
statusstringPending, Success, or Error.
codeintegerNumeric status (200, 201, 400…).
Try it

Provide either one.

POST /api/v2/transaction/pln/token_check Requires auth

Checks a PLN token purchase. Currently reserved; behavior may change. Contact support before relying on it.

Body parameters

FieldTypeRequiredDescription
customerIdstringRequiredPLN customer / meter number.
curl -X POST "http://localhost:4907/api/v2/transaction/pln/token_check" \
  -H "userid: " \
  -H "api-key: " \
  -H "Content-Type: application/json" \
  -d '{ "customerId": "123456789012" }'
Try it
GET /api/v2/transaction/all Requires auth

Lists all transactions within a date range, newest first.

Query parameters

ParamTypeRequiredDescription
startstring (date)RequiredStart date, YYYY-MM-DD. Values include that day from 00:00.
endstring (date)RequiredEnd date, YYYY-MM-DD. Values include that day up to 24:00.
curl "http://localhost:4907/api/v2/transaction/all?start=2026-09-01&end=2026-09-07" \
  -H "userid: " \
  -H "api-key: "
Example response
{
  "code": 200,
  "status": "Success",
  "data": [
    {
      "transactionId": "TRX-20260907-0001",
      "refId": "SAT2409070000001",
      "date": "2026-09-07T08:35:00.000Z",
      "product": { "code": "TLKOM10", "name": "Telkomsel 10.000", "price": 12000, "operator": "Telkomsel" },
      "customerId": "+628123456789",
      "price": 12000,
      "priceSubTotal": 12000,
      "action": "Top Up",
      "payment": { "status": "Success", "method": { "id": "sat-deposit", "name": "Sama alThawaf Deposit", "disclaimer": 0 } },
      "sn": "7755112233",
      "message": "Pembelian Telkomsel 10.000 Ke +628123456789 berhasil, SN = 7755112233",
      "note": "",
      "status": "Success",
      "userId": "",
      "user": { "userId": "", "name": "", "platform": { "key": "***", "balance": 988000 } },
      "code": 200
    }
  ]
}
Try it
GET /api/v2/transaction/listDashboard Requires auth

Dashboard view of transactions: paginated list plus computed statistics, filters, and available operators for the selected range.

Query parameters

ParamTypeRequiredDescription
startstring (date)RequiredStart date, YYYY-MM-DD.
endstring (date)RequiredEnd date, YYYY-MM-DD.
pageintegerOptionalPage number, defaults to 1.
limitintegerOptionalRows per page, defaults to 50, max 200.
statusstringOptionalFilter: Success, Error, Pending, or all.
operatorstringOptionalFilter by operator name, or all.
searchstringOptionalMatches customerId, transactionId, reference, or product name/code.
curl "http://localhost:4907/api/v2/transaction/listDashboard?start=2026-09-01&end=2026-09-07&page=1&limit=50&status=all" \
  -H "userid: " \
  -H "api-key: "
Example response
{
  "code": 200,
  "status": "Success",
  "data": {
    "code": 200,
    "status": "Success",
    "data": {
      "transactions": [
        {
          "transactionId": "TRX-20260907-0001",
          "refId": "SAT2409070000001",
          "date": "2026-09-07T08:35:00.000Z",
          "customerId": "+628123456789",
          "productName": "Telkomsel 10.000",
          "productCode": "TLKOM10",
          "operator": "Telkomsel",
          "price": 12000,
          "status": "Success",
          "action": "Top Up",
          "hasError": false,
          "errorCode": null,
          "message": null
        }
      ],
      "statistics": {
        "total": 25,
        "success": 23,
        "failed": 1,
        "pending": 1,
        "totalAmount": 320000,
        "successAmount": 301000,
        "failedAmount": 12000,
        "averageAmount": 12800,
        "byOperator": { "Telkomsel": 18, "XL": 7 },
        "byStatus": { "Success": 23, "Error": 1, "Pending": 1 },
        "byDate": { "2026-09-07": 12, "2026-09-06": 13 },
        "recentActivity": "2026-09-07T08:35:00.000Z"
      },
      "filters": {
        "applied": {
          "userId": "",
          "start": "2026-09-01",
          "end": "2026-09-07",
          "status": "all",
          "operator": "all",
          "search": null
        },
        "available": {
          "operators": ["Telkomsel", "XL"],
          "statuses": ["Success", "Error", "Pending"]
        }
      },
      "pagination": {
        "currentPage": 1,
        "perPage": 50,
        "totalItems": 25,
        "totalPages": 1,
        "hasNextPage": false,
        "hasPrevPage": false
      },
      "timestamp": "2026-09-07T09:00:00.000Z"
    }
  }
}
Note on nesting

The dashboard payload is intentionally wrapped once more than the other endpoints. Read the reporting fields from data.data.transactions, data.data.statistics, and data.data.pagination.

Try it