My OneApp 图标

My OneApp M-PESA 与钱包数据 API

Safaricom PLC · 支付

My OneApp 是 Safaricom PLC 面向肯尼亚的安卓超级应用,把该国 M-PESA 钱包与 GSM 号码收进同一首页(Play 包名 com.safaricom.mpesa.lifestyle)。用户收发肯尼亚先令、向 Lipa na M-PESA 的 till 与 paybill 付款、缴已保存账单、钱包不足时动用 Fuliza 透支、兑换 Bonga 积分、把现金放入 Ziidi 单位信托、用 Family Connect 给亲属分享话费,并同时查看 GSM 话费、流量与 M-PESA 余额。PIN、OTP 与 SIM 头 enrichment 登录与生物识别解锁并列。它是 Safaricom M-PESA 肯尼亚业务的默认消费端,与 Airtel Money Kenya、Equitel 以及独立的 Fuliza 类信贷应用争夺同一批先令钱包。

M-PESA 流水行用 transID、money_in、money_out 与 runningBalance 钉住每笔转账;首页 GSM 快照把 airtimeBalance、dataBalance 与 mpesaBalance 挂在用量计数器(remaining、cumulative、units)旁边。Fuliza 额度落在 overdraftBalance、useOdAmount、accessFee 与 interestRate;Bonga 积分报告 bongaPointsBalance 与 bongaPointsAccumulated;Ziidi 货币市场行带着 fundName、marketValue 与 dailyInterestPercentage。

Paybill 确认会在扣款前把 shortcode 解析成 publicName 与 customerType;已存账单保留 paybillNo、accountNo 与 dueDate;Family Connect 成员暴露 sponsorBalance 以及每条线路的 beneficiaryMsisdn 与 usageAmount。司库机器人轧平先令现金账,家庭应用盯着 Fuliza Principal,储蓄看板把 Ziidi 画在钱包旁边。openData Studio 把这些记录变成可调用的开放数据。

应用截图

  • My OneApp 应用截图 1
  • My OneApp 应用截图 2
  • My OneApp 应用截图 3
  • My OneApp 应用截图 4
  • My OneApp 应用截图 5
  • My OneApp 应用截图 6

API 端点一览

