View Source AtEx.Gateway.Payments.Bank.Checkout (AtEx v0.20.23)

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

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

Functions

@spec 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