Transaction API

Transactions are bank transactions that have occurred. You can query detailed information of a transaction, list of transactions, and count the number of transactions.


API v1 Deprecated

API v1 is no longer being developed. Please use API v2 for new integrations. See the upgrade guide for details.

What Can You Do with Transactions?

SePay allows you to perform the following queries with Transactions:

GET
https://my.sepay.vn/userapi/transactions/list
  • Get list of transactions
GET
https://my.sepay.vn/userapi/transactions/details/{transaction_id}
  • Get details of a transaction
GET
https://my.sepay.vn/userapi/transactions/count
  • Count number of transactions

Get List of Transactions

GET
https://my.sepay.vn/userapi/transactions/list

Get all transactions. By default, only the 5000 most recent transactions are displayed.

Query Parameters
statusinteger

HTTP status code

errorstring

Error message (null if successful)

messagesobject
transactionsarray<object>
Code Examples
>
>
>
curl --request GET \
--url 'https://my.sepay.vn/userapi/transactions/list?account_number=0071000888888&transaction_date_min=2023-04-30&transaction_date_max=2023-05-02&since_id=49050&limit=100&reference_number=171158.050523.060001&amount_in=16848000&amount_out=500000' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Response
Response 200 - Transaction list
{
  "status": 200,
  "error": null,
  "messages": {
    "success": true
  },
  "transactions": [
    {
      "id": "49682",
      "bank_brand_name": "Vietcombank",
      "account_number": "0071000888888",
      "transaction_date": "2023-05-05 19:59:48",
      "amount_out": "0.00",
      "amount_in": "18067000.00",
      "accumulated": "1200541768.00",
      "transaction_content": "DUONG THUY ANH chuyen tien...",
      "reference_number": "677760.050523.080001",
      "code": null,
      "sub_account": "VCB0011ABC004",
      "bank_account_id": "19"
    }
  ]
}
statusinteger

HTTP status code

errorstring

Error message (null if successful)

messagesobject
transactionsarray<object>
Usage Examples

Get transactions after 08:00 on April 30, 2023 and before 12:00 on May 02, 2023

JScURL
1
2
3
curl -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

JScURL
1
2
3
curl -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 recent transactions of bank account number 0071000888888

JScURL
1
2
3
curl -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 transactions with reference number 171158.050523.060001

JScURL
1
2
3
curl -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

JScURL
1
2
3
curl -X GET "https://my.sepay.vn/userapi/transactions/list?amount_in=16848000" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Get Transaction Details

GET
https://my.sepay.vn/userapi/transactions/details/{transaction_id}

Get detailed information of a transaction by ID.

Path Parameters
statusinteger

HTTP status code

errorstring

Error message (null if successful)

messagesobject
transactionobject
Code Examples
>
>
>
curl --request GET \
--url https://my.sepay.vn/userapi/transactions/details/48673 \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Response
Response 200 - Transaction details
{
  "status": 200,
  "error": null,
  "messages": {
    "success": true
  },
  "transaction": {
    "id": "48673",
    "transaction_date": "2023-05-04 11:59:47",
    "account_number": "0071000888888",
    "sub_account": "VCB0011ABC002",
    "amount_in": "19689000.00",
    "amount_out": "0.00",
    "accumulated": "1128200335.00",
    "code": null,
    "transaction_content": "TRAN THIEN THAO chuyen tien...",
    "reference_number": "731086.040523.120001",
    "bank_brand_name": "Vietcombank",
    "bank_account_id": "19"
  }
}
statusinteger

HTTP status code

errorstring

Error message (null if successful)

messagesobject
transactionobject

Count Transactions

GET
https://my.sepay.vn/userapi/transactions/count

Count the total number of transactions.

Query Parameters
statusinteger

HTTP status code

errorstring

Error message (null if successful)

messagesobject
count_transactionsinteger

Total transaction count

Code Examples
>
>
>
curl --request GET \
--url 'https://my.sepay.vn/userapi/transactions/count?account_number=0071000888888&transaction_date_min=2023-04-30&transaction_date_max=2023-05-02&since_id=49050' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Response
Response 200 - Transaction count
{
  "status": 200,
  "error": null,
  "messages": {
    "success": true
  },
  "count_transactions": 2322
}
statusinteger

HTTP status code

errorstring

Error message (null if successful)

messagesobject
count_transactionsinteger

Total transaction count

Usage Example

Count the total number of transactions for bank account 0071000888888.

JScURL
1
2
3
curl -X GET "https://my.sepay.vn/userapi/transactions/count?account_number=0071000888888" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Error Handling

401Unauthorized

Invalid or missing token.

404Not Found

Transaction not found.

429Too Many Requests

Rate limit of 2 requests/second exceeded. Check x-sepay-userapi-retry-after header.