Transactions
Retrieve a paginated list of transactions for a specific account.
Authorizations
Path parameters
accountIdstringRequired
Unique identifier of the account
Query parameters
pageintegerOptional
Page number of the transactions list
pageSizeintegerOptional
Number of transactions per page
Responses
200
A list of transactions for the specified account
application/json
404
Account not found
get
GET /v1/account/{accountId}/transactions HTTP/1.1
Host: api.example.com
api_key: YOUR_API_KEY
Accept: */*
{
"transactions": [
{
"id": "text",
"type": "recharge",
"amount": 1,
"timestamp": "2025-06-27T02:04:24.058Z"
}
],
"total": 1,
"totalPages": 1,
"currentPage": 1
}
Endpoint to add funds to a specific account. This involves a payment transaction which, upon successful completion, updates the account balance.
Authorizations
Path parameters
accountIdstringRequired
Account ID
Body
amountnumber · floatRequiredExample:
100
Responses
200
Funds added successfully
application/json
400
Invalid input or account not found
post
POST /v1/account/{accountId}/transactions/add-funds HTTP/1.1
Host: api.example.com
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"amount": 100
}
{
"transaction_id": "txn_123456789",
"updated_balance": 200
}
Endpoint to record the usage of services against an account.
Authorizations
Path parameters
accountIdstringRequired
Account ID
Body
detailsstringRequiredExample:
100 tokens
amountnumber · floatRequiredExample:
15.75
datestring · timestampRequiredExample:
2010-01-01 00.00:00
metadataobjectOptional
Responses
200
Usage recorded successfully
application/json
400
Invalid input or account not found
post
POST /v1/account/{accountId}/transactions/record-usage HTTP/1.1
Host: api.example.com
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"details": "100 tokens",
"amount": 15.75,
"date": "2010-01-01 00.00:00",
"metadata": {}
}
{
"status": "Usage recorded successfully",
"new_balance": 284.25
}
Last updated