Introduction
SePay's Transaction API allows you to query information about bank transactions that have occurred. You can get a list of transactions, filter by various criteria, and view details of each transaction.
To use this API, you need the transaction:read permission in the Access Token scope.
Get Transaction List
https://my.sepay.vn/api/v1/transactionsAuthorization: Bearer {YOUR_ACCESS_TOKEN}
This endpoint returns a list of transactions belonging to your company. You can filter results by various criteria.
Required permissions:
- Scope:
transaction:read - User permission: Bank Transaction (View transaction list)
Query parameters:
meta.pagination.per_pageis the page size actually applied. For example, sendinglimit=500returnsper_page: 100.- When there is at least one record, a
pagegreater thanlast_pagedoes not return an empty list: it returns the last page's data withcurrent_pageequal tolast_page. - When iterating, stop once
current_page >= last_pagerather than waiting for an emptydata. A list with no records returnslast_page: 0andcurrent_page: 1. - For users who are not administrators (Admin, SuperAdmin), the API returns
{"status": "success", "data": []}with nometawhen: they have not been granted any bank account;bank_account_idfilters on a bank account they have no access to; or the company restricts access by virtual account (VA) and they have not been granted any VA.
curl -G "https://my.sepay.vn/api/v1/transactions" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \--data-urlencode "bank_account_id=19" \--data-urlencode "from_date=2025-02-01" \--data-urlencode "to_date=2025-02-28"
{
"status": "success",
"data": [
{
"id": 49682,
"bank_account_id": 19,
"bank_brand_name": "Vietcombank",
"account_number": "0071000888888",
"transaction_date": "2025-02-25 19:59:48",
"amount_out": 0.00,
"amount_in": 18067000.00,
"accumulated": 1200541768.00,
"transaction_content": "DUONG THUY ANH chuyen tien mua hang online",
"reference_number": "677760.250225.080001",
"code": "DH123456",
"sub_account": "VCB0011ABC004"
},
{
"id": 49582,
"bank_account_id": 19,
"bank_brand_name": "Vietcombank",
"account_number": "0071000888888",
"transaction_date": "2025-02-25 17:59:47",
"amount_out": 0.00,
"amount_in": 13646000.00,
"accumulated": 1182474768.00,
"transaction_content": "DINH NHU TOAN chuyen tien DH789012",
"reference_number": "171158.250225.060001",
"code": "DH789012",
"sub_account": "VCB0011ABC002"
},
{
"id": 49465,
"bank_account_id": 19,
"bank_brand_name": "Vietcombank",
"account_number": "0071000888888",
"transaction_date": "2025-02-24 15:59:47",
"amount_out": 0.00,
"amount_in": 21782000.00,
"accumulated": 1168828768.00,
"transaction_content": "DUONG THUY ANH chuyen tien thanh toan hoa don",
"reference_number": "989543.240225.040001",
"code": null,
"sub_account": "VCB0011ABC001"
}
],
"meta": {
"pagination": {
"total": 86,
"per_page": 20,
"current_page": 1,
"last_page": 5
}
}
}idintegerTransaction ID
bank_account_idintegerBank account ID
bank_brand_namestringBank name
account_numberstringBank account number
transaction_datedatetimeTransaction date and time
amount_outfloatOutgoing amount (VND)
amount_infloatIncoming amount (VND)
accumulatedfloatBalance after transaction (VND)
transaction_contentstringTransaction content
reference_numberstringTransaction reference number
codestring/nullPayment code extracted from transaction content (if any)
sub_accountstring/nullReceiving sub-account (if any)
Error Codes
Below are the error codes that may be encountered when using the Transaction API:
400validation_errorInput data validation error
401unauthorizedToken is invalid or expired
403forbiddenNo permission to access this resource
Next Step
Next, learn about the Webhooks API to set up automatic notifications when new transactions occur.