You can use our GET Transaction API to get a list of transactions made by any of your sub account.
This can be useful if you plan to display several transactions data from your Xendit Dashboard and/or API to your website or your app.
Please note that you can only query the transactions listed in the Transaction Tab, as opposed to Balance Tab, nor any other tabs.
Steps:
Using List Transation API to get the list of all transactions made by sub account
Follow the tutorial on this link:
https://developers.xendit.co/api-reference/?bash#list-transactions
- The endpoint that will be used is as follows:
GET https://api.xendit.co/transactions
- Make sure that you have inputted the correct Master Account’s API Key on the right place;
- Input the Business ID of your Sub Account on header, under parameter "for-user-id";
- If this parameter is not inputted, the API will retrieve transactions made by your master account by default
- Click "Send";
Using List Transation API to get the filtered list of transactions made by sub account
Follow the tutorial on this link:
https://developers.xendit.co/api-reference/?bash#list-transactions
- Modify the endpoint that will be used in accordance to the API Reference link above, as you desired:
- Example:
GET https://api.xendit.co/transactions?types=PAYMENT&types=DISBURSEMENT&statuses=SUCCESS&channel_categories=VIRTUAL_ACCOUNT
- Example:
- Make sure that you have inputted the correct Master Account’s API Key on the right place;
- Input the Business ID of your Sub Account on header, under parameter "for-user-id";
- If this parameter is not inputted, the API will retrieve transactions made by your master account by default
- Click "Send";
Using Get Transation API to get a particular transaction made by sub account
Follow the tutorial on this link:
https://developers.xendit.co/api-reference/?bash#get-transaction
- The endpoint that will be used is as follows:
GET https://api.xendit.co/transactions/{transaction_id}
- Make sure that you have inputted the correct Master Account’s API Key on the right place;
- Input the Business ID of your Sub Account on header, under parameter "for-user-id";
- If this parameter is not inputted, the API will retrieve the transaction made by your master account by default
- Input the ID of your transaction on the endpoint, pasting over "{transacton_id}";
- Click "Send";