AtEx v0.20.21 AtEx.Gateway.Payments.WalletTransfer View Source
This module implements the Wallet transfer Africas Talking API endpoint to allow a user to transfer money from one Payment Product to another Payment Product hosted on Africa’s Talking.
Link to this section Summary
Functions
Process results from calling the gateway
Wallet transfer APIs allow you to transfer money from one Payment Product to another Payment Product hosted on Africa’s Talking.
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
Process results from calling the gateway
Wallet transfer APIs allow you to transfer money from one Payment Product to another Payment Product hosted on Africa’s Talking.
Parameters
map: - a map containing:
productName
Africa’s Talking Payment product to initiate this transaction.targetProductCode
Unique product code of the Africa’s Talking Payment Product to transfer the funds to.currencyCode
3-digit ISO format currency code for the value of this transaction (e.g KES, UGX, USD)amount
Amount - in the provided currency - that the application will be topped up with.metadata
A 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.WalletTransfer.transfer(%{ currencyCode: "KES", amount: 1500.00, productName: "AtEx", targetProductCode: 564, metadata: %{ message: "Electricity Bills"}})
{:ok,
%{
"status" => "Success",
"description" => "Transfered funds to sandbox [TestProduct]",
"transactionId" => "ATPid_SampleTxnId123"
}
}