in-app-sdk

InApp SDK

Embed Telebirr payments directly inside your iOS or Android mobile app. The SDK handles the payment UI — your app passes a receiveCode and listens for the result.

Server-side: Use the PHP (melaku/telebirr) or JS/TS (@melakudemeke/telebirr-js) library’s createInAppOrder() to get the receiveCode. Client-side: Pass it to the iOS or Android SDK to launch the payment UI.

The short version:

// 1. Server: create the in-app order
$tokenInfo = $client->applyFabricToken();
$order = $client->createInAppOrder($tokenInfo['token'], 'Item name', '50.00');
$receiveCode = $order['biz_content']['receiveCode'];
 
// 2. Return receiveCode to your mobile app
echo json_encode(['receiveCode' => $receiveCode]);
 
// 3. Mobile app passes receiveCode to the SDK → payment UI launches