1. 文檔地址
2. api分類
- 2.1 M-PEASE API
- C2B API - Customer to busness This is the normal paybill and and till number service,
- B2C API - This enables business to send money directly to a list of phone number
- B2B API - This enables business to pay other businesses
- Lipa na M-Pesa Online Payment
- 2.2 OAuth API 基於oauth2.0 獲取access_token
三、準備步驟
四、webd端集成
讓客戶諮詢了mpesa客服, 暫時不支持pc端支付。 谷歌上有其餘方式集成, 能夠本身去看看。ios
五、Android 與 IOS 集成
- 安卓和ios是使用STKPush方式(Lipa na M-Pesa Online Payment)
-
5.1 接口文檔web
-
5.2 接口參數json
-- | 參數 | 長度 | 描述 |
---|---|---|---|
-- | BusinessShortCode | 5-6位數字 | 理解爲商戶訂單號 |
-- | Password | base64.encode(Shortcode+Passkey+Timestamp) | |
-- | Timestamp | YYYYMMDDHHmmss | |
-- | TransactionType | CustomerPayBillOnline 或者 CustomerBuyGoodsOnline | |
-- | Amount | 付款金額 | |
-- | PartyA | 註冊手機號(簡單地理解,MSISDN就是手機號)國家碼+手機號 肯尼亞254xxxxxxxxx 國家碼前面0去掉否則報invalid phoneNumber | |
-- | PartyB | 5-6位數字, 能夠和BusinessShortCode一致 | |
-- | PhoneNumber | 接收skt請求的手機號, 能夠與partA一致 | |
-- | CallBackURL | 支付成功, mPease回調地址 | |
-- | AccountReference | 最大12字符 | 支付彈出的提示 |
-- | TransactionDesc | 最大13字符 | 交易描述 |
- Shortcode獲取
- Passkey獲取
- 5.3 返回值