Transactions
Buy prepaid products, check status, and report on transaction history.
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
| Header | Required | Description |
|---|---|---|
userid | Required | Account user ID. |
api-key | Required | Account client API key. |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
transactionId | string | Required | Unique ID for this purchase. Duplicates return 400. |
customerId | string | Required | Destination phone number in +62 or local format, e.g. +628123456789. |
productId | string | Required | Product 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" }'
{
"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
}
}
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.
Returns a single transaction. Look it up either by the transactionId or by the platform refId.
Headers
| Header | Required | Description |
|---|---|---|
userid | Required | Account user ID. |
api-key | Required | Account client API key. |
Query parameters
| Param | Type | Required | Description |
|---|---|---|---|
refId | string | One of | Platform reference ID (from a previous response). |
transactionId | string | One of | Client 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: "
{
"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
}
}
| Field | Type | Description |
|---|---|---|
transactionId | string | The original transaction ID. |
refId | string | Platform transaction ID. |
date | string | Last update (or creation) time, ISO 8601. |
product | object | Product snapshot (code, name, price, operator…). |
customerId | string | Destination phone number. |
price / priceAdminFee / priceDisclaimer / priceSubTotal | number | Cost breakdown in IDR. |
action | string | Top Up or Pay. |
payment | object | Payment settlement detail. |
sn | string | Serial number delivered by the supplier on success. |
message | string | Human readable outcome message. |
status | string | Pending, Success, or Error. |
code | integer | Numeric status (200, 201, 400…). |
Provide either one.
Checks a PLN token purchase. Currently reserved; behavior may change. Contact support before relying on it.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Required | PLN 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" }'
Lists all transactions within a date range, newest first.
Query parameters
| Param | Type | Required | Description |
|---|---|---|---|
start | string (date) | Required | Start date, YYYY-MM-DD. Values include that day from 00:00. |
end | string (date) | Required | End 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: "
{
"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
}
]
}
Dashboard view of transactions: paginated list plus computed statistics, filters, and available operators for the selected range.
Query parameters
| Param | Type | Required | Description |
|---|---|---|---|
start | string (date) | Required | Start date, YYYY-MM-DD. |
end | string (date) | Required | End date, YYYY-MM-DD. |
page | integer | Optional | Page number, defaults to 1. |
limit | integer | Optional | Rows per page, defaults to 50, max 200. |
status | string | Optional | Filter: Success, Error, Pending, or all. |
operator | string | Optional | Filter by operator name, or all. |
search | string | Optional | Matches 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: "
{
"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"
}
}
}
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.