### Create Order Request Example Source: https://developer.ethiotelecom.et/docs/H5%20C2B%20Web%20Payment%20Integration%20Quick%20Guide/requestCreateOrder This is an example of a request body for creating a payment order. It includes all necessary parameters for the preorder method. ```json { "biz_content": { "appid": "1072905731584000", "business_type": "BuyGoods", "merch_code": " 000000", "merch_order_id": "201907161732001", "notify_url": "http://test.payment.com/notify", "redirect_url": "http://test.payment.com/redirect", "timeout_express": "120m", "title": "iphone1", "total_amount": "12", "trade_type": "Checkout", "trans_currency": "ETB" }, "method": "payment.preorder", "nonce_str": "fcab0d2949e64a69a212aa83eab6ee1d", "sign": "JYyVqFAmdgBG4n1eBQYUwNlC...", "sign_type": "SHA256WithRSA", "timestamp": "1535166225", "version": "1.0" } ``` -------------------------------- ### Response Example Value Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/ApplyFabricToken This is an example of the JSON response received after successfully applying for a fabric token. ```json { "effectiveDate": "20221101132422", "expirationDate": "20221101142422", "token": "Bearer 94cc42be4412696d754508c06ca1db20" } ``` -------------------------------- ### Create Order Request Example Source: https://developer.ethiotelecom.et/docs/MiniApp%20Integration%20with%20Supper%20APP/RequestCreateOrder This is an example of the JSON payload for creating an order. It includes the biz_content, method, nonce_str, sign, sign_type, timestamp, and version. ```json { "biz_content": { "appid": "1072905731584000", "business_type": "BuyGoods", "merch_code": " 000000", "merch_order_id": "201907161732001", "notify_url": "http://test.payment.com/notify", "redirect_url": "http://test.payment.com/redirect", "timeout_express": "120m", "title": "iphone1", "total_amount": "12", "trade_type": "InApp", "trans_currency": "ETB" }, "method": "payment.preorder", "nonce_str": "fcab0d2949e64a69a212aa83eab6ee1d", "sign": "JYyVqFAmdgBG4n1eBQYUwNlC...", "sign_type": "SHA256WithRSA", "timestamp": "1535166225", "version": "1.0" } ``` -------------------------------- ### Create Order Response Example Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/RequestCreateOrder This is an example of a successful response when creating an order. It includes fields like result, code, msg, nonce_str, sign, sign_type, and biz_content. ```json { "result": "SUCCESS", "code": "0", "msg": "success", "nonce_str": "97fe4ae0c0604854a749fbf2cc1cc712", "sign": "Eo4Bvwx9rpaWAO+iYzaaXHoWBWbYcCGnVZMEcG5TPb8w...", "sign_type": "SHA256WithRSA", "biz_content": { "merch_order_id": "1705460512562", "prepay_id": "080075a4e3213924de2b3b84ad3cac0a6a6001" } } ``` -------------------------------- ### CreateDisburseOrder Request Body Example Source: https://developer.ethiotelecom.et/docs/Schedule%20Payment/CreateDisburseOrder This is an example of the complete request body for the CreateDisburseOrder API, including all required parameters and their typical values. ```json { "timestamp": "1563161657", "method": "payment.disbursement", "nonce_str": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS", "sign_type": "SHA256WithRSA", "sign": "BC4EE8D710BAC6A7E33DE4511A1CE7723024615EEF491B80DEF7DC743D4DADBE", "version": "1.0", "biz_content": { "appid": "914633313806501", "merch_code": "200001", "merch_order_id": "201907161732001", "trade_type": "Mandate", "title": "GameRecharge", "payee_msisdn": "900000000", "total_amount": "2000", "trans_currency": "ETB", "operator_id": "0000", "timeout_express": "120m", "business_type": "BuyGoods", "note_payer": "XXXX", "mandate_contract_id": "string", "mct_contract_no": "XXXX" } } ``` -------------------------------- ### Query Order Request Example Source: https://developer.ethiotelecom.et/docs/H5%20Integration%20with%20Supper%20APP/queryOrder This is an example of a request body for the queryOrder interface. Ensure all required parameters like timestamp, method, nonce_str, sign_type, sign, version, and biz_content are correctly populated. ```json { "timestamp": "2025-10-13 19:19:38", "method": "payment.queryorder", "nonce_str": "b93f8165b83e46a9abea4aaa7dc173a8", "sign_type": "SHA256WithRSA", "sign": "dmeUb5r9PF9aBy6/1D54XjELYbKcCzGF6e1yxOA4/WIy1on0TpyD.....", "version": "1.0", "biz_content": { "appid": "12312b84664d44679693855d82a291", "merch_code": "200001", "merch_order_id": "201907161732001" } } ``` -------------------------------- ### Refund Order Request Example Source: https://developer.ethiotelecom.et/docs/MiniApp%20Integration%20with%20Supper%20APP/RefundOrder This is an example of a POST request to the refundOrder endpoint. Ensure all parameters, especially the signature and biz_content, are correctly formatted and populated. ```json { "timestamp": "175938855330", "nonce_str": "sdnoe9ufqbe4uuib7subschqg3gjrm8t", "method": "payment.refund", "sign_type": "SHA256WithRSA", "sign": "JKc//uJevJVAelpc9LfQpHm/GoExSkGQ9hNuQwQLnSmRhZSeKPVnMMxh/AuobPuNmeBGmHH/3gk+FxVCsqOmvUZDOUYhdZZbdBZh6dqDYfXfMGj9pZ9xLipeUv0DU4nzVF2Posu5r3MVLVNOSN6zXzgohQc3wsOXi1Pkw9+MgsHiDtlT4K/5m6VOf/iE1zv9DJZQiFzC/ts3HoSEzFVpsCbwW5aeaX2EfMkGTrsMy0yePLhHAa5TIt777Vfjm16nsXnZDtGD6zULuhPJWkU8qogqy1kwDh+l4ojCYHo70YPg1B4bY9WxPeRWmxe4DcEQTWf/ylUxU75S/E9KFPdEvw==", "version": "1.0", "biz_content": { "merch_order_id": "{{merch_order_id}}", "appid": "{{MerchantId}}", "trans_currency": "ETB", "actual_amount": "amount", "merch_code": "{{MerchantCode}}", "refund_request_no": "{{refund_request_no}}", "refund_reason": "refund test" } } ``` -------------------------------- ### Request Body Schema Example Source: https://developer.ethiotelecom.et/docs/H5%20Integration%20with%20Supper%20APP/RequestCreateOrder This example demonstrates the structure of the request body for creating an order. It includes the main request parameters and the nested biz_content object with its specific parameters. ```json { "biz_content": { "appid": "1072905731584000", "business_type": "BuyGoods", "merch_code": " 000000", "merch_order_id": "201907161732001", "notify_url": "http://test.payment.com/notify", "redirect_url": "http://test.payment.com/redirect", "timeout_express": "120m", "title": "iphone1", "total_amount": "12", "trade_type": "InApp", "trans_currency": "ETB" }, "method": "payment.preorder", "nonce_str": "fcab0d2949e64a69a212aa83eab6ee1d", "sign": "JYyVqFAmdgBG4n1eBQYUwNlC...", "sign_type": "SHA256WithRSA", "timestamp": "1535166225", "version": "1.0" } ``` -------------------------------- ### Initialize and Start Payment Source: https://developer.ethiotelecom.et/docs/In%20App%20SDK%20Integration/AndroidInAppSDKIntegration Use the PayInfo builder to set payment parameters and then invoke the SDK's pay method to initiate the payment process. ```java final PayInfo payInfo = new PayInfo.Builder() .setAppId(appId) .setShortCode(shortCode) .setReceiveCode(receiveCode) .setReturnApp(returnApp) .build(); PaymentManager.getInstance().pay(this, payInfo); ``` -------------------------------- ### Example RawRequest for Creating an Order Source: https://developer.ethiotelecom.et/docs/In%20App%20SDK%20Integration/DevelopmentPreparation This example demonstrates the format of the rawRequest string used for creating an order. Parameters are sorted by ASCII code, and empty values are excluded from the signature. ```text appid=1072905731584000&business_type=BuyGoods&merch_code=200001&merch_order_id=201907161732001&method=payment.preorder&nonce_str=fcab0d2949e64a69a212aa83eab6ee1d¬ify_url=http://test.payment.com/notify&redirect_url=http://test.payment.com/redirect&timeout_express=120m×tamp=1535166225&title=iphone1&total_amount=12&trade_type=Checkout&trans_currency=ETB&version=1.0 ``` -------------------------------- ### CreateDisburseOrder API Response Example Source: https://developer.ethiotelecom.et/docs/Schedule%20Payment/CreateDisburseOrder This is an example of a successful response from the CreateDisburseOrder API. It shows the structure and typical values for each parameter, including the nested biz_content object. ```json { "result": "SUCCESS", "code": "0", "msg": "Success", "nonce_str": "274E40E9388047778768B67068B9C8AF", "sign": "BC4EE8D710BAC6A7E33DE4511A1CE7723024615EEF491B80DEF7DC743D4DADBE", "sign_type": "string", "biz_content": { "merch_order_id": "201907151435001", "payment_order_id": "007a6bd3175cdb3c658545a4f3f85fac23143239021", "total_amount": "string", "trans_currency": "string", "pay_success_time": "string", "payer_fee": "string", "payee_fee": "string" } } ``` -------------------------------- ### Create Order Request Example Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/RequestCreateOrder This is an example of a request body for creating a payment order. It includes all required parameters for the biz_content and the main request, such as app ID, merchant details, order information, and signature parameters. ```json { "biz_content": { "appid": "1072905731584000", "business_type": "TransferToOtherOrg", "merch_code": " 000000", "merch_order_id": "201907161732001", "notify_url": "http://test.payment.com/notify", "redirect_url": "http://test.payment.com/redirect", "timeout_express": "120m", "title": "iphone1", "total_amount": "12", "trade_type": "WebCheckout", "trans_currency": "ETB" }, "method": "payment.preorder", "nonce_str": "fcab0d2949e64a69a212aa83eab6ee1d", "sign": "JYyVqFAmdgBG4n1eBQYUwNlC...", "sign_type": "SHA256WithRSA", "timestamp": "1535166225", "version": "1.0" } ``` -------------------------------- ### Example RawRequest for Querying an Order Source: https://developer.ethiotelecom.et/docs/In%20App%20SDK%20Integration/DevelopmentPreparation This example shows the rawRequest string format for querying an order. It follows the same signing rules as order creation, including parameter sorting and exclusion of empty values. ```text appid=1072905731584000&merch_code=200001&merch_order_id=201907161732001&method=payment.queryorder&nonce_str=5K8264ILTKCH16CQ2502SI8ZNMTM67VS×tamp=1535166225&version=1.0 ``` -------------------------------- ### Query Order API Request Example Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/queryOrder This is an example of a request body for the Query Order API. It includes all necessary parameters to query the status of a specific order. ```json { "timestamp": "1678886400", "method": "payment.queryorder", "nonce_str": "b93f8165b83e46a9abea4aaa7dc173a8", "sign_type": "SHA256WithRSA", "sign": "dmeUb5r9PF9aBy6/1D54XjELYbKcCzGF6e1yxOA4/WIy1on0TpyD.....", "version": "1.0", "biz_content": { "appid": "12312b84664d44679693855d82a291", "merch_code": "200001", "merch_order_id": "201907161732001" } } ``` -------------------------------- ### Request Body Example Source: https://developer.ethiotelecom.et/docs/SIM%20Swap%20API/Check%20SIM%20swap Provides an example of the JSON payload required for the SIM swap check request. Ensure the phoneNumber is in the E.164 format and maxAge is a non-negative integer. ```json { "phoneNumber": "+251912345678", "maxAge": 240 } ``` -------------------------------- ### Unsigned Request Body Example Source: https://developer.ethiotelecom.et/docs/MiniApp%20Integration%20with%20Supper%20APP/RequestSignatureProcess This is a sample request body before signing. It includes all necessary parameters except for the 'sign' and 'signType'. ```json { "timestamp": "1755866096", "nonce_str": "RQWL32B8Q6IIBS5OHIECTM02P20373A7", "method": "payment.preorder", "version": "1.0", "biz_content": { "notify_url": "https://www.google.com", "appid": "1227484825753601", "merch_code": "101011", "merch_order_id": "1755866910890", "trade_type": "Checkout", "title": "diamond_1.5", "total_amount": "1.5", "trans_currency": "ETB", "timeout_express": "120m" } } ``` -------------------------------- ### Query Order API Response Example Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/queryOrder This is an example of a successful response from the Query Order API. It provides details about the order status, payment information, and transaction specifics. ```json { "result": "SUCCESS", "code": "0", "msg": "success", "nonce_str": "b93f8165b83e46a9abea4aaa7dc173a8", "sign": "dmeUb5r9PF9aBy6/1D54XjELYbKcCzGF6e1yxOA4/WIy1on0TpyD.....", "sign_type": "SHA256WithRSA", "biz_content": { "merch_order_id": "G32QWMKYLZQJ", "order_status": "PAY_SUCCESS", "payment_order_id": "11801107AD19191408215009", "trans_time": "2025-10-13 19:19:38", "trans_currency": "ETB", "total_amount": "1260.00", "trans_id": "CJD7GBOXIP" } } ``` -------------------------------- ### Service Configuration Example Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/RequestCreateOrder Configuration file for the request service, including base URL and API keys. Ensure you replace placeholder values with your actual credentials. ```javascript module.exports = { baseUrl: "https://xxx:38443/apiaccess/payment/gateway", fabricAppId: "your X-APP-Key", appSecret: "your appSecret", merchantAppId: "your merchantAppId", merchantCode: "your merchantCode", }; ``` -------------------------------- ### Request Body Example Value Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/ApplyFabricToken This is an example of the JSON request body required to apply for a fabric token. ```json { "appSecret": "851bdccee2f83622658a45e3ddc40188" } ``` -------------------------------- ### Example HTTP Response (Error) Source: https://developer.ethiotelecom.et/docs/In%20App%20SDK%20Integration/RequestCreateOrder Example structure for an HTTP error response from the API, indicating an error code and message. ```json { "errorCode": "string", "errorMsg": "string" } ``` -------------------------------- ### Create Order Response Example Source: https://developer.ethiotelecom.et/docs/H5%20C2B%20Web%20Payment%20Integration%20Quick%20Guide/requestCreateOrder Illustrates the structure of a successful response from the Create Order service, including result, code, message, signature, and business content with order and prepayment IDs. ```json { "result": "SUCCESS", "code": "0", "msg": "success", "nonce_str": "97fe4ae0c0604854a749fbf2cc1cc712", "sign": "Eo4Bvwx9rpaWAO+iYzaaXHoWBWbYcCGnVZMEcG5TPb8w...", "sign_type": "SHA256WithRSA", "biz_content": { "merch_order_id": "1705460512562", "prepay_id": "080075a4e3213924de2b3b84ad3cac0a6a6001" } } ``` -------------------------------- ### Create Order Service Implementation Source: https://developer.ethiotelecom.et/docs/In%20App%20SDK%20Integration/RequestCreateOrder Service implementation for creating an order, handling token application, order creation, and response processing. Requires external modules for utilities and configuration. ```javascript const applyFabricToken = require("./applyFabricTokenService"); const tools = require("../utils/tools"); const config = require("../config/config"); const https = require("http"); var request = require("request"); exports.createOrder = async (req, res) => { let title = req.body.title; let amount = req.body.amount; let applyFabricTokenResult = await applyFabricToken(); let fabricToken = applyFabricTokenResult.token; let createOrderResult = await exports.requestCreateOrder( fabricToken, title, amount ); console.log(createOrderResult); let prepayId = createOrderResult.biz_content.prepay_id; let rawRequest = createRawRequest(prepayId); res.send(rawRequest); }; exports.requestCreateOrder = async (fabricToken, title, amount) => { return new Promise((resolve) => { let reqObject = createRequestObject(title, amount); var options = { method: "POST", url: config.baseUrl + "/payment/v1/merchant/inapp/createOrder", headers: { "Content-Type": "application/json", "X-APP-Key": config.fabricAppId, Authorization: fabricToken, }, rejectUnauthorized: false, //add when working with https sites requestCert: false, //add when working with https sites agent: false, //add when working with https sites body: JSON.stringify(reqObject), }; request(options, (error, response) => { if (error) throw new Error(error); let result = JSON.parse(response.body); resolve(result); }); }); }; function createRequestObject(title, amount) { let req = { timestamp: tools.createTimeStamp(), nonce_str: tools.createNonceStr(), method: "payment.preorder", version: "1.0", }; let biz = { notify_url: "your notify api url", //When the payment is completed, the payment callback result is sent to this URL. trade_type: "InApp", appid: config.merchantAppId, merch_code: config.merchantCode, merch_order_id: createMerchantOrderId(), title: title, business_type: "BuyGoods", total_amount: amount, trans_currency: "ETB", timeout_express: "120m", payee_identifier: config.merchantCode, payee_identifier_type: "04", payee_type: "3000", redirect_url: "https://www.bing.com", }; req.biz_content = biz; req.sign = tools.signRequestObject(req); // tools code you can download form demo req.sign_type = "SHA256WithRSA"; console.log(req); return req; } function createMerchantOrderId() { return new Date().getTime() + ""; } function createRawRequest(prepayId) { let map = { appid: config.merchantAppId, merch_code: config.merchantCode, nonce_str: tools.createNonceStr(), // tools code you can download form demo prepay_id: prepayId, timestamp: tools.createTimeStamp(), // tools code you can download form demo }; let sign = tools.signRequestObject(map); // tools code you can download form demo let rawRequest = [ "appid=" + map.appid, "merch_code=" + map.merch_code, "nonce_str=" + map.nonce_str, "prepay_id=" + map.prepay_id, "timestamp=" + map.timestamp, "sign=" + sign, "sign_type=SHA256WithRSA", ].join("&"); return rawRequest; } module.exports = createOrder; ``` -------------------------------- ### Start Pay with Android SDK Source: https://developer.ethiotelecom.et/docs/In%20App%20SDK%20Integration/%20CheckOut Initiate the checkout process using the `startPay` method after obtaining the `receiveCode`. Ensure all required parameters like `appId`, `shortCode`, and `receiveCode` are correctly set. ```java function startPay(receiveCode){ final PayInfo payInfo = new PayInfo.Builder() .setAppId(appId) .setShortCode(shortCode) .setReceiveCode(receiveCode) .setReturnApp(returnApp) .build(); PaymentManager.getInstance().pay(this, payInfo); } ``` -------------------------------- ### Query Mandate Details API Response Example Source: https://developer.ethiotelecom.et/docs/Schedule%20Payment/QueryMandateDetails This is an example of a successful response from the Query Mandate Details API. It includes the biz_content which contains all details about the mandate. ```json { "biz_content": { "appid": "string", "create_time": "2023-07-28T17:40:18.964Z", "currency": "string", "execute_time": "2023-07-28", "expiry_date": "2023-07-28", "mandate_contract_id": "string", "mandate_description": "string", "mandate_name": "string", "mandate_prod": "string", "mandate_template_id": "string", "merch_contract_no": "string", "payer_id": "string", "payer_type": "string", "payment_order_id": "string", "period_count": 0, "period_type": "string", "single_amount": "string", "status": "string", "total_amount": "string" }, "code": "string", "msg": "string", "nonce_str": "string", "result": "string", "sign": "string", "sign_type": "SHA256WithRSA" } ``` -------------------------------- ### Query Order API Response Example Source: https://developer.ethiotelecom.et/docs/H5%20C2B%20Web%20Payment%20Integration%20Quick%20Guide/queryOrder This is an example of a successful response from the Query Order API. It includes details about the transaction status, order IDs, and amounts. ```json { "result": "SUCCESS", "code": "0", "msg": "success", "nonce_str": "b93f8165b83e46a9abea4aaa7dc173a8", "sign": "dmeUb5r9PF9aBy6/1D54XjELYbKcCzGF6e1yxOA4/WIy1on0TpyD.....", "sign_type": "SHA256WithRSA", "biz_content": { "merch_order_id": "G32QWMKYLZQJ", "order_status": "PAY_SUCCESS", "payment_order_id": "11801107AD19191408215009", "trans_time": "2025-10-13 19:19:38", "trans_currency": "ETB", "total_amount": "1260.00", "trans_id": "CJD7GBOXIP" } } ``` -------------------------------- ### Configure Supper App Integration Settings Source: https://developer.ethiotelecom.et/docs/MiniApp%20Integration%20with%20Supper%20APP/AuthToken Set up base URL and application keys for the Supper App integration. Ensure these values are correctly configured before use. ```javascript module.exports = { ... baseUrl: "https://xxx:38443/apiaccess/payment/gateway", fabricAppId: "your X-APP-Key", appSecret: "your appSecret", merchantAppId: "your merchantAppId", }; ``` -------------------------------- ### Example HTTP Response (405: Invalid input) Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/RequestCreateOrder This is an example of an HTTP response when the input provided to the API is invalid. It includes an error code and a corresponding error message. ```json { "errorCode": "string", "errorMsg": "string" } ``` -------------------------------- ### Initiate Checkout Process Source: https://developer.ethiotelecom.et/docs/MiniApp%20Integration%20with%20Supper%20APP/%20CheckOut Initiate the checkout process using the rawRequest obtained from the create order API. This function calls the Super App's native 'startPay' method with the rawRequest and business type, handling success and error callbacks. ```javascript function startPay(rawRequest) { // rawRequest get from create order api if (!rawRequest) { ma.showToast({ title: "Error: Invalid payment request" }); return; } window.ma .native("startPay", { rawRequest: rawRequest, bussinessType: "BuyGoods", }) .then((startPayRes) => { //success callback if (startPayRes.resultCode === "1") { //pay success } }) .catch((err) => { window.console.log(err); }) .finally(() => { }); } ``` -------------------------------- ### Configuration for applyFabricToken Service Source: https://developer.ethiotelecom.et/docs/H5%20C2B%20Web%20Payment%20Integration%20Quick%20Guide/applyFabricToken This file sets up the configuration variables, including the base URL, Fabric App ID, and app secret, required for the applyFabricToken service. Replace placeholder values with your actual credentials. ```javascript module.exports = { baseUrl: "https://xxx:38443/apiaccess/payment/gateway", fabricAppId: "your X-APP-Key", appSecret: "your appSecret", }; ``` -------------------------------- ### Refund Order Request Example Source: https://developer.ethiotelecom.et/docs/H5%20B2B%20Web%20Payment%20Integration/RefundOrder This is an example of a POST request body for the refundOrder interface. It includes all necessary parameters for initiating a refund, such as transaction details and refund information. Ensure all placeholder values like {{merch_order_id}} are replaced with actual data. ```json { "timestamp": "175938855330", "nonce_str": "sdnoe9ufqbe4uuib7subschqg3gjrm8t", "method": "payment.refund", "sign_type": "SHA256WithRSA", "sign": "JKc//uJevJVAelpc9LfQpHm/GoExSkGQ9hNuQwQLnSmRhZSeKPVnMMxh/AuobPuNmeBGmHH/3gk+FxVCsqOmvUZDOUYhdZZbdBZh6dqDYfXfMGj9pZ9xLipeUv0DU4nzVF2Posu5r3MVLVNOSN6zXzgohQc3wsOXi1Pkw9+MgsHiDtlT4K/5m6VOf/iE1zv9DJZQiFzC/ts3HoSEzFVpsCbwW5aeaX2EfMkGTrsMy0yePLhHAa5TIt777Vfjm16nsXnZDtGD6zULuhPJWkU8qogqy1kwDh+l4ojCYHo70YPg1B4bY9WxPeRWmxe4DcEQTWf/ylUxU75S/E9KFPdEvw==", "version": "1.0", "biz_content": { "merch_order_id": "{{merch_order_id}}", "appid": "{{MerchantId}}", "trans_currency": "ETB", "actual_amount": "amount", "merch_code": "{{MerchantCode}}", "refund_request_no": "{{refund_request_no}}", "refund_reason": "refund test" } } ```