View Source AtEx.Gateway.Payments.TopupStash (AtEx v0.20.23)
This is the Topup stash module that implements APIs to allow you to move money from a Payment Product to an Africa’s Talking application stash. An application stash is the wallet that funds your service usage expences.
Summary
Functions
Process results from calling the gateway
Topup stash APIs allow you to move money from a Payment Product to an Africa’s Talking application stash. An application stash is the wallet that funds your service usage expences.
Functions
Process results from calling the gateway
Topup stash APIs allow you to move money from a Payment Product to an Africa’s Talking application stash. An application stash is the wallet that funds your service usage expences.
Parameters
map: - a map containing:
productNameAfrica’s Talking Payment product to initiate this transaction.currencyCode3-digit ISO format currency code for the value of this transaction (e.g KES, UGX, USD)amountAmount - in the provided currency - that the application will be topped up with.metadataA map of any metadata that you would like us to associate with the request. Use this field to send data that will map notifications to topup stash requests. It will be included in the notification we send once the topup stash request is completed.
Example
iex> AtEx.Gateway.Payments.TopupStash.topup(%{ currencyCode: "KES", amount: 1500, productName: "AtEx", metadata: %{ message: "I am here"}})
{:ok,
%{
"status" => "Success",
"description" => "Topped up user stash. New Stash Balance: KES 1500.00",
"transactionId" => "ATPid_SampleTxnId123"
}
}