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)
PlatformBrowseriOS / Android native app
Payment UIBrowser redirect to Telebirr pageNative SDK overlay in your app
What you get from the serverCheckout URL → redirectreceiveCode → pass to SDK
Customer experienceLeaves your siteStays 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$30

You don’t build this string yourself — it comes back from the createInAppOrder API call in biz_content.receiveCode. The library extracts it for you.