InApp SDK Introduction
The InApp SDK embeds Telebirr’s payment flow directly inside your iOS or Android app. Instead of redirecting to a browser, the SDK opens the Telebirr payment screen as a native in-app UI.
InApp vs H5 C2B
| H5 C2B (Web) | InApp SDK (Mobile) | |
|---|---|---|
| Platform | Browser | iOS / Android native app |
| Payment UI | Browser redirect to Telebirr page | Native SDK overlay in your app |
| What you get from the server | Checkout URL → redirect | receiveCode → pass to SDK |
| Customer experience | Leaves your site | Stays in your app |
Use InApp SDK when you’re building a native mobile app and want to keep the user in your app during payment.
How it works
Mobile App Your Server Telebirr
| | |
|—— "start payment" ——————————> | |
| |—— applyFabricToken ————————> |
| | <—— token ———————————————— |
| |—— createInAppOrder ————————> |
| | <—— { receiveCode } ———————— |
| <—— { receiveCode } ————————— | |
| | |
|—— SDK.pay(receiveCode) ————————————————————————————————————> |
| (SDK handles payment UI) |
| <—— SDK callback (result) ——————————————————————————————————— |
| | |
| | <—— POST notify_url ————————— |
| |—— verify & fulfill ——— |The key difference from the web flow: instead of a checkout URL, you get a receiveCode string. The SDK uses it to authenticate and launch the payment UI.
The receiveCode format
TELEBIRR$BUYGOODS$<shortCode>$<amount>$<prepay_id>$<timeout>
Example:
TELEBIRR$BUYGOODS$500358$50.00$202307261139071684121154928791554$30You don’t build this string yourself — it comes back from the createInAppOrder API call in biz_content.receiveCode. The library extracts it for you.