以下端点与请求/响应示例均依据应用界面推导重构,为示意说明,并非实际抓包。

  • 订户 GSM 与钱包余额

    POST /v1/subscribers/me/balances openbanking

    加载首页 GSM 快照(airtimeBalance、creditLimit、dataBalance)以及按套餐划分的用量计数器(displayName、remaining、cumulative、units),话费与流量分享界面会把它们与 mpesaBalance 并排展示。

    认证方式: 登录后签发的 Bearer 会话令牌。首页余额读取不要求 PIN。

    • airtimeBalance
    • creditLimit
    • dataBalance
    • mpesaBalance
    • displayName
    • displayOrder
    • remaining
    • cumulative
    • status
    • type
    • units
    • balanceDetails
    • balanceCode
    • expiry
    POST /v1/subscribers/me/balances HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "msisdn": "254712345678"
    }
    {
      "airtimeBalance": "125.50",
      "creditLimit": "0.00",
      "dataBalance": "2048",
      "mpesaBalance": "4320.00",
      "usage": [
        {
          "displayName": "Data",
          "displayOrder": 1,
          "remaining": "1536",
          "cumulative": "2048",
          "status": "ACTIVE",
          "type": "DATA",
          "units": "MB",
          "balanceDetails": [
            {
              "active": true,
              "remaining": "1536",
              "balanceCode": "DATA_MAIN",
              "expiry": "2026-11-01",
              "displayName": "Anytime data",
              "units": "MB"
            }
          ]
        }
      ]
    }
  • M-PESA 流水行

    POST /v1/wallet/statements/query openbanking

    按日期区间返回 M-PESA 流水行(transID、money_in、money_out、runningBalance、primaryParty、receiverParty),供应用内迷你对账单与 PDF 导出界面使用。

    认证方式: 登录后签发的 Bearer 会话令牌。

    • startDate
    • endDate
    • accountRef
    • accountType
    • accountTypeID
    • currency
    • details
    • endTime
    • funds_type
    • id
    • money_in
    • money_out
    • transID
    • transactionFee
    • runningBalance
    • transactionType
    • transactionTypeID
    • reasonType
    • reversible
    • primaryParty
    • receiverParty
    POST /v1/wallet/statements/query HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "startDate": "2026-10-01",
      "endDate": "2026-10-17"
    }
    {
      "result": {
        "statements": [
          {
            "id": "st-88921",
            "transID": "QJH7X2K9L0",
            "accountRef": "254712345678",
            "accountType": "MSISDN",
            "accountTypeID": "1",
            "currency": "KES",
            "details": "Send money to Jane",
            "endTime": "2026-10-17T08:41:12+03:00",
            "funds_type": "Pesa",
            "money_in": "0.00",
            "money_out": "500.00",
            "transactionFee": "7.00",
            "runningBalance": "4320.00",
            "transactionType": "SendMoney",
            "transactionTypeID": "SM",
            "reasonType": "P2P",
            "reasonTypeID": "12",
            "reversible": "Y",
            "primaryParty": {"id": "254712345678", "name": "JOHN DOE", "type": "MSISDN"},
            "receiverParty": {"id": "254798765432", "name": "JANE W.", "type": "MSISDN"}
          }
        ]
      }
    }
  • Fuliza 透支客户信息

    POST /v1/credit/overdraft/profile openfinance

    读取 Fuliza 透支信息(accessFee、useOdAmount、okoaAmount、interestRate、channelSessionId)以及首页与 Fuliza 界面上的 overdraftBalance;历史行带有 Principal、Interest 与 AccessFee。

    认证方式: 登录后签发的 Bearer 会话令牌。首页与 Fuliza 管理界面均会调用。

    • channelSessionId
    • accessFee
    • useOdAmount
    • okoaAmount
    • currency
    • interestRate
    • overdraftBalance
    • Currency
    • TransactionTime
    • BusinessScope
    • TransactionType
    • AccessFee
    • Principal
    • Interest
    • TransactionAmount
    POST /v1/credit/overdraft/profile HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "header": {"msisdn": "254712345678"},
      "body": {}
    }
    {
      "channelSessionId": "ch-4412",
      "accessFee": "1.00",
      "useOdAmount": "350.00",
      "okoaAmount": "0.00",
      "currency": "KES",
      "interestRate": "1.083",
      "overdraftBalance": "2650.00",
      "entries": [
        {
          "Currency": "KES",
          "TransactionTime": "2026-10-16T19:02:11+03:00",
          "BusinessScope": "P2P",
          "TransactionType": "FULIZA",
          "AccessFee": "1.00",
          "Principal": "350.00",
          "Interest": "3.79",
          "TransactionAmount": "354.79"
        }
      ]
    }
  • Shiriki 转账付款

    POST /v1/transfers/send openbanking

    依据 originatorConversationID、amount、receiverParty 与加密 pin 执行 Lipa / 转账,并返回 transactionId、responseCode 与 responseDesc。

    认证方式: Bearer 会话令牌,另附在转账确认界面提交的 RSA 加密 PIN。

    • originatorConversationID
    • amount
    • remark
    • cardID
    • cardType
    • accountNumber
    • receiverParty
    • initiator
    • pin
    • transactionId
    • responseDesc
    • responseCode
    • responseType
    POST /v1/transfers/send HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "originatorConversationID": "oc-9f21c0ab",
      "amount": "500",
      "remark": "rent",
      "cardID": "",
      "cardType": "MPESA",
      "accountNumber": "254798765432",
      "receiverParty": {"id": "254798765432", "type": "MSISDN"},
      "initiator": {"id": "254712345678", "type": "MSISDN"},
      "pin": "RSA-CIPHERTEXT"
    }
    {
      "transactionId": "QJH7X2K9L0",
      "responseDesc": "Success",
      "responseCode": "0",
      "responseType": 0
    }
  • C2B Hakikisha 收款方核验

    POST /v1/merchants/lookup osint

    把 Lipa na M-PESA 的 shortcode 与 accountNumber 解析为 publicName、shortCode、customerType 与 msisdn,供 paybill / till 确认界面在扣款前展示机构名称。

    认证方式: 登录后签发的 Bearer 会话令牌。

    • shortcode
    • accountNumber
    • publicName
    • shortCode
    • customerType
    • msisdn
    • avatar
    • businessType
    POST /v1/merchants/lookup HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "shortcode": "888888",
      "accountNumber": "INV-10482"
    }
    {
      "verifyNumberResp": {
        "publicName": "Nairobi Water",
        "shortCode": "888888",
        "customerType": "ORGANIZATION",
        "msisdn": "254700000000",
        "avatar": "https://cdn.example/org.png"
      },
      "businessType": "PAYBILL"
    }
  • Bonga 积分累计历史

    POST /v1/loyalty/points/history opendata

    用 msisdn 与日期区间拉取 bongaPointsAccumulated、bongaPointsBalance 与 accumulationDate,供积分历史界面使用。

    认证方式: 登录后签发的 Bearer 会话令牌。

    • msisdn
    • startDate
    • endDate
    • bongaPointsAccumulated
    • bongaPointsBalance
    • accumulationDate
    POST /v1/loyalty/points/history HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "msisdn": "254712345678",
      "startDate": "2026-01-01",
      "endDate": "2026-10-17"
    }
    {
      "bongaPointsAccumulated": "1250",
      "bongaPointsBalance": "880",
      "accumulationDate": "2026-10-17"
    }
  • Ziidi 单位信托余额

    POST /v1/investments/funds/holdings openfinance

    通过 unitTrustFundDetails(investorNames、fundName、marketValue、contributions、balance、dailyInterestPercentage)按 clientIdentifier 查询 Ziidi 货币市场持仓。

    认证方式: 登录后签发的 Bearer 会话令牌。投资、开通、赎回与自动投资也共用该路由,由请求体中的 operation 键区分。

    • serviceRequest
    • key
    • value
    • unitTrustFundDetails
    • clientIdentifier
    • isSuccess
    • message
    • responseCode
    • responseRefId
    • investorNames
    • fundShareClassCode
    • fundName
    • marketValue
    • contributions
    • balance
    • dailyInterestPercentage
    POST /v1/investments/funds/holdings HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "serviceRequest": {
        "header": {"msisdn": "254712345678"},
        "body": {
          "data": [
            {"key": "operation", "value": "checkBalance"}
          ]
        }
      }
    }
    {
      "isSuccess": true,
      "message": "OK",
      "responseCode": 200,
      "responseRefId": "zi-44190",
      "clientIdentifier": "ZIIDI-254712345678",
      "unitTrustFundDetails": {
        "clientIdentifier": "ZIIDI-254712345678",
        "investorNames": "JOHN DOE",
        "fundShareClassCode": "MMF-A",
        "fundName": "Ziidi Money Market",
        "marketValue": 12500.0,
        "contributions": 12000.0,
        "balance": 12500.0,
        "dailyInterestPercentage": "0.032"
      }
    }
  • 已保存账单账户

    POST /v1/bills/accounts/list openbanking

    列出账单管理看板上的已保存账单账户(accountName、accountNo、amount、billId、dueDate、paybillNo、reminderDate);常用收款方复用 debitPartyName、debitPartyNo 与 frequency。

    认证方式: 登录后签发的 Bearer 会话令牌。

    • bIllAccountsDto
    • accountName
    • accountNo
    • amount
    • billId
    • dueDate
    • imageUrl
    • msisdn
    • paybillNo
    • reminderDate
    • debitPartyName
    • debitPartyNo
    • frequency
    POST /v1/bills/accounts/list HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "msisdn": "254712345678"
    }
    {
      "bIllAccountsDto": [
        {
          "billId": 4412,
          "accountName": "Nairobi Water",
          "accountNo": "NW-8821",
          "amount": "1850.00",
          "dueDate": "2026-10-31",
          "imageUrl": "https://cdn.example/water.png",
          "msisdn": "254712345678",
          "paybillNo": 888888,
          "reminderDate": "2026-10-28"
        }
      ],
      "header": {"responseCode": "0"}
    }
  • 生成 M-PESA 电子回执

    POST /v1/receipts/render openbanking

    把交易引用(trxnID、accountRef、moneyIN、moneyOUT、participantName)转成 base64Data,即回执界面渲染的 PDF。

    认证方式: 登录后签发的 Bearer 会话令牌。

    • accountRef
    • creditDebit
    • moneyIN
    • moneyOUT
    • msisdn
    • name
    • participantName
    • participantNumber
    • trxnDate
    • trxnID
    • trxnType
    • trxnTypeName
    • base64Data
    POST /v1/receipts/render HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "accountRef": "QJH7X2K9L0",
      "creditDebit": "DEBIT",
      "moneyIN": 0,
      "moneyOUT": 500,
      "msisdn": "254712345678",
      "name": "JOHN DOE",
      "participantName": "JANE W.",
      "participantNumber": "254798765432",
      "trxnDate": "2026-10-17T08:41:12+03:00",
      "trxnID": "QJH7X2K9L0",
      "trxnType": "SendMoney",
      "trxnTypeName": "Send Money"
    }
    {
      "base64Data": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c+PgplbmRvYmoK"
    }
  • 头 enrichment 明文令牌

    GET /v1/identity/session-token osint

    签发登录流附带的短期明文令牌,使其无需订户手输号码即可解密 SIM 头 enrichment 得到的 MSISDN。

    认证方式: HTTP Basic(应用客户端凭据,Base64)外加标识 Android 客户端的来源系统请求头。无需用户 Bearer。随后用该令牌解密运营商头 enrichment 得到的 MSISDN。

    • token
    • msisdn
    GET /v1/identity/session-token HTTP/1.1
    Authorization: Basic <base64-client-credentials>
    X-Source-System: <android-client-id>
    {
      "token": "pt_8f21c0ab",
      "msisdn": "254712345678"
    }
  • Family Connect 共享余额

    POST /v1/family/shared-balance opendata

    按 sponsorMsisdn 读取出资人的共享话费余额:sponsorBalance、initialAmount、offerPrice、expirationDate 以及每位成员的 beneficiaryMsisdn、beneficiaryNickname 与 usageAmount。

    认证方式: 登录后签发的 Bearer 会话令牌。

    • sponsorMsisdn
    • sponsorBalance
    • initialAmount
    • offerPrice
    • expirationDate
    • beneficiaryBalances
    • beneficiaryMsisdn
    • beneficiaryNickname
    • amount
    • beneficiaryBalance
    • usageAmount
    • createdAt
    POST /v1/family/shared-balance HTTP/1.1
    Authorization: Bearer <session-token>
    Content-Type: application/json
    
    {
      "sponsorMsisdn": "254712345678"
    }
    {
      "sponsorMsisdn": "254712345678",
      "sponsorBalance": 800.0,
      "initialAmount": 1000.0,
      "offerPrice": 1000,
      "expirationDate": "2026-11-01",
      "beneficiaryBalances": [
        {
          "beneficiaryMsisdn": "254711111111",
          "beneficiaryNickname": "Mama",
          "amount": 200.0,
          "beneficiaryBalance": 150.0,
          "usageAmount": 50.0,
          "createdAt": "2026-10-01T09:00:00+03:00"
        }
      ]
    }

