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:

    GET
    https://my.sepay.vn/userapi/transactions/list
    • Get a 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 the number of transactions

Get a list of transactions

GET
/userapi/transactions/list
Content-Type: application/json
Authorization: Bearer {YOUR_API_TOKEN}
  • Retrieve all transactions. By default, only the 5000 most recent transactions are displayed.
  • Query Parameters
    NameTypeRequiredDescription
    account_number
    stringNot required
    Bank account number
    transaction_date_min
    stringNot required
    Show transactions created after (>=). Format yyyy-mm-dd
    transaction_date_max
    stringNot required
    Show transactions created before (<=). Format yyyy-mm-dd
    since_id
    integerNot required
    Show transactions from the specified ID (>=)
    limit
    integerNot required
    Limit number of returned transactions. Maximum 5000, default is 5000
    reference_number
    stringNot required
    Get transaction by reference code
    amount_in
    numberNot required
    Get incoming transaction matching specified amount
    amount_out
    numberNot 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

      cURL
      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

      cURL
      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 most recent transactions for bank account number 0071000888888

      cURL
      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 transaction with reference code 171158.050523.060001

      cURL
      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

      cURL
      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 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
NameTypeRequiredDescription
transaction_id
integerRequired
Transaction ID

Count the number of transactions

GET
/userapi/transactions/count
Content-Type: application/json
Authorization: Bearer {YOUR_API_TOKEN}
  • Count total number of transactions.
  • Query Parameters
    NameTypeRequiredDescription
    account_number
    stringNot required
    Bank account number
    transaction_date_min
    stringNot required
    Show transactions created after (>=). Format yyyy-mm-dd
    transaction_date_max
    stringNot required
    Show transactions created before (<=). Format yyyy-mm-dd
    since_id
    integerNot 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"