Initiate Payments

This document covers payment transaction and its establishment with the help of our Direct charges API, or our SDKs.

This solution is specifically designed for physical stores and integrated Enterprise Resource Planning (ERP) software.

Chapa Inline, Standard, and HTML checkout make it easy for you to collect payments via card, bank, or any of our supported methods with one integration. However, they’re bundled with the Chapa UI, branding and experience.

Sometimes you want more control, or a custom solution that fits in with your app. That’s where direct charge comes in. We provide the APIs to charge customers, but you collect their payment information yourself and bring your own UI and payment flow. This means you can customize and control the customer’s experience as you wish.

With direct charge, you’ll have to integrate separately for each payment method you want to support, which can be tasking. Use direct charge only when your customers will be using a specific payment method (like cards or banks).

How does direct charge work?

There are three main stages in direct charge:

  • Initiate the payment: You send the transaction details and the customer’s payment details to the appropriate charge endpoints.
  • Authorize the charge: The customer authorizes the charge with their payment provider, such as their mobile wallet issuer or bank. This completes the charge.
  • Verify the payment: As a failsafe, you’ll call our API to verify that the payment was successful before giving value (the verify transaction endpoint).

These steps vary depending on the payment method (for example, some mobile money charge may include multiple authorization steps including OTPs). We’ll explain what applies to each method in its guide.

Direct charge options

Here are the different options for collecting payments via direct charge. Each type of direct charge has its own unique requirements and authorization flow. Follow the links to view detailed guides for each type:

  • telebirr
  • mpesa
  • Amole
  • CBEBirr
  • Coopay-Ebirr
  • AwashBirr

Query

Parameter Required Type Description
       
type yes string The payment method you are interested to charge your customer with. Allowed values are telebirr,mpesa, cbebirr, awash_birr, ebirr, amole.

Body Params

Before carrying out the transaction, a user must provide required information such as full name, email address, the amount to transfer, etc. Below you will find a list of parameter needed:

Parameter Required Type Description
key yes Bearer Key This will be your private key from Chapa. When on test mode use the test key, and when on live mode use the live key.
email no email A customer’s email. address
amount yes digits The amount you will be charging your customer.
first_name no string A customer’s first name.
last_name no string A customer’s last name.
mobile yes digits The customer’s phone number.
tx_ref yes string A unique reference given to each transaction.
currency yes string The currency in which all the charges are made. Currency allowed is ETB.

If you pass a mobile, it must be 10 digits, so it should be in 09xxxxxxxx or 07xxxxxxxx format.

Initialize the Transaction and Get a response

Once all the information needed to proceed with the transaction is retrieved, the action taken further would be to associate the following information into the javascript function(chosen language) which will innately display the checkout.
Endpoint https://api.chapa.co/v1/charges?type={payment_method_name}

Method POST

Headers

  • Authorization * : Pass your secret key as a bearer token in the request header to authorize this call.

Refer to our Error Codes page for all responses for this request.


Bulk Transfers
Authorize Payments
Next →