POST
/
core
/
MerchantAnalytics
/
GetDisbursementMetrics
Get Transaction Metrics
curl --request POST \
  --url https://api.onekhusa.com/sandbox/v1/core/MerchantAnalytics/GetDisbursementMetrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Merchant-Account-Number: <x-merchant-account-number>' \
  --header 'X-Organisation-Id: <x-organisation-id>' \
  --data '{
  "merchantAccountNumber": 35253486,
  "summaryType": "D",
  "fromDate": "2024-01-01T00:00:00Z",
  "toDate": "2024-01-31T23:59:59Z"
}'
{
  "totalSuccessfulTransactionsAmount": 5850000,
  "numberOfSuccessfulTransactions": 245,
  "totalFailedTransactionsAmount": 125000,
  "numberOfFailedTransactions": 8,
  "totalTransactionsAmount": 5975000,
  "numberOfTransactions": 253,
  "successRate": 96.84,
  "failureRate": 3.16,
  "transactionsTrend": 12.5
}

Authorizations

Authorization
string
header
required

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

Headers

X-Organisation-Id
string
required

The organization identifier

X-Merchant-Account-Number
string
required

The merchant account number

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
merchantAccountNumber
integer
required

The merchant account number

Required range: 10000000 <= x <= 99999999
Example:

35253486

summaryType
string
required

The type of summary (e.g., "D" for Disbursement and "C" for Collections)

Example:

"D"

fromDate
string<date-time>
required

Start date for the metrics period (ISO 8601 format)

Example:

"2024-01-01T00:00:00Z"

toDate
string<date-time>
required

End date for the metrics period (ISO 8601 format)

Example:

"2024-01-31T23:59:59Z"

Response

200 - application/json

Success Response (200)

totalSuccessfulTransactionsAmount
number

Total amount of successful disbursement transactions

Example:

5850000

numberOfSuccessfulTransactions
integer

Number of successful disbursement transactions

Example:

245

totalFailedTransactionsAmount
number

Total amount of failed disbursement transactions

Example:

125000

numberOfFailedTransactions
integer

Number of failed disbursement transactions

Example:

8

totalTransactionsAmount
number

Total amount of all disbursement transactions

Example:

5975000

numberOfTransactions
integer

Total number of disbursement transactions

Example:

253

successRate
number

Percentage of successful transactions

Example:

96.84

failureRate
number

Percentage of failed transactions

Example:

3.16

transactionsTrend
number

Percentage change in transaction count compared to the previous month (positive = growth, negative = decline)

Example:

12.5