Transaction API

Documentation on using the transaction API through OAuth2 in SePay.


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

GET
/api/v1/transactions
Authorization: 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:

bank_account_idinteger
Filter by bank account ID
account_numberstring
Filter by bank account number
reference_numberstring
Filter by transaction reference number
from_datedate
Filter transactions from date (format YYYY-MM-DD)
to_datedate
Filter transactions to date (format YYYY-MM-DD)
amount_outnumeric
Filter by outgoing amount
amount_innumeric
Filter by incoming amount
pageinteger
Page number, starting from 1
limitinteger
Number of results per page
1
2
3
4
5
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"
RESPONSE
{
    "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
        }
    }
}
idinteger

Transaction ID

bank_account_idinteger

Bank account ID

bank_brand_namestring

Bank name

account_numberstring

Bank account number

transaction_datedatetime

Transaction date and time

amount_outfloat

Outgoing amount (VND)

amount_infloat

Incoming amount (VND)

accumulatedfloat

Balance after transaction (VND)

transaction_contentstring

Transaction content

reference_numberstring

Transaction reference number

codestring/null

Payment code extracted from transaction content (if any)

sub_accountstring/null

Receiving sub-account (if any)


Error Codes

Below are the error codes that may be encountered when using the Transaction API:

400validation_error

Input data validation error

401unauthorized

Token is invalid or expired

403forbidden

No permission to access this resource


Next Step

Next, learn about the Webhooks API to set up automatic notifications when new transactions occur.