Company Transaction Counter API

API to retrieve daily transaction statistics for a company. Supports filtering by time range to view transaction trends.


API Endpoint

GET
https://bankhub-api-sandbox.sepay.vn/v1/company/counter/{company_id}

Path Parameters

company_idstringrequired

Company ID

datestring

Filter by specific date (YYYY-MM-DD)

Query Parameters

company_idstringrequired

Company ID

datestring

Filter by specific date (YYYY-MM-DD)

Note
  • This API requires a Bearer Token in the Authorization header
  • The company must belong to the authenticated merchant
  • The response returns daily statistics and aggregated totals
  • Counter fields include: transaction (total), transaction_in (inbound), transaction_out (outbound)

Error Handling

404Not Found

The company does not exist or does not belong to this merchant

401Unauthorized

Invalid or expired access token

API Response

Response 200 - Success
{
  "data": {
    "dates": [
      {
        "date": "2024-01-01",
        "transaction": 0,
        "transaction_in": 0,
        "transaction_out": 0
      }
    ],
    "total": {
      "transaction": 0,
      "transaction_in": 0,
      "transaction_out": 0
    }
  }
}
dataobject

Statistics data

Code Examples

1
2
3
curl --request GET \
--url 'https://bankhub-api-sandbox.sepay.vn/v1/company/counter/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b?date=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Important Notes
  • Transaction In/Out: transaction_in refers to inbound (money-in) transactions, while transaction_out refers to outbound (money-out) transactions
  • Filtering: Use the date query parameter to filter by a specific date; if omitted, all data will be returned
  • Total: The total field always contains the aggregated totals of all dates in dates
  • Empty Dates: If there are no transactions yet, the dates array will be empty and total fields will be 0