POST
/
core
/
MerchantAnalytics
/
GetDisbursementMetrics
Get Transaction Metrics
curl --request POST \
  --url https://dev.api.onekhusa.com/sandbox/v1/core/MerchantAnalytics/GetDisbursementMetrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "merchantAccountNumber": 35253486,
  "summaryType": "D",
  "fromDate": "2024-01-01",
  "toDate": "2024-01-31"
}
'
{
  "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 , where is your access token.

Headers

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>
required

Start date for the metrics period (ISO 8601 format)

Example:

"2024-01-01"

toDate
string<date>
required

End date for the metrics period (ISO 8601 format)

Example:

"2024-01-31"

Response

200 - application/json

Success Response (200)

totalSuccessfulTransactionsAmount
number<decimal>

Total amount of successful disbursement transactions

Example:

5850000

numberOfSuccessfulTransactions
integer

Number of successful disbursement transactions

Example:

245

totalFailedTransactionsAmount
number<decimal>

Total amount of failed disbursement transactions

Example:

125000

numberOfFailedTransactions
integer

Number of failed disbursement transactions

Example:

8

totalTransactionsAmount
number<decimal>

Total amount of all disbursement transactions

Example:

5975000

numberOfTransactions
integer

Total number of disbursement transactions

Example:

253

successRate
number<decimal>

Percentage of successful transactions

Example:

96.84

failureRate
number<decimal>

Percentage of failed transactions

Example:

3.16

transactionsTrend
number<decimal>

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

Example:

12.5