数据类别

  • 余额
  • 交易流水
  • 透支
  • 积分
  • 单位信托
  • 账单
  • 商户核验
  • 回执
  • 家庭分享

数据使用场景与案例

  • M-PESA 台账对账

    记账机器人按 transID、money_in、money_out 与 runningBalance 保存每条 Statement 行,再把 receiverParty.id 对到已保存 paybill 的 accountNo,肯尼亚中小企业无需导出 PDF 即可轧平当日先令现金账。

  • Fuliza 额度监控

    家庭财务产品盯着 overdraftBalance、useOdAmount、accessFee 与 interestRate,在钱包归零后出现新的 TransactionEntryResp Principal 时发出提醒。

  • Paybill 身份核验

    应付账款工具先查 shortcode 与 accountNumber,记下 publicName、customerType 与 businessType,员工确认 Lipa na M-PESA 扣款前可拦住输错的 till。

  • Ziidi 持仓快照

    储蓄看板按 clientIdentifier 拉取 unitTrustFundDetails 的 marketValue、contributions、balance 与 dailyInterestPercentage,方便家庭把 Ziidi 货币市场增长画在 M-PESA runningBalance 旁边。

常见问题

My OneApp 客户端暴露哪些对象?

M-PESA Statement 行(transID、money_in、money_out、runningBalance、primaryParty)、GSM LocalGsmBalances(airtimeBalance、dataBalance、mpesaBalance)、Fuliza 透支(overdraftBalance、useOdAmount、accessFee、interestRate)、Bonga 积分、Ziidi unitTrustFundDetails、已保存 BillAccountDto paybill、Hakikisha publicName 核验、电子回执 base64Data 以及 Family Connect 的 sponsorBalance。

这些调用如何鉴权?

SIM 头 enrichment 先用应用客户端凭据换取短期明文令牌以恢复 MSISDN。随后钱包、流水、Fuliza 与 Ziidi 调用携带 Bearer 会话;转账还会附上 RSA 加密的 PIN。

这是 Safaricom 的公开开发者 API 吗?

不是。这些是 Android 超级应用登录后发起的第一方调用,此处展示的路由仅为示意,用来说明数据结构,并非受支持的公开 M-PESA SDK。

与 My OneApp 相似的应用

  • Airtel Money — Airtel Money 是 Airtel 肯尼亚的移动钱包,可通过 *334# 或 My Airtel 应用发款、向商户付款(含 Lipa Na KCB),并在银行与其他网络之间转账。
  • T-Kash — T-Kash 是 Telkom Kenya 的移动钱包(应用与 USSD),可向 T-Kash、M-PESA 和 Airtel Money 转账,缴账单、付 till、买话费,并在代理点取现。
  • Equitel — Equitel 是 Equity Group 全资子公司 Finserve Africa 在肯尼亚的虚拟运营商,依托 Airtel Kenya 网络,用一张 SIM 办理 Equity 银行与移动支付业务。
  • Tala — Tala 是肯尼亚央行许可的数字贷款应用,审批后把最高 5 万肯尼亚先令的贷款直接打入 M-PESA。
  • Branch — Branch 是面向肯尼亚的数字金融应用,可在手机上申请贷款、钱包转账、缴账单和储蓄,面向不走传统银行网点的用户。
  • KCB App — KCB App(KCB Mobile Banking)是肯尼亚商业银行的消费端应用,用于缴水电费、买话费、向本行、他行、M-PESA 与 Vooma 钱包转账,以及申请无抵押手机贷款。
  • NCBA NOW — NCBA NOW 是 NCBA 集团的肯尼亚银行应用,可线上开立活期账户、向本行、他行、M-PESA 与 Airtel Money 转账、缴账单并申请即时手机贷款。

相关主题

  • My OneApp API
  • Safaricom M-PESA
  • Fuliza 透支
  • Bonga 积分
  • Ziidi 单位信托
  • Lipa na M-PESA
  • transID
  • runningBalance

需要集成这个 App 的数据 API?

我们可为任意指定 App 交付定制集成——源码交付 USD 500 起,或托管 API 按调用计费。告诉我们您需要的数据即可。

  • 每个项目均签 NDA 与 SOW
  • 3–7 天交付
  • 验收通过后才付款
  • 仅在授权范围内作业

获取报价