Skip to main content
GET
/
v2
/
credits
/
transactions
Fetch Transaction Logs
curl --request GET \
  --url https://bgv.konnectnxt.com/api/v2/credits/transactions \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "code": 200,
  "data": {
    "transactions": [
      {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "transaction_type": "debit",
        "description": "PAN Verification - API Call",
        "credits": 5,
        "opening_balance": 1000,
        "closing_balance": 995,
        "api_name": "PAN Verification",
        "user_email": "user@example.com",
        "created_at": "2024-01-15T14:30:00Z"
      },
      {
        "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "transaction_type": "credit",
        "description": "Credit Purchase",
        "credits": 500,
        "opening_balance": 995,
        "closing_balance": 1495,
        "api_name": null,
        "user_email": "admin@example.com",
        "created_at": "2024-01-15T10:00:00Z"
      }
    ],
    "total": 150,
    "current_page": 1,
    "per_page": 100,
    "total_pages": 2
  },
  "credits_used": 0,
  "credits_remaining": 1495
}
This API allows you to retrieve paginated credit transaction logs for your organization with advanced filtering capabilities.

Features

  • Date Range Filtering: Filter transactions using start and end dates in DD-MM-YYYY format
  • Transaction Type Filtering: Filter by specific transaction types (credit, debit, refund, purchase, deduction)
  • High Performance: Sub-50ms response time for base queries
  • Conditional Payload Loading: Optionally include request/response payload data
  • Flexible Pagination: Up to 500 records per page

Use Cases

  • View Recent Activity: Monitor your latest credit transactions
  • Generate Reports: Create billing and usage reports for specific date ranges
  • Audit API Usage: Track which APIs consumed credits and when
  • Credit Analysis: Analyze credit consumption patterns across your organization
By default, request and response payload data is not included in the response to optimize performance. Set include_input=true or include_output=true to retrieve payload data when needed.

Transaction Types

  • credit: Credits added to account
  • debit: Credits consumed by API calls
  • refund: Credits refunded to account
  • purchase: Credits purchased
  • deduction: Manual credit deduction

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

start_date
string<date>

Filter transactions from this date (inclusive). Format: DD-MM-YYYY

Example:

"01-01-2024"

end_date
string<date>

Filter transactions until this date (inclusive). Format: DD-MM-YYYY

Example:

"31-12-2024"

transaction_type
enum<string>

Filter by specific transaction type

Available options:
credit,
debit,
refund,
purchase,
deduction
Example:

"debit"

page
integer
default:1

Page number for pagination (1-indexed)

Required range: x >= 1
Example:

1

per_page
integer
default:100

Number of records per page

Required range: 1 <= x <= 500
Example:

100

include_input
boolean
default:false

Include request payload data in response

Example:

false

include_output
boolean
default:false

Include response payload data in response

Example:

false

Response

Successfully retrieved transaction logs

status
enum<string>
required

Response status indicator

Available options:
success
Example:

"success"

code
enum<integer>
required

HTTP status code

Available options:
200
Example:

200

data
object
required
credits_used
number<float>
required

Credits consumed by this API call (always 0.0 for read-only operations)

Example:

0

credits_remaining
number<float>
required

Organization's remaining credit balance

Example:

1000