AtEx v0.20.21 AtEx.Gateway.Payments.Bank.Checkout View Source

This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking Bank Checkout API

Link to this section Summary

Functions

Bank checkout APIs allow your application to collect money into your payment wallet by initiating transactions that deduct money from a customers bank account.

Process results from calling the gateway

Link to this section Types

Link to this type

option()

View Source
option() ::
  {: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

Link to this function

bank_checkout(attrs)

View Source
bank_checkout(map()) :: {:ok, term()} | {:error, term()}

Bank checkout APIs allow your application to collect money into your payment wallet by initiating transactions that deduct money from a customers bank account.

Config

add bank_checkout_product_name key to your AtEx configs

Parameters

attrs: - a map containing bankAccount(a map), currencyCode, amount, narration and a map of metadata see the docs at https://build.at-labs.io/docs/payments%2Fbank%2Fcheckout for how to use these keys

Example

  iex>AtEx.Gateway.Payments.Bank.Checkout.bank_checkout(%{bankAccount: %{accountName: "KCB", accountNumber: "93892892", bankCode: 234001}, amount: 1000.00, currencyCode: "KES", narration: "Payment", metadata: %{detail: "A Bill"}})
  {:ok,
  %{
  "description" => "Payment is pending validation by the user",
  "status" => "PendingValidation",
  "transactionId" => "ATPid_0f4b78bf0926b4b05d131550f8fc4f2d"
  }}

Process results from calling the gateway