AtEx v0.20.21 AtEx.Gateway.Payments.Query.FetchWalletTransactions View Source
Fetch your wallet transactions by sending a HTTP GET request to the following endpoint
Link to this section Summary
Functions
Fetch your wallet transactions by sending a HTTP GET request to the following endpoint
Process results from calling the gateway
Link to this section Types
Link to this type
option()
View Sourceoption() :: {:method, Tesla.Env.method()} | {:url, Tesla.Env.url()} | {:query, Tesla.Env.query()} | {:headers, Tesla.Env.headers()} | {:body, Tesla.Env.body()} | {:opts, Tesla.Env.opts()}
Link to this section Functions
Fetch your wallet transactions by sending a HTTP GET request to the following endpoint
Parameters
attrs: - a map containing:
pageNumber
- The number of the page you’d like to read results from. Please Note: This STARTS from1
and NOT0
count
- The number of transaction results you would like for this query. Must be> 1
and< 1,000
- and optional parameters
startDate
,endDate
,categories
,provider
,status
,source
,destination
andproviderChannel
For more on how to use these keys https://build.at-labs.io/docs/payments%2Fquery%2Ffetch_wallet_transactions
Example
iex>AtEx.Gateway.Payments.Query.FetchWalletTransactions.fetch_wallet_transactions(%{ pageNumber: 1, count: 10})
{:ok,
%{
"description" => "Success",
"responses" => [
%{
"balance" => "KES 90.0000",
"category" => "Debit",
"date" => "2020-07-13 13:46:08",
"description" => "MobileB2B Payment Request to Mine",
"transactionId" => "ATPid_2504d5f5d28256fa264e815518e3ab0d",
"value" => "KES 10.0000"
},
%{
"balance" => "KES 90.0000",
"category" => "Debit",
"date" => "2020-07-10 18:50:22",
"description" => "MobileB2C Payment Request to +254724540000",
"transactionId" => "ATPid_5e635fa1099b4c7f69e63a0cbc3120c4",
"value" => "KES 10.0000"
},
%{
"balance" => "KES 90.0000",
"category" => "Debit",
"date" => "2020-07-01 15:18:33",
"description" => "MobileB2C Payment Request to +254724540000",
"transactionId" => "ATPid_beeb0be6b1bff57ec8f32675fe3f6e72",
"value" => "KES 10.0000"
}
],
"status" => "Success"
}}
Process results from calling the gateway