This document will introduce you to all the basic information you need to better
understand our technologies
Etegram Dev
Etegram for developers offers a range of services that make it possible for you to send and
receive money across the world in minutes. On this page, we'll go over some of the payment
services we offer to give you a quick overview of what is obtainable with Etegram Dev.
Getting Started
Before you can gain access to our developers APIs you must create an account with us, Signup, then upgrade your account to either KYC 2 or KYC
3.
KYC 3 Requirements:
UPGRADE YOUR ACCOUNT
Certificate of Incoperation
Memart document
KYC 2 Requirements:
Ugrade your Etegram wallet
Add your first, middle and last name
Verify your phone number
Add your Address
Webhook
Webhooks are an important part of your payment integration. They allow Etegram notify you about events that happen on your account, such as a successful payment or a failed transaction.
A webhook URL is an endpoint on your server where you can receive notifications about such events. When an event occurs, we'll make a POST request to that endpoint, with a JSON body containing the details about the event, including the type of event and the data associated with it.
There are two major keys that enables users make requests to our APIs.
Types of Keys:
SECRET KEY (Do not share this key with anyone)
PUBLIC KEY, USER OR MERCHANT ID
Note
DO NOT SHARE YOUR SECRET KEY WITH ANYONE, YOUR SECRET KEY IS USED TO DETERMINE
SENSITIVE, IMPORTANT AND SECRET ACTIONS
Accept Payments
To accept a payment, create a transaction using our API, our client Javascript library, Popup JS, or our SDKs. Every transaction includes a link that can be used to complete payment.
Popup
Etegram Popup provides a simple and convenient payment flow for web. It can be integrated in five easy steps, making it the easiest way to start accepting payments. See demo of the payment methods on the checkout here
Collect customer information:
To initialize the transaction, you'll need to provide your clients' information such as email, first name, last name, amount, transaction reference, etc. Note: Email and amount are considered imperative. You can also pass any other additional information in the meta parameter. Here is the full list of parameters you can pass:
JSON VALUES AND THEIR DEFINITION:
Value
Definition
amount
This is the amount you want the client to pay
merchantId
This is your User Id.
depositorsEmail
This is the depositors Email.
depositorsPhone
This is the depositors Phone Number.
currency
This is the transacting currency.
refid
Unique case sensitive transaction reference. Note: Only -,., =and alphanumeric characters are allowed. Etegram generates a unique reference for you when this parameter is missing or you've failed to provide this parameter.
openType
Always set this value to ETEGRAMPAY
chargeType
This is the value that determines who settles incurred charges. users can chose to one of two available options. chargeClient is used to specify if charges should be placed on the client and chargeMe specifies if charges are settled by the user.
redirectUrl
Set this value to your redirect url. This value is a URL where your client will be redirected to, if the transaction is Successful or failed
meta
This is where you can pass any additional information about the transaction. Note if you pass a code our API will convert the code to an HTML entity, You can later decode the value with any HTML entity decode function.
The customer information can be retrieved from your database if you already have it stored, or from a form like in the example below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Etegrampay | Demo</title>
</head>
<body>
<h1>Pay me NGN 1,000</h1>
<button onclick="startPayment()">Pay NGN 1,000</button>
<script src="https://etegram.com/apis/inline/script.js"></script>
<script>
function startPayment(){
var paymentInfo = {
amount: 1000, // Amount to pay
merchantId: "", // your user ID or Public key
depositorsEmail: "example@gmail.com", // Depositors Email
depositorsPhone: "09000776543", // Depositors phone
currency: "NGN", // currency
refid: 1628454281, // your unique id
openType: "ETEGRAMPAY", // set this to ETEGRAMPAY
chargeType: "chargeClient",
redirectUrl: "https://example.com/etegram/", // success or failed page.
meta: "1"// information about the transaction
};
payWithEtegram(paymentInfo);
}
</script>
</body>
</html>
In this sample, notice how:
The Etegram inline javascript is included using a script tag. This is how you import Etegram into your code.
The amount here can be hardcoded if you want to charge a specific amount.
Verify expected transaction currency.
The Pay button has been tied to an onClick function called payWithEtegram. This is the action that causes the Etegram popup to load.
Redirect URL
After a successful or failed transaction your client will be redirected to your Redirect URL.
Etegram will append a get request that will look like this
After a successful charge, you need to verify that the payment was successful with Etegram before giving value to your customer on your website or App. For every transaction, there is a transaction ID
Here are some important things to check for when verifying the payment:
Verify the transaction id.
Verify the status of the transaction to be success
Verify the currency to be the expected currency
Most importantly validate the amount paid to be equal to or at least greater than the amount of the value to be given.
Save the transaction id and transaction information in your database.
Check your database if you had already given out the value.
Send a POST request to this endpoint
https://etegram.com/apis/verifyTransaction/index.php to Validate your transaction
CURL for ID OF THE TRANSACTION
curl https://etegram.com/apis/verifyTransaction/index.php
-H "Authorization: Bearer Your SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "ID": "Id of the transaction"
}'
}'
-X POST
CURL for THE REF ID OF THE TRANSACTION
curl https://etegram.com/apis/verifyRefId/index.php
-H "Authorization: Bearer Your SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "refid": "ref id of the transaction"
}'
}'
-X POST
Etegram allows you to initiate single and bulk transfers to bank accounts and make transfers to vendors all from your Etegram account. You can either use the money you have earned as income i.e. (money collected from your customer's using Etegram) or fund your balance on Etegram to initiate transfers to bank accounts & mobile money wallets in:
Nigeria
Ghana
Kenya
Uganda
Tanzania
Tanzania
South Africa
Zambia
Ivory Coast
Cameroon
Sierra Leone
Burkina Faso
Guinea Bissau
Mali
Senegal
Rwanda
Tunisia
Guinea Conakry
Transfers can be done from the dashboard or using our APIs. To make a transfer, you only need to make a POST request to our /transfers endpoint.
Get all banks
Get list of banks you can transfer to
CURL
curl https://etegram.com/apis/getBanks/index.php
-H "Authorization: Bearer Your SECRET_KEY"
-H "Content-Type: application/json"
-X POST
This page describes the process for verifying bank account numbers
It is Important to verify users' credentials before initiating payments or giving value. Etegram gives you the ability to verify bank account numbers through our account resolution endpoint:
Etegram allows you to initiate single and bulk transfers to Etegram wallets and make transfers to vendors all from your Etegram account. You can either use the money you have earned as income i.e. (money collected from your customer's using Etegram) or fund your balance on Etegram to initiate transfers to Etegram users:
Transfers can be done from the dashboard or using our APIs. To make a transfer, you only need to make a POST request to our /transfers-etegram endpoint.
Account verification
This page describes the process for verifying Etegram account numbers
It is Important to verify users' credentials before initiating payments or giving value. Etegram gives you the ability to verify user names, user_id and phone numbers.
CURL
curl https://etegram.com/apis/verifyBankAccount/etegram.php
-H "Authorization: Bearer Your SECRET_KEY"
-H "Content-Type: application/json"
-d '{"user_email": "User Email"
}'
}'
-X POST
Successful response
{"status":"success","message":"Account details fetched","user_id":"98373563","user_email":"example@gmail.com","user_name":"Example co LTD","user_phone":"+23490009876"}
Create a transfer
This will show you how to initiate a transfer to a Etegram user
CURL
curl https://etegram.com/apis/widthdraw/etegram.php
-H "Authorization: Bearer Your SECRET_KEY"
-H "Content-Type: application/json"
-d '{"user_email": "USER EMAIL",
"amount": "AMOUNT TO TRANSFER",
"narration":"reason for transaction",
"currency":"NGN",
"debit_currency": "NGN",
"reference": "your reference"
}'
}'
-X POST
Successful response
{"status":"success","message":"Transfer successful","amount":"2000","currency":"NGN","debit_currency":"NGN","reference":"dgdtet5gdgbs", "narration":"PAYOUT FROM WIXS","user_id":"98373563","user_email":"example@gmail.com","user_name":"Example co LTD","user_phone":"+23490009876"}