Loading...

Knowledge Base

Search Customer Transactions Using the API

When you want to search customer transactions using the API. This article explains available search filters, transaction types, payment status filters, sorting, pagination, and response details for matching transaction records.

Search Transactions of a Customer

Description

Gets a detailed list of Customer's Transactions, matching the search criteria.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
no-of-recordsIntegerRequiredNumber of Transactions to be fetched
page-noIntegerRequiredPage number for which details are to be fetched
customer-idArray of IntegersOptionalCustomer Id of the Customers(s) whose Transactions are to be fetched
usernameArray of StringsOptionalUsername of the Customer(s) whose Transactions are to be fetched
transaction-typeArray of StringsOptionalType of the Transactions. Possible values can be credit, debit, invoice, receipt.
transaction-keyStringOptionalTransaction key. Possible value can be manually or systemgenerated.
transaction-idArray of IntegersOptionalTransaction Ids
transaction-descriptionStringOptionalTransaction description
balance-typeStringOptional

Payment status for the Transaction. Possible values can be:

  • onlybalanced: Will fetch all transactions that have been balanced or paid for

  • onlyunbalanced: Will fetch all transactions that are yet to be balanced or paid

If this parameter is not included in the API call, all Transactions (balanced as well as unbalanced) will be fetched.

amt-range-startIntegerOptionalLowest amount in the range of Transactions you intend to list
amt-range-endIntegerOptionalHighest amount in the range of Transactions you intend to list
transaction-date-startStringOptionalUNIX TimeStamp for listing of Transactions whose Creation Date is greater than transaction-date-start
transaction-date-endStringOptionalUNIX TimeStamp for listing of Transactions whose Creation Date is less than transaction-date-end
order-byArray of StringsOptionalOne or more parameters by which you want to sort the Transactions.

Example: If page-no is 1, no-of-records is 30 and order-by is customer-id; it will fetch the first 30 Transactions which match the search criteria sorted by customer-id. If page-no is 2, no-of-records is 30 and order-by is customer-id; it will fetch the second batch of 30 Transactions sorted by customer-id.

HTTP Method

GET

Example Test URL Request


https://test.httpapi.com/api/billing/customer-transactions/search.json?auth-userid=0&api-key=key&no-of-records=1&page-no=1

Response

Returns a hash map of the Customer's Transactions containing the below details:

  • Transaction Id (customer_transaction.transid)

  • Transaction Date (customer_transaction.transactiondate)

  • Order Id associated with the Transaction (customer_transaction.orderid)

  • Product Key (customer_transaction.key)

  • Transaction Type (customer_transaction.type)

  • Transaction Description (customer_transaction.description)

  • Whether Transaction is Greedy (greedy)

  • Customer Id Associated with the Transaction (customer_transaction.customerid)

  • Selling Currency Symbol of the Parent Reseller (customer_transaction.sellingcurrencysymbol)

  • Transaction Amount in the Selling Currency (customer_transaction.sellingamount)

  • Unutilised Transaction Amount in the Selling Currency (customer_transaction.unutilisedsellingamount)

  • Accounting Currency Symbol of the Parent Reseller (customer_transaction.accountingcurrencysymbol)

  • Transaction Amount in the Accounting Currency (customer_transaction.accountingamount)

  • Unutilised Transaction Amount in the Accounting Currency (customer_transaction.unutilisedaccountingamount)

  • Foreign Exchange Difference (forexdiff)

In case of any errors, a status key with value as ERROR alongwith an error message will be returned.