Transaction API
Transactions are banking transactions that have occurred. You can query detailed information of a transaction, a list of transactions, and count the total number of transactions.
What can you do with Transactions?
SePay allows you to perform the following queries with Transactions:
GEThttps://my.sepay.vn/userapi/transactions/list- Get a list of transactions
GEThttps://my.sepay.vn/userapi/transactions/details/{transaction_id}- Get details of a transaction
GEThttps://my.sepay.vn/userapi/transactions/count- Count the number of transactions
Get a list of transactions
GET
/userapi/transactions/listContent-Type: application/json
Authorization: Bearer {YOUR_API_TOKEN}
- Retrieve all transactions. By default, only the 5000 most recent transactions are displayed.
- Query Parameters
Name Type Required Description account_numberstring Not required Bank account numbertransaction_date_minstring Not required Show transactions created after (>=). Format yyyy-mm-ddtransaction_date_maxstring Not required Show transactions created before (<=). Format yyyy-mm-ddsince_idinteger Not required Show transactions from the specified ID (>=)limitinteger Not required Limit number of returned transactions. Maximum 5000, default is 5000reference_numberstring Not required Get transaction by reference codeamount_innumber Not required Get incoming transaction matching specified amountamount_outnumber Not required Get outgoing transaction matching specified amount
Example usage
Get transactions after *08:00 AM on April 30, 2023- and before 12:00 PM on May 2, 2023
cURLcurl -X GET "https://my.sepay.vn/userapi/transactions/list?transaction_date_min=2023-04-30%2008:00:00&transaction_date_max=2023-05-02%2012:00:00" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"Get transactions from ID 49050 onwards
cURLcurl -X GET "https://my.sepay.vn/userapi/transactions/list?since_id=49050" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"Get 20 most recent transactions for bank account number 0071000888888
cURLcurl -X GET "https://my.sepay.vn/userapi/transactions/list?account_number=0071000888888&limit=20" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"Filter transaction with reference code 171158.050523.060001
cURLcurl -X GET "https://my.sepay.vn/userapi/transactions/list?reference_number=171158.050523.060001" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"Get transactions with incoming amount of 16,848,000
cURLcurl -X GET "https://my.sepay.vn/userapi/transactions/list?amount_in=16848000" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"
Get details of a transaction
GET
/userapi/transactions/details/{transaction_id}Content-Type: application/json
Authorization: Bearer {YOUR_API_TOKEN}
- Retrieve detailed information of a transaction by ID
- Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
transaction_id | integer | Required | Transaction ID |
Count the number of transactions
GET
/userapi/transactions/countContent-Type: application/json
Authorization: Bearer {YOUR_API_TOKEN}
- Count total number of transactions.
- Query Parameters
Name Type Required Description account_numberstring Not required Bank account numbertransaction_date_minstring Not required Show transactions created after (>=). Format yyyy-mm-ddtransaction_date_maxstring Not required Show transactions created before (<=). Format yyyy-mm-ddsince_idinteger Not required Show transactions from the specified ID (>=)
Example usage
- Count total transactions of bank account number 0071000888888.cURL
curl -X GET "https://my.sepay.vn/userapi/transactions/count?account_number=0071000888888" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"
- Count total transactions of bank account number 0071000888888.