EasyPay
Browse guides
DocsPayment guides

Inline checkout

Initiate and poll a mobile payment using a public key in a browser or mobile app.

Start inline checkout

The public client supports Telebirr, CBE Birr, Coopay-Ebirr and M-Pesa. Get the order reference and payable amount from your backend.

import { easyPay } from "@realkal/easy-pay";

const inline = new easyPay({
  publicKey: chapaPublicKey,
  maxRetry: 3,
  retryDelay: 3,
});

const result = await inline.createPayment({
  paymentType: "telebirr",
  amount: order.totalETB,
  mobile: customerPhone,
  txRef: order.txRef,
});

Resume polling

A pending result retains the merchant and provider references. Pass the provider reference to the public polling endpoint.

if (result.status === "pending" && result.data.providerRef) {
  await inline.verifyPayment(result.data.providerRef, "telebirr", order.txRef);
}

When inline polling reports success, the SDK returns awaiting_verification. Ask your own backend to verify the order. Chapa inline integration

Next guide Order verification