[{"data":1,"prerenderedAt":5945},["ShallowReactive",2],{"navigation":3,"search":569,"page-/api-reference/jsapi":4567,"surround-/api-reference/jsapi":5942},[4,109,540,559,564],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Developer's Guide",false,"/developers-guide","1.developers-guide",[10,30,45,60,90],{"title":11,"icon":6,"path":12,"stem":13,"children":14,"page":6},"Getting Started","/developers-guide/getting-started","1.developers-guide/1.getting-started",[15,20,25],{"title":16,"path":17,"stem":18,"icon":19},"Introduction","/developers-guide/getting-started/introduction","1.developers-guide/1.getting-started/1.introduction","i-lucide-rocket",{"title":21,"path":22,"stem":23,"icon":24},"What Are Miniapps","/developers-guide/getting-started/what-are-miniapps","1.developers-guide/1.getting-started/2.what-are-miniapps","i-lucide-app-window",{"title":26,"path":27,"stem":28,"icon":29},"MiniApps Lifecycle","/developers-guide/getting-started/miniapp-lifecycle","1.developers-guide/1.getting-started/3.miniapp-lifecycle","i-lucide-workflow",{"title":31,"icon":6,"path":32,"stem":33,"children":34,"page":6},"Config & Setup","/developers-guide/config-setup","1.developers-guide/2.config-setup",[35,40],{"title":36,"path":37,"stem":38,"icon":39},"Super Qi Console","/developers-guide/config-setup/super-qi-platforms","1.developers-guide/2.config-setup/1.super-qi-platforms","i-lucide-layout-dashboard",{"title":41,"path":42,"stem":43,"icon":44},"UAT and Credentials","/developers-guide/config-setup/uat","1.developers-guide/2.config-setup/2.uat","i-lucide-flask-conical",{"title":46,"icon":6,"path":47,"stem":48,"children":49,"page":6},"Create Your First Miniapp","/developers-guide/create-your-first-miniapp","1.developers-guide/3.create-your-first-miniapp",[50,55],{"title":51,"path":52,"stem":53,"icon":54},"Create Miniapp","/developers-guide/create-your-first-miniapp/create-miniapp","1.developers-guide/3.create-your-first-miniapp/1.create-miniapp","i-lucide-plus-circle",{"title":56,"path":57,"stem":58,"icon":59},"Configure & Test Miniapp","/developers-guide/create-your-first-miniapp/configure-and-test-miniapp","1.developers-guide/3.create-your-first-miniapp/2.configure-and-test-miniapp","i-lucide-settings",{"title":61,"icon":6,"path":62,"stem":63,"children":64,"page":6},"Demo Miniapp","/developers-guide/demo-miniapp","1.developers-guide/4.demo-miniapp",[65,70,75],{"title":66,"path":67,"stem":68,"icon":69},"Installation Steps","/developers-guide/demo-miniapp/installation-steps","1.developers-guide/4.demo-miniapp/1.installation-steps","i-lucide-download",{"title":71,"path":72,"stem":73,"icon":74},"Testing Locally","/developers-guide/demo-miniapp/testing-locally","1.developers-guide/4.demo-miniapp/2.testing-locally","i-lucide-play",{"title":76,"icon":6,"path":77,"stem":78,"children":79,"page":6},"Exploring the Code","/developers-guide/demo-miniapp/exploring-the-code","1.developers-guide/4.demo-miniapp/3.exploring-the-code",[80,85],{"title":81,"path":82,"stem":83,"icon":84},"Frontend","/developers-guide/demo-miniapp/exploring-the-code/frontend","1.developers-guide/4.demo-miniapp/3.exploring-the-code/1.frontend","i-lucide-layout-template",{"title":86,"path":87,"stem":88,"icon":89},"Backend","/developers-guide/demo-miniapp/exploring-the-code/backend","1.developers-guide/4.demo-miniapp/3.exploring-the-code/2.backend","i-lucide-server",{"title":91,"icon":6,"path":92,"stem":93,"children":94,"page":6},"Releasing to Production","/developers-guide/releasing-to-production","1.developers-guide/5.releasing-to-production",[95,100,105],{"title":96,"path":97,"stem":98,"icon":99},"Security Review","/developers-guide/releasing-to-production/security-review","1.developers-guide/5.releasing-to-production/1.security-review","i-lucide-qr-code",{"title":101,"path":102,"stem":103,"icon":104},"Merchant Registration","/developers-guide/releasing-to-production/merchant-registration","1.developers-guide/5.releasing-to-production/2.merchant-registration","i-lucide-building-2",{"title":106,"path":107,"stem":108,"icon":19},"Release Production Miniapp","/developers-guide/releasing-to-production/release-prod-miniapp","1.developers-guide/5.releasing-to-production/3.release-prod-miniapp",{"title":110,"path":111,"stem":112,"children":113,"icon":6},"API Reference","/api-reference","2.api-reference/1.index",[114,117,141,250,535],{"title":115,"path":111,"stem":112,"icon":116},"Overview","i-lucide-book-open",{"title":118,"icon":6,"path":119,"stem":120,"children":121,"page":6},"Flows","/api-reference/flows","2.api-reference/2.flows",[122,127,132,137],{"title":123,"path":124,"stem":125,"icon":126},"Cashier Payment","/api-reference/flows/cashier-payment","2.api-reference/2.flows/1.cashier-payment","i-lucide-credit-card",{"title":128,"path":129,"stem":130,"icon":131},"Authentication","/api-reference/flows/authentication","2.api-reference/2.flows/2.authentication","i-lucide-shield-check",{"title":133,"path":134,"stem":135,"icon":136},"Agreement Payment","/api-reference/flows/agreement-payment","2.api-reference/2.flows/3.agreement-payment","i-lucide-file-signature",{"title":138,"path":139,"stem":140,"icon":131},"Escrow Payment","/api-reference/flows/escrow-payment","2.api-reference/2.flows/4.escrow-payment",{"title":142,"path":143,"stem":144,"children":145,"icon":6},"OpenAPIs","/api-reference/open-apis","2.api-reference/3.open-apis/1.index",[146,147,162,206,225,240],{"title":115,"path":143,"stem":144,"icon":116},{"title":148,"icon":6,"path":149,"stem":150,"children":151,"page":6},"Authorization","/api-reference/open-apis/authorization","2.api-reference/3.open-apis/2.authorization",[152,157],{"title":153,"path":154,"stem":155,"icon":156},"applyToken","/api-reference/open-apis/authorization/apply-token","2.api-reference/3.open-apis/2.authorization/1.apply-token","i-lucide-square-asterisk",{"title":158,"path":159,"stem":160,"icon":161},"prepare","/api-reference/open-apis/authorization/prepare","2.api-reference/3.open-apis/2.authorization/2.prepare","i-lucide-file-cog",{"title":163,"icon":6,"path":164,"stem":165,"children":166,"page":6},"Payments","/api-reference/open-apis/payments","2.api-reference/3.open-apis/3.payments",[167,172,177,181,186,191,196,201],{"title":168,"path":169,"stem":170,"icon":171},"inquiryPayment","/api-reference/open-apis/payments/inquiry-payment","2.api-reference/3.open-apis/3.payments/1.inquiry-payment","i-lucide-receipt-text",{"title":173,"path":174,"stem":175,"icon":176},"inquiryRefund","/api-reference/open-apis/payments/inquiry-refund","2.api-reference/3.open-apis/3.payments/2.inquiry-refund","i-lucide-rotate-cw-square",{"title":178,"path":179,"stem":180,"icon":126},"pay","/api-reference/open-apis/payments/pay","2.api-reference/3.open-apis/3.payments/3.pay",{"title":182,"path":183,"stem":184,"icon":185},"refund","/api-reference/open-apis/payments/refund","2.api-reference/3.open-apis/3.payments/4.refund","i-lucide-rotate-ccw",{"title":187,"path":188,"stem":189,"icon":190},"merchantAccept","/api-reference/open-apis/payments/merchant-accept","2.api-reference/3.open-apis/3.payments/5.merchant-accept","i-lucide-check-circle",{"title":192,"path":193,"stem":194,"icon":195},"confirm","/api-reference/open-apis/payments/confirm-order","2.api-reference/3.open-apis/3.payments/6.confirm-order","i-lucide-package-check",{"title":197,"path":198,"stem":199,"icon":200},"cancel","/api-reference/open-apis/payments/cancel-payment","2.api-reference/3.open-apis/3.payments/7.cancel-payment","i-lucide-x-circle",{"title":202,"path":203,"stem":204,"icon":205},"void","/api-reference/open-apis/payments/void-payment","2.api-reference/3.open-apis/3.payments/8.void-payment","i-lucide-ban",{"title":207,"icon":6,"path":208,"stem":209,"children":210,"page":6},"Users","/api-reference/open-apis/users","2.api-reference/3.open-apis/4.users",[211,216,220],{"title":212,"path":213,"stem":214,"icon":215},"inquiryUserInfo","/api-reference/open-apis/users/inquiry-user-info","2.api-reference/3.open-apis/4.users/1.inquiry-user-info","i-lucide-user-round-search",{"title":217,"path":218,"stem":219,"icon":126},"inquiryUserCardList","/api-reference/open-apis/users/inquiry-user-card-list","2.api-reference/3.open-apis/4.users/2.inquiry-user-card-list",{"title":221,"path":222,"stem":223,"icon":224},"inquiryUserAccountList","/api-reference/open-apis/users/inquiry-user-account-list","2.api-reference/3.open-apis/4.users/3.inquiry-user-account-list","i-lucide-landmark",{"title":226,"icon":6,"path":227,"stem":228,"children":229,"page":6},"Messages","/api-reference/open-apis/messages","2.api-reference/3.open-apis/5.messages",[230,235],{"title":231,"path":232,"stem":233,"icon":234},"sendInbox","/api-reference/open-apis/messages/sendinbox","2.api-reference/3.open-apis/5.messages/1.sendInbox","i-lucide-inbox",{"title":236,"path":237,"stem":238,"icon":239},"sendPush","/api-reference/open-apis/messages/sendpush","2.api-reference/3.open-apis/5.messages/2.sendPush","i-lucide-bell",{"title":241,"icon":6,"path":242,"stem":243,"children":244,"page":6},"Merchants","/api-reference/open-apis/merchants","2.api-reference/3.open-apis/6.merchants",[245],{"title":246,"path":247,"stem":248,"icon":249},"inquiryMerchantInfo","/api-reference/open-apis/merchants/inquiry-merchant-info","2.api-reference/3.open-apis/6.merchants/1.inquiry-merchant-info","i-lucide-store",{"title":251,"path":252,"stem":253,"children":254,"icon":6},"JSAPI","/api-reference/jsapi","2.api-reference/4.jsapi/1.index",[255,256,289,343,377,402,442,462,486],{"title":115,"path":252,"stem":253,"icon":116},{"title":257,"icon":6,"path":258,"stem":259,"children":260,"page":6},"Essential APIs","/api-reference/jsapi/essential-apis","2.api-reference/4.jsapi/2.essential-apis",[261,266,270,274,279,284],{"title":262,"path":263,"stem":264,"icon":265},"getAuthCode","/api-reference/jsapi/essential-apis/get-auth-code","2.api-reference/4.jsapi/2.essential-apis/1.get-auth-code","i-lucide-key-round",{"title":267,"path":268,"stem":269,"icon":136},"qicardSignContract","/api-reference/jsapi/essential-apis/qicard-sign-contract","2.api-reference/4.jsapi/2.essential-apis/2.qicard-sign-contract",{"title":271,"path":272,"stem":273,"icon":126},"tradePay","/api-reference/jsapi/essential-apis/trade-pay","2.api-reference/4.jsapi/2.essential-apis/3.trade-pay",{"title":275,"path":276,"stem":277,"icon":278},"getDeviceInfo","/api-reference/jsapi/essential-apis/get-device-info","2.api-reference/4.jsapi/2.essential-apis/4.get-device-info","i-lucide-smartphone",{"title":280,"path":281,"stem":282,"icon":283},"navigateToMiniProgram","/api-reference/jsapi/essential-apis/navigate-to-miniprogram","2.api-reference/4.jsapi/2.essential-apis/5.navigate-to-miniprogram","i-lucide-arrow-right-circle",{"title":285,"path":286,"stem":287,"icon":288},"navigateBackMiniProgram","/api-reference/jsapi/essential-apis/navigate-back-miniprogram","2.api-reference/4.jsapi/2.essential-apis/6.navigate-back-miniprogram","i-lucide-arrow-left-circle",{"title":290,"icon":6,"path":291,"stem":292,"children":293,"page":6},"UI APIs","/api-reference/jsapi/ui-apis","2.api-reference/4.jsapi/3.ui-apis",[294,299,304,309,313,318,323,328,333,338],{"title":295,"path":296,"stem":297,"icon":298},"setNavigationBar","/api-reference/jsapi/ui-apis/setnavigationbar","2.api-reference/4.jsapi/3.ui-apis/1.setNavigationBar","i-lucide-layout-panel-top",{"title":300,"path":301,"stem":302,"icon":303},"multiLevelSelect","/api-reference/jsapi/ui-apis/multi-level-select","2.api-reference/4.jsapi/3.ui-apis/10.multi-level-select","i-lucide-list-tree",{"title":305,"path":306,"stem":307,"icon":308},"alert","/api-reference/jsapi/ui-apis/alert","2.api-reference/4.jsapi/3.ui-apis/2.alert","i-lucide-alert-circle",{"title":192,"path":310,"stem":311,"icon":312},"/api-reference/jsapi/ui-apis/confirm","2.api-reference/4.jsapi/3.ui-apis/3.confirm","i-lucide-message-square-warning",{"title":314,"path":315,"stem":316,"icon":317},"prompt","/api-reference/jsapi/ui-apis/prompt","2.api-reference/4.jsapi/3.ui-apis/4.prompt","i-lucide-message-square-text",{"title":319,"path":320,"stem":321,"icon":322},"showActionSheet","/api-reference/jsapi/ui-apis/show-action-sheet","2.api-reference/4.jsapi/3.ui-apis/5.show-action-sheet","i-lucide-menu",{"title":324,"path":325,"stem":326,"icon":327},"showLoading / hideLoading","/api-reference/jsapi/ui-apis/show-loading","2.api-reference/4.jsapi/3.ui-apis/6.show-loading","i-lucide-loader-circle",{"title":329,"path":330,"stem":331,"icon":332},"showToast / hideToast","/api-reference/jsapi/ui-apis/show-toast","2.api-reference/4.jsapi/3.ui-apis/7.show-toast","i-lucide-message-circle",{"title":334,"path":335,"stem":336,"icon":337},"choosePhoneContact","/api-reference/jsapi/ui-apis/choose-phone-contact","2.api-reference/4.jsapi/3.ui-apis/8.choose-phone-contact","i-lucide-contact",{"title":339,"path":340,"stem":341,"icon":342},"datePicker","/api-reference/jsapi/ui-apis/date-picker","2.api-reference/4.jsapi/3.ui-apis/9.date-picker","i-lucide-calendar",{"title":344,"icon":6,"path":345,"stem":346,"children":347,"page":6},"Media APIs","/api-reference/jsapi/media-apis","2.api-reference/4.jsapi/4.media-apis",[348,353,358,362,367,372],{"title":349,"path":350,"stem":351,"icon":352},"chooseImage","/api-reference/jsapi/media-apis/choose-image","2.api-reference/4.jsapi/4.media-apis/1.choose-image","i-lucide-image-plus",{"title":354,"path":355,"stem":356,"icon":357},"previewImage","/api-reference/jsapi/media-apis/preview-image","2.api-reference/4.jsapi/4.media-apis/2.preview-image","i-lucide-eye",{"title":359,"path":360,"stem":361,"icon":69},"saveImage","/api-reference/jsapi/media-apis/save-image","2.api-reference/4.jsapi/4.media-apis/3.save-image",{"title":363,"path":364,"stem":365,"icon":366},"getImageInfo","/api-reference/jsapi/media-apis/get-image-info","2.api-reference/4.jsapi/4.media-apis/4.get-image-info","i-lucide-info",{"title":368,"path":369,"stem":370,"icon":371},"compressImage","/api-reference/jsapi/media-apis/compress-image","2.api-reference/4.jsapi/4.media-apis/5.compress-image","i-lucide-minimize-2",{"title":373,"path":374,"stem":375,"icon":376},"chooseVideo","/api-reference/jsapi/media-apis/choose-video","2.api-reference/4.jsapi/4.media-apis/6.choose-video","i-lucide-video",{"title":378,"icon":6,"path":379,"stem":380,"children":381,"page":6},"Storage APIs","/api-reference/jsapi/storage-apis","2.api-reference/4.jsapi/5.storage-apis",[382,387,392,397],{"title":383,"path":384,"stem":385,"icon":386},"getStorage","/api-reference/jsapi/storage-apis/get-storage","2.api-reference/4.jsapi/5.storage-apis/1.get-storage","i-lucide-database",{"title":388,"path":389,"stem":390,"icon":391},"setStorage","/api-reference/jsapi/storage-apis/set-storage","2.api-reference/4.jsapi/5.storage-apis/2.set-storage","i-lucide-save",{"title":393,"path":394,"stem":395,"icon":396},"removeStorage","/api-reference/jsapi/storage-apis/remove-storage","2.api-reference/4.jsapi/5.storage-apis/3.remove-storage","i-lucide-trash-2",{"title":398,"path":399,"stem":400,"icon":401},"clearStorage","/api-reference/jsapi/storage-apis/clear-storage","2.api-reference/4.jsapi/5.storage-apis/4.clear-storage","i-lucide-eraser",{"title":403,"icon":6,"path":404,"stem":405,"children":406,"page":6},"File APIs","/api-reference/jsapi/file-apis","2.api-reference/4.jsapi/6.file-apis",[407,412,417,422,427,432,437],{"title":408,"path":409,"stem":410,"icon":411},"saveFile","/api-reference/jsapi/file-apis/save-file","2.api-reference/4.jsapi/6.file-apis/1.save-file","i-lucide-file-down",{"title":413,"path":414,"stem":415,"icon":416},"getFileInfo","/api-reference/jsapi/file-apis/get-file-info","2.api-reference/4.jsapi/6.file-apis/2.get-file-info","i-lucide-file-search",{"title":418,"path":419,"stem":420,"icon":421},"getSavedFileInfo","/api-reference/jsapi/file-apis/get-saved-file-info","2.api-reference/4.jsapi/6.file-apis/3.get-saved-file-info","i-lucide-file-text",{"title":423,"path":424,"stem":425,"icon":426},"getSavedFileList","/api-reference/jsapi/file-apis/get-saved-file-list","2.api-reference/4.jsapi/6.file-apis/4.get-saved-file-list","i-lucide-files",{"title":428,"path":429,"stem":430,"icon":431},"removeSavedFile","/api-reference/jsapi/file-apis/remove-saved-file","2.api-reference/4.jsapi/6.file-apis/5.remove-saved-file","i-lucide-file-x",{"title":433,"path":434,"stem":435,"icon":436},"openDocument","/api-reference/jsapi/file-apis/open-document","2.api-reference/4.jsapi/6.file-apis/6.open-document","i-lucide-file-type",{"title":438,"path":439,"stem":440,"icon":441},"chooseFileFromDisk","/api-reference/jsapi/file-apis/choose-file-from-disk","2.api-reference/4.jsapi/6.file-apis/7.choose-file-from-disk","i-lucide-folder-open",{"title":443,"icon":6,"path":444,"stem":445,"children":446,"page":6},"Location APIs","/api-reference/jsapi/location-apis","2.api-reference/4.jsapi/7.location-apis",[447,452,457],{"title":448,"path":449,"stem":450,"icon":451},"getLocation","/api-reference/jsapi/location-apis/get-location","2.api-reference/4.jsapi/7.location-apis/1.get-location","i-lucide-map-pin",{"title":453,"path":454,"stem":455,"icon":456},"chooseLocation","/api-reference/jsapi/location-apis/choose-location","2.api-reference/4.jsapi/7.location-apis/2.choose-location","i-lucide-map-pin-plus",{"title":458,"path":459,"stem":460,"icon":461},"openLocation","/api-reference/jsapi/location-apis/open-location","2.api-reference/4.jsapi/7.location-apis/3.open-location","i-lucide-map",{"title":463,"path":464,"stem":465,"children":466,"page":6},"Network APIs","/api-reference/jsapi/network-apis","2.api-reference/4.jsapi/8.network-apis",[467,472,476,481],{"title":468,"path":469,"stem":470,"icon":471},"request","/api-reference/jsapi/network-apis/request","2.api-reference/4.jsapi/8.network-apis/1.request","i-lucide-network",{"title":473,"path":474,"stem":475,"icon":69},"downloadFile","/api-reference/jsapi/network-apis/download-file","2.api-reference/4.jsapi/8.network-apis/2.download-file",{"title":477,"path":478,"stem":479,"icon":480},"uploadFile","/api-reference/jsapi/network-apis/upload-file","2.api-reference/4.jsapi/8.network-apis/3.upload-file","i-lucide-cloud-upload",{"title":482,"path":483,"stem":484,"icon":485},"share","/api-reference/jsapi/network-apis/share","2.api-reference/4.jsapi/8.network-apis/4.share","i-lucide-share",{"title":487,"icon":6,"path":488,"stem":489,"children":490,"page":6},"Device APIs","/api-reference/jsapi/device-apis","2.api-reference/4.jsapi/9.device-apis",[491,495,500,505,510,515,520,525,530],{"title":492,"path":493,"stem":494,"icon":366},"getSystemInfo","/api-reference/jsapi/device-apis/get-system-info","2.api-reference/4.jsapi/9.device-apis/1.get-system-info",{"title":496,"path":497,"stem":498,"icon":499},"getNetworkType","/api-reference/jsapi/device-apis/get-network-type","2.api-reference/4.jsapi/9.device-apis/2.get-network-type","i-lucide-wifi",{"title":501,"path":502,"stem":503,"icon":504},"Clipboard","/api-reference/jsapi/device-apis/clipboard","2.api-reference/4.jsapi/9.device-apis/3.clipboard","i-lucide-clipboard",{"title":506,"path":507,"stem":508,"icon":509},"getBatteryInfo","/api-reference/jsapi/device-apis/get-battery-info","2.api-reference/4.jsapi/9.device-apis/4.get-battery-info","i-lucide-battery",{"title":511,"path":512,"stem":513,"icon":514},"Screen Brightness","/api-reference/jsapi/device-apis/screen-brightness","2.api-reference/4.jsapi/9.device-apis/5.screen-brightness","i-lucide-sun",{"title":516,"path":517,"stem":518,"icon":519},"addPhoneContact","/api-reference/jsapi/device-apis/add-phone-contact","2.api-reference/4.jsapi/9.device-apis/6.add-phone-contact","i-lucide-user-plus",{"title":521,"path":522,"stem":523,"icon":524},"makePhoneCall","/api-reference/jsapi/device-apis/make-phone-call","2.api-reference/4.jsapi/9.device-apis/7.make-phone-call","i-lucide-phone-call",{"title":526,"path":527,"stem":528,"icon":529},"scan","/api-reference/jsapi/device-apis/scan","2.api-reference/4.jsapi/9.device-apis/8.scan","i-lucide-scan-qr-code",{"title":531,"path":532,"stem":533,"icon":534},"vibrate","/api-reference/jsapi/device-apis/vibrate","2.api-reference/4.jsapi/9.device-apis/9.vibrate","i-lucide-vibrate",{"title":536,"path":537,"stem":538,"icon":539},"Common Error Codes","/api-reference/common-error-codes","2.api-reference/5.common-error-codes","i-lucide-triangle-alert",{"title":541,"path":542,"stem":543,"children":544,"page":6},"Utilities","/utilities","3.utilities",[545,550,555],{"title":546,"path":547,"stem":548,"icon":549},"Deep Links","/utilities/deep-links","3.utilities/1.deep-links","i-ph-link",{"title":551,"path":552,"stem":553,"icon":554},"AI Integration","/utilities/ai-integration","3.utilities/2.ai-integration","i-lucide-sparkles",{"title":556,"path":557,"stem":558,"icon":131},"Signature Validation","/utilities/signature-validation","3.utilities/3.signature-validation",{"title":560,"path":561,"stem":562,"icon":563},"FAQ","/faq","4.faq","i-lucide-circle-help",{"title":565,"path":566,"stem":567,"icon":568},"Changelog","/updates","5.updates","i-lucide-history",[570,574,580,585,591,596,601,606,611,616,620,625,628,633,638,643,648,653,658,663,668,673,677,682,687,691,696,701,706,709,713,718,721,725,729,734,740,745,749,754,759,763,766,770,775,780,785,790,795,800,805,810,815,820,825,830,835,840,845,850,855,860,863,867,872,877,881,886,891,896,901,904,908,912,917,922,927,932,937,942,947,952,957,962,965,969,973,978,983,988,993,998,1003,1008,1013,1018,1023,1028,1031,1035,1040,1045,1050,1055,1060,1065,1070,1075,1080,1085,1090,1095,1100,1105,1110,1115,1120,1125,1130,1135,1140,1145,1150,1155,1160,1165,1168,1172,1177,1182,1187,1192,1197,1202,1205,1209,1214,1218,1223,1228,1232,1237,1242,1246,1251,1256,1261,1266,1271,1275,1280,1285,1289,1294,1299,1304,1307,1311,1316,1320,1324,1328,1333,1338,1343,1348,1353,1358,1362,1365,1369,1373,1376,1381,1386,1391,1395,1400,1404,1407,1411,1415,1418,1423,1428,1433,1438,1443,1448,1453,1457,1462,1465,1469,1474,1478,1483,1488,1493,1496,1500,1505,1510,1515,1520,1525,1529,1534,1537,1541,1544,1549,1554,1558,1563,1568,1573,1578,1582,1587,1591,1596,1600,1605,1610,1613,1618,1623,1627,1630,1634,1638,1642,1646,1650,1654,1658,1662,1665,1669,1673,1678,1683,1688,1693,1698,1702,1707,1712,1717,1722,1727,1730,1735,1740,1745,1750,1754,1759,1762,1766,1771,1776,1781,1786,1791,1796,1801,1806,1811,1816,1821,1826,1831,1836,1841,1846,1851,1856,1861,1866,1871,1876,1879,1883,1888,1893,1898,1902,1907,1912,1917,1920,1924,1928,1931,1935,1939,1943,1947,1951,1954,1958,1962,1965,1969,1973,1977,1981,1985,1988,1992,1996,1999,2003,2007,2011,2015,2019,2022,2026,2030,2033,2038,2042,2047,2052,2057,2062,2066,2071,2075,2079,2084,2089,2094,2099,2103,2107,2111,2116,2121,2126,2130,2134,2138,2142,2147,2151,2155,2158,2162,2166,2169,2173,2177,2181,2185,2189,2192,2196,2200,2203,2207,2212,2216,2221,2226,2230,2234,2237,2241,2245,2248,2252,2256,2260,2264,2268,2272,2276,2279,2283,2287,2290,2294,2298,2302,2306,2310,2314,2319,2323,2326,2330,2334,2337,2341,2345,2349,2353,2357,2361,2365,2368,2372,2376,2379,2383,2387,2391,2395,2399,2402,2406,2410,2413,2417,2421,2426,2430,2434,2438,2441,2445,2450,2454,2457,2461,2465,2470,2473,2476,2480,2483,2487,2491,2495,2499,2503,2507,2511,2515,2518,2522,2526,2529,2533,2537,2541,2545,2548,2551,2555,2559,2562,2566,2570,2575,2579,2583,2586,2590,2594,2597,2600,2604,2609,2614,2619,2624,2629,2634,2639,2644,2649,2654,2659,2664,2668,2671,2675,2680,2685,2689,2694,2699,2704,2709,2713,2717,2720,2724,2729,2733,2738,2743,2748,2752,2756,2759,2763,2767,2771,2775,2779,2784,2787,2791,2794,2799,2804,2808,2812,2817,2822,2826,2829,2833,2838,2842,2847,2851,2854,2858,2862,2866,2870,2874,2877,2881,2885,2889,2893,2897,2902,2907,2912,2915,2919,2923,2927,2932,2936,2940,2943,2947,2951,2955,2959,2962,2967,2972,2976,2979,2983,2987,2991,2995,2999,3002,3007,3012,3016,3019,3023,3027,3031,3035,3039,3042,3047,3052,3057,3061,3064,3068,3071,3076,3081,3085,3090,3094,3097,3102,3107,3112,3116,3119,3123,3128,3132,3136,3141,3145,3149,3153,3157,3162,3167,3172,3177,3181,3184,3188,3193,3197,3201,3206,3210,3214,3219,3223,3227,3232,3237,3242,3247,3252,3257,3261,3264,3268,3272,3276,3280,3285,3289,3293,3296,3300,3304,3308,3313,3317,3321,3325,3329,3332,3336,3340,3344,3348,3352,3356,3360,3363,3367,3371,3375,3379,3383,3386,3390,3394,3398,3402,3406,3410,3413,3417,3421,3425,3429,3434,3438,3442,3445,3449,3453,3457,3461,3465,3469,3473,3476,3480,3484,3488,3492,3496,3500,3504,3507,3511,3515,3519,3523,3527,3531,3534,3538,3542,3546,3550,3554,3557,3561,3565,3568,3572,3576,3579,3583,3587,3591,3595,3598,3602,3606,3610,3614,3618,3622,3625,3629,3633,3637,3641,3645,3649,3652,3656,3660,3663,3667,3671,3675,3678,3682,3686,3690,3694,3699,3703,3707,3710,3714,3718,3721,3725,3729,3732,3736,3740,3744,3749,3754,3758,3762,3765,3769,3772,3776,3780,3784,3788,3793,3797,3802,3806,3810,3813,3817,3821,3825,3829,3833,3837,3841,3844,3848,3852,3855,3859,3863,3867,3871,3874,3878,3882,3886,3890,3894,3898,3902,3905,3909,3914,3918,3922,3927,3931,3935,3939,3944,3948,3952,3955,3959,3963,3967,3971,3975,3979,3983,3986,3990,3994,3998,4002,4006,4010,4014,4019,4023,4026,4030,4034,4038,4042,4046,4050,4053,4057,4061,4064,4068,4072,4076,4079,4083,4087,4090,4094,4098,4102,4105,4109,4114,4118,4121,4125,4130,4134,4138,4142,4146,4149,4153,4157,4161,4165,4169,4172,4176,4181,4185,4188,4192,4197,4201,4205,4209,4213,4216,4220,4223,4227,4231,4235,4239,4243,4246,4250,4254,4258,4262,4266,4269,4273,4277,4281,4285,4289,4293,4296,4300,4304,4307,4311,4315,4318,4322,4327,4332,4337,4342,4345,4350,4355,4360,4365,4370,4375,4380,4384,4389,4392,4397,4401,4406,4411,4416,4420,4425,4429,4434,4437,4441,4445,4450,4455,4460,4464,4469,4474,4479,4484,4489,4494,4498,4502,4507,4512,4517,4521,4526,4531,4536,4541,4546,4549,4554,4559,4564],{"id":17,"title":16,"titles":571,"content":572,"level":573},[],"Welcome to Super Qi Miniapps - Your gateway to building lightweight, powerful applications.",1,{"id":575,"title":576,"titles":577,"content":578,"level":579},"/developers-guide/getting-started/introduction#welcome-to-super-qi-miniapps-docs","Welcome to Super Qi Miniapps Docs",[16],"Welcome to the Super Qi Miniapps documentation! This guide will help you build, develop, and deploy powerful lightweight applications that run seamlessly within the Super Qi ecosystem. Whether you're building your first Miniapp or you're an experienced developer looking to leverage Super Qi's platform, this documentation provides everything you need to succeed.",2,{"id":581,"title":582,"titles":583,"content":584,"level":579},"/developers-guide/getting-started/introduction#about-this-documentation","About This Documentation",[16],"This documentation is organized into two main sections designed to support you throughout your development journey:",{"id":586,"title":587,"titles":588,"content":589,"level":590},"/developers-guide/getting-started/introduction#_1-developers-guide","1. Developers Guide",[16,582],"The Developers Guide is your comprehensive, step-by-step companion that walks you through taking your Miniapp from scratch to production. This section provides a complete journey covering every aspect of development: Getting Started - Understanding Miniapps, their lifecycle, and choosing your development approachConfiguration & Setup - Setting up your development environment, understanding Super Qi platforms, and configuring UAT accessCreating Your First Miniapp - Building a functional Miniapp from scratch, including configuration and testingDemo Miniapp - Exploring a complete example application with detailed frontend and backend code walkthroughsReleasing to Production - Completing security review, merchant registration, and deploying your Miniapp to production Follow the Developers Guide ThoroughlyStart with the Developers Guide if you're new to Super Qi Miniapps. It provides a structured learning path that takes you from your first Miniapp to production deployment. Please follow it thoroughly - each section builds upon the previous one, ensuring you have all the knowledge and setup needed before moving to production. Skipping steps may lead to issues later in your development process.",3,{"id":592,"title":593,"titles":594,"content":595,"level":590},"/developers-guide/getting-started/introduction#_2-api-reference","2. API Reference",[16,582],"The API Reference is your comprehensive technical reference for all Super Qi APIs, flows, and integration details. Use this section when you need: Flows - End-to-end integration guides for authentication and paymentsOpen APIs - Backend-to-backend API specifications and request/response detailsJSAPIs - Client-side JavaScript APIs for accessing platform features The API Reference is designed for quick lookup and detailed technical specifications. Bookmark specific APIs you use frequently for easy access.",{"id":597,"title":598,"titles":599,"content":600,"level":579},"/developers-guide/getting-started/introduction#what-youll-need","What You'll Need",[16],"Before you start, make sure you have the following ready — missing any of these can block you partway through the journey: Accounts & Access A Super Qi Console account (created in Super Qi Platforms). Hardware A physical phone (Android or iOS) to install and test your Miniapp.Your phone and development machine must reach the same network during local testing. Development Tools (for the demo Miniapp and local backend) Git and Node.js v18+ (includes npm)Go v1.21+ — only if you use the Go backend Detailed install steps are covered in Installation Steps.",{"id":602,"title":603,"titles":604,"content":605,"level":579},"/developers-guide/getting-started/introduction#miniapp-development-types","Miniapp Development Types",[16],"Super Qi supports two distinct approaches to building Miniapps, each with its own advantages. Choose the one that best fits your team's skills and project requirements:",{"id":607,"title":608,"titles":609,"content":610,"level":590},"/developers-guide/getting-started/introduction#dsl-domain-specific-language","DSL (Domain-Specific Language)",[16,603],"DSL is Super Qi's custom development framework forked from JavaScript, specifically designed for Miniapp development. Key Features: Optimized Performance - Built specifically for Miniapps with minimal overheadNative-like Experience - Provides smooth, app-like user interactionsStructured Framework - Opinionated architecture that promotes best practices Best For: Developers who want the best performance and native feelTeams building feature-rich, complex Miniapps Development Stack: DSL (JavaScript-based syntax)Native APIs and services",{"id":612,"title":613,"titles":614,"content":615,"level":590},"/developers-guide/getting-started/introduction#h5-open-web-development","H5+ (Open Web Development)",[16,603],"H5+ brings the familiar web development stack to Miniapps, allowing you to use standard web technologies. Key Features: Web Standards - Build with HTML5, JavaScript, and TypeScriptFamiliar Tools - Use your existing web development skills and toolsRapid Development - Leverage existing web libraries and frameworksCross-Platform - Code can be more easily shared with web applications Best For: Web developers transitioning to MiniappsProjects with existing web codebasesTeams prioritizing development speed and familiaritySimpler applications with standard web interactions Development Stack: HTML5JavaScript / TypeScriptCSS3Web APIs Keep in mind that in the following docs, we will be going through H5+ and its our recommended approach so far, DSL Docs will be added later on in the future, but if you are interested, Check it out here Both DSL and H5+ Miniapps have access to the same Super Qi platform features, including authentication, payments, and user data. The choice between them is primarily about developer experience and performance requirements.",{"id":617,"title":551,"titles":618,"content":619,"level":579},"/developers-guide/getting-started/introduction#ai-integration",[16],"Get help from AI tools while developing your Super Qi Miniapps. Our documentation is optimized for use with ChatGPT, Claude, and other AI assistants. Learn more about using AI with Super Qi documentation.",{"id":621,"title":622,"titles":623,"content":624,"level":579},"/developers-guide/getting-started/introduction#getting-help","Getting Help",[16],"Throughout your development journey, you'll have access to: This Documentation - Comprehensive guides and API referencesMiniapp Demo - ready implemented demo app that shows the features availableDeveloper Portal - Account management and app submissionTechnical Support - Technical assistance when you need it by contacting the Miniapp team Let's build something amazing together! Start your journey by learning What are Miniapps in the next section.",{"id":22,"title":21,"titles":626,"content":627,"level":573},[],"Understanding Super Qi Miniapps architecture, capabilities, and platform features.",{"id":629,"title":630,"titles":631,"content":632,"level":579},"/developers-guide/getting-started/what-are-miniapps#what-are-super-qi-miniapps","What Are Super Qi Miniapps?",[21],"Super Qi Miniapps are lightweight, WebView-based applications that run within the Super Qi ecosystem. They provide app-like experiences without requiring separate downloads or installations.",{"id":634,"title":635,"titles":636,"content":637,"level":579},"/developers-guide/getting-started/what-are-miniapps#platform-architecture","Platform Architecture",[21],"",{"id":639,"title":640,"titles":641,"content":642,"level":590},"/developers-guide/getting-started/what-are-miniapps#webview-based-runtime","WebView-Based Runtime",[21,635],"Miniapps run in a secure, sandboxed execution environment that ensures consistent rendering across devices while remaining isolated from the host application.",{"id":644,"title":645,"titles":646,"content":647,"level":590},"/developers-guide/getting-started/what-are-miniapps#unified-authentication","Unified Authentication",[21,635],"The platform provides single sign-on across all Miniapps using OAuth-based token management. Users don't need to create separate accounts for each Miniapp they use.",{"id":649,"title":650,"titles":651,"content":652,"level":590},"/developers-guide/getting-started/what-are-miniapps#native-payment-integration","Native Payment Integration",[21,635],"Super Qi integrates with QiCard (Iraq's digital payment solution) and Alipay+ (global payment network) to enable in-app transactions without external redirects. The platform supports both one-time and recurring payments.",{"id":654,"title":655,"titles":656,"content":657,"level":590},"/developers-guide/getting-started/what-are-miniapps#security-permissions","Security & Permissions",[21,635],"Each Miniapp runs in sandboxed execution with a declarative permission model that provides fine-grained API access control. Obtaining Permissions: Contact the Miniapps team to request specific scopes (CONTACT_INFO, AGREEMENT_PAYMENT, etc...). Permissions are granted based on your use case and compliance requirements.",{"id":659,"title":660,"titles":661,"content":662,"level":579},"/developers-guide/getting-started/what-are-miniapps#miniapps-structure","Miniapps Structure",[21],"Miniapps consist of three main components: the Frontend, the Backend, and the Super Qi App.",{"id":664,"title":665,"titles":666,"content":667,"level":590},"/developers-guide/getting-started/what-are-miniapps#how-it-works","How It Works",[21,660],"ComponentHosted ByDependenciesFrontendMerchantURL provided to Super Qi ConsoleBackendMerchantNone with Super QiSuper Qi AppSuper QiURL from Console to display the Miniapp The merchant is responsible for hosting both the frontend and the backend of their Miniapp. The only dependency between the Super Qi app and your Miniapp is the URL you provide to the Super Qi Console. Backend: Has no dependencies with Super Qi. You can use any technology stack, hosting provider, or architecture that suits your needs.Frontend: The only connection to Super Qi is the URL that the platform uses to load your Miniapp. Super Qi relies on this URL to generate the QR code and display your Miniapp within the Super Qi app. This architecture gives you full control over your Miniapp's infrastructure while leveraging Super Qi's distribution, authentication, and payment capabilities.",{"id":669,"title":670,"titles":671,"content":672,"level":590},"/developers-guide/getting-started/what-are-miniapps#recommended-approach-for-payment-handling","Recommended Approach for Payment Handling",[21,660],"Super Qi does not recommend having a direct dependency between each payment and a product in your Miniapp system. The recommended approach is to track every payment in the merchant's backend. This ensures you have full control over transaction records, can reconcile payments independently, and maintain a reliable audit trail for all financial transactions in your system.",{"id":674,"title":675,"titles":676,"content":637,"level":579},"/developers-guide/getting-started/what-are-miniapps#key-features","Key Features",[21],{"id":678,"title":679,"titles":680,"content":681,"level":590},"/developers-guide/getting-started/what-are-miniapps#deep-linking-qr-triggers","Deep-Linking & QR Triggers",[21,675],"The platform supports versioned URIs for direct navigation to specific features and QR code entry points for offline-to-online experiences. You can pass dynamic parameters and track marketing campaigns through these entry points.",{"id":683,"title":684,"titles":685,"content":686,"level":590},"/developers-guide/getting-started/what-are-miniapps#platform-apis","Platform APIs",[21,675],"Miniapps have access to essential capabilities including user profile and authentication, payment processing and refunds, device features like camera and location, and UI components such as dialogs and notifications.",{"id":688,"title":689,"titles":690,"content":637,"level":579},"/developers-guide/getting-started/what-are-miniapps#development-environments","Development Environments",[21],{"id":692,"title":693,"titles":694,"content":695,"level":590},"/developers-guide/getting-started/what-are-miniapps#super-qi-uat-testing","Super Qi UAT (Testing)",[21,689],"The UAT environment is designed for development and testing. It provides test payment processing (no real money), isolated data separate from production, and debugging capabilities. Always test your Miniapp in Super Qi UAT before submitting for production deployment.",{"id":697,"title":698,"titles":699,"content":700,"level":590},"/developers-guide/getting-started/what-are-miniapps#super-qi-production","Super Qi Production",[21,689],"The production environment handles live user transactions with real payment processing. All Miniapps require approval before deployment to this environment.",{"id":702,"title":703,"titles":704,"content":705,"level":579},"/developers-guide/getting-started/what-are-miniapps#common-use-cases","Common Use Cases",[21],"Miniapps power various services across Iraq's digital economy including e-commerce and shopping, loyalty programs, financial services, on-demand services, and entertainment and media. Next, explore the MiniApps Lifecycle to understand the end-to-end journey your Miniapp takes — from signing the commercial contract all the way to going live.",{"id":27,"title":26,"titles":707,"content":708,"level":573},[],"Complete guide to building and launching your Miniapp on the Super Qi platform.",{"id":710,"title":115,"titles":711,"content":712,"level":579},"/developers-guide/getting-started/miniapp-lifecycle#overview",[26],"This guide walks you through the complete lifecycle of developing and launching a Miniapp on the Super Qi platform. From initial agreements to going live, follow these steps to ensure a smooth onboarding process.",{"id":714,"title":715,"titles":716,"content":717,"level":579},"/developers-guide/getting-started/miniapp-lifecycle#development-journey","Development Journey",[26],"Now that you understand the journey ahead, let's set up your development environment. Continue to Super Qi Platforms to create your console account.",{"id":37,"title":36,"titles":719,"content":720,"level":573},[],"Setting up your account on Super Qi Console.",{"id":722,"title":115,"titles":723,"content":724,"level":579},"/developers-guide/config-setup/super-qi-platforms#overview",[36],"Super Qi Console is your Miniapp management platform for creating, configuring, and releasing Miniapps. This guide will walk you through creating your account and understanding what the platform offers.",{"id":726,"title":36,"titles":727,"content":728,"level":579},"/developers-guide/config-setup/super-qi-platforms#super-qi-console",[36],"Super Qi Console is your Miniapp management platform where you create, configure, and manage your Miniapps throughout their lifecycle.",{"id":730,"title":731,"titles":732,"content":733,"level":590},"/developers-guide/config-setup/super-qi-platforms#creating-your-super-qi-console-account","Creating Your Super Qi Console Account",[36,36],"Follow these steps to create your console account:",{"id":735,"title":736,"titles":737,"content":738,"level":739},"/developers-guide/config-setup/super-qi-platforms#step-1-navigate-to-super-qi-console","Step 1: Navigate to Super Qi Console",[36,36,731],"Visit the Super Qi Console at miniprogram.alipay",4,{"id":741,"title":742,"titles":743,"content":744,"level":739},"/developers-guide/config-setup/super-qi-platforms#step-2-register-account","Step 2: Register Account",[36,36,731],"Click \"Sign Up\" or \"Create Account\" and provide the requested details",{"id":746,"title":747,"titles":748,"content":637,"level":739},"/developers-guide/config-setup/super-qi-platforms#step-3-set-up-workspace","Step 3: Set Up Workspace",[36,36,731],{"id":750,"title":751,"titles":752,"content":637,"level":753},"/developers-guide/config-setup/super-qi-platforms#fill-in-the-necessary-data-to-create-your-workspace","Fill in the necessary data to create your workspace",[36,36,731,747],5,{"id":755,"title":756,"titles":757,"content":758,"level":739},"/developers-guide/config-setup/super-qi-platforms#step-4-access-console-dashboard","Step 4: Access Console Dashboard",[36,36,731],"Once approved, access your console dashboard to start creating and managing Miniapps.",{"id":760,"title":622,"titles":761,"content":762,"level":579},"/developers-guide/config-setup/super-qi-platforms#getting-help",[36],"For issues with the console, Miniapp management, or developer resources, contact the developer support team hani.salih@qi.iq. Ready to continue? The next section will guide you through setting up your Super Qi UAT to start development!",{"id":42,"title":41,"titles":764,"content":765,"level":573},[],"Setting up your UAT environment and obtaining credentials for Miniapp development.",{"id":767,"title":115,"titles":768,"content":769,"level":579},"/developers-guide/config-setup/uat#overview",[41],"Before releasing your Miniapp to production, all development and testing should be done in the UAT (User Acceptance Testing) environment. This ensures your Miniapp is thoroughly tested before real users interact with it.",{"id":771,"title":772,"titles":773,"content":774,"level":579},"/developers-guide/config-setup/uat#why-develop-in-uat-first","Why Develop in UAT First?",[41],"The UAT environment provides a safe sandbox for development with several key benefits: FeatureDescriptionTesting AccountsPre-configured test user accounts for simulating real user interactionsTesting MoneyVirtual currency for testing payment flows without real financial transactionsIsolated EnvironmentSeparate from production, so testing won't affect live users or dataDebug-FriendlyEnhanced logging and debugging capabilities for development Always develop and test your Miniapp in the UAT environment first. Never test with real user accounts or real money during development.",{"id":776,"title":777,"titles":778,"content":779,"level":579},"/developers-guide/config-setup/uat#downloading-super-qi-uat","Downloading Super Qi UAT",[41],"To develop and test your Miniapp, you'll need to install the Super Qi UAT application on your device. The UAT version is separate from the production Super Qi app and connects to the testing environment.",{"id":781,"title":782,"titles":783,"content":784,"level":590},"/developers-guide/config-setup/uat#android","Android",[41,777],"Follow these steps to get Super Qi UAT on your Android device:",{"id":786,"title":787,"titles":788,"content":789,"level":739},"/developers-guide/config-setup/uat#step-1-request-access","Step 1: Request Access",[41,777,782],"Visit the Firebase App Distribution link below and enter your email address to request access: Request Android UAT Access",{"id":791,"title":792,"titles":793,"content":794,"level":739},"/developers-guide/config-setup/uat#step-2-check-your-email","Step 2: Check Your Email",[41,777,782],"Once you submit your email, you'll be added to the Firebase App Distribution list. You will receive an email with instructions to download the latest Super Qi UAT Android version.",{"id":796,"title":797,"titles":798,"content":799,"level":739},"/developers-guide/config-setup/uat#step-3-install-the-app","Step 3: Install the App",[41,777,782],"Follow the instructions in the email to download and install the Super Qi UAT app on your Android device. You will automatically receive notifications when new versions of Super Qi UAT are available through Firebase App Distribution.",{"id":801,"title":802,"titles":803,"content":804,"level":590},"/developers-guide/config-setup/uat#ios","iOS",[41,777],"Follow these steps to get Super Qi UAT on your iOS device:",{"id":806,"title":807,"titles":808,"content":809,"level":739},"/developers-guide/config-setup/uat#step-1-contact-the-miniapps-team","Step 1: Contact the Miniapps Team",[41,777,802],"Reach out to the Miniapps development team with an organization email (or the sponsor organization email) to request TestFlight access: Contact: hani.salih@qi.iq Provide the following information: Your Apple ID organization email address (test@organization.com)(Optional) Sponsor Email addressYour company/organization in case your apple id email is not an organization email, you will need an organization email address to send the email and mention the Apple ID email along with the sponsor email to be added",{"id":811,"title":812,"titles":813,"content":814,"level":739},"/developers-guide/config-setup/uat#step-2-accept-testflight-invitation","Step 2: Accept TestFlight Invitation",[41,777,802],"Once added, you'll receive an email invitation from TestFlight. Accept the invitation to gain access to the Super Qi UAT iOS version.",{"id":816,"title":817,"titles":818,"content":819,"level":739},"/developers-guide/config-setup/uat#step-3-download-via-testflight","Step 3: Download via TestFlight",[41,777,802],"Open the TestFlight app on your iOS device and download the latest Super Qi UAT version. TestFlight will notify you automatically when new versions of Super Qi UAT are available for download.",{"id":821,"title":822,"titles":823,"content":824,"level":579},"/developers-guide/config-setup/uat#developer-menu","Developer Menu",[41],"Once you have Super Qi UAT installed, you'll notice a floating burger icon on the screen. This icon provides access to the Developer Menu, which contains essential tools and settings for development.",{"id":826,"title":827,"titles":828,"content":829,"level":590},"/developers-guide/config-setup/uat#environment","Environment",[41,822],"The Environment feature allows you to switch between different server environments within the app. Important: After installing Super Qi UAT, you must open the Developer Menu and change the environment to UAT. This is a critical step to ensure your Miniapp connects to the testing environment. Follow these steps to configure your environment: Tap the floating burger icon to open the Developer MenuSelect Environment from the menu options Choose UAT from the available environmentsThe app will reload with the UAT environment active",{"id":831,"title":832,"titles":833,"content":834,"level":590},"/developers-guide/config-setup/uat#qi-tools","Qi Tools",[41,822],"The Qi Tools section provides various developer utilities to help with testing and debugging your Miniapp. Available tools include: Disable Screenshot Protection - Allows you to take screenshots within the app for documentation or debugging purposesAdditional debugging and testing utilities These developer tools are only available in the Super Qi UAT version and are not present in the production app.",{"id":836,"title":837,"titles":838,"content":839,"level":579},"/developers-guide/config-setup/uat#testing-credentials","Testing Credentials",[41],"For development in the UAT environment, you'll need testing merchant credentials. Follow the steps below to request your UAT credentials. For obtaining the public keys for UAT and Prod, see the Signature Validation guide.",{"id":841,"title":842,"titles":843,"content":844,"level":590},"/developers-guide/config-setup/uat#how-to-request-uat-credentials","How to Request UAT Credentials",[41,837],"To obtain your UAT credentials, send an email request to the Miniapps team with the following details: Email Details: To: hani.salih@qi.iqCC: mouamle.hameed@qi.iqSubject: UAT Credentials Request - Your Miniapp Name The email must be sent from your organization email address, not a personal email account.",{"id":846,"title":847,"titles":848,"content":849,"level":590},"/developers-guide/config-setup/uat#required-information","Required Information",[41,837],"Your email should include: Miniapp Name - The name of your MiniappOrganization Details - Your company/organization nameContact Information - Primary contact person and phone numberAdditional Scopes (if needed) - If you require access to additional scopes beyond the standard APIs, please:\nSpecify which scopes you needAttach any approval documents or authorization letters",{"id":851,"title":852,"titles":853,"content":854,"level":590},"/developers-guide/config-setup/uat#email-template","Email Template",[41,837],"Copy and use this template for your credentials request: Subject: UAT Credentials Request - [Your Miniapp Name]\n\nDear Miniapps Team,\n\nI am writing to request UAT credentials for our Miniapp development.\n\nMiniapp Name: [Your Miniapp Name]\nOrganization: [Your Organization Name]\nContact Person: [Your Name]\nPhone Number: [Your Phone Number]\nEmail: [Your Email Address]\n\nAdditional Scopes (if applicable):\n[List any additional scopes you need, or write \"None\"]\n\n[If requesting additional scopes, mention attached documents here]\n\nThank you for your assistance.\n\nBest regards,\n[Your Name]\n[Your Title]\n[Your Organization]",{"id":856,"title":857,"titles":858,"content":859,"level":590},"/developers-guide/config-setup/uat#what-happens-next","What Happens Next",[41,837],"After submitting your request: The Miniapps team will review your requestIf additional scopes are requested, they will verify the attached approvalsYour UAT credentials will be generated and shared via the established communication channelYou will receive:\nClient IDMerchant IDGateway URLPrivate Key (the matching public key is published in the Signature Validation guide)Super Qi UAT Test User Keep your credentials secure. Store them in environment variables and never commit them to version control. Ready to continue? The next sections will guide you through creating your first Miniapp and using the testing credentials for UAT development.",{"id":52,"title":51,"titles":861,"content":862,"level":573},[],"Creating your first Miniapp on Super Qi Console.",{"id":864,"title":115,"titles":865,"content":866,"level":579},"/developers-guide/create-your-first-miniapp/create-miniapp#overview",[51],"Now that you have your development environment set up, it's time to create your first Miniapp on the Super Qi Console. This guide will walk you through the process of creating a new Miniapp project.",{"id":868,"title":869,"titles":870,"content":871,"level":579},"/developers-guide/create-your-first-miniapp/create-miniapp#prerequisites","Prerequisites",[51],"Before creating a Miniapp, ensure you have: A Super Qi Console account (see Super Qi Platforms)An approved workspace from the Miniapps team Your workspace must be approved by the Miniapps team before you can create Miniapps. If your workspace is pending approval, please wait for confirmation before proceeding.",{"id":873,"title":874,"titles":875,"content":876,"level":579},"/developers-guide/create-your-first-miniapp/create-miniapp#creating-your-miniapp","Creating Your Miniapp",[51],"Follow these steps to create your first Miniapp:",{"id":878,"title":736,"titles":879,"content":880,"level":590},"/developers-guide/create-your-first-miniapp/create-miniapp#step-1-navigate-to-super-qi-console",[51,874],"Visit the Super Qi Console and log in to your account: Open Super Qi Console",{"id":882,"title":883,"titles":884,"content":885,"level":590},"/developers-guide/create-your-first-miniapp/create-miniapp#step-2-create-new-miniapp","Step 2: Create New Miniapp",[51,874],"Once your workspace has been approved, you can create a new Miniapp. Click on the Create button to start the creation process. Fill in the required information for your Miniapp: After filling in all the required fields, click the Create button to create your Miniapp. Important: You must select H5+ as your Miniapp type. This setting cannot be changed after creation. Other information such as the name and description can be modified later.",{"id":887,"title":888,"titles":889,"content":890,"level":590},"/developers-guide/create-your-first-miniapp/create-miniapp#step-3-choose-the-correct-tag","Step 3: Choose the Correct Tag",[51,874],"After creating your miniapp, edit the information to select the appropriate tag for your Miniapp based on your target audience: There are two types of tags available: Customer Tag (Mini Service A): Select this if your Miniapp is targeting customersBusiness Tag (Mini Service B): Select this if your Miniapp is targeting businesses Most default apps target customers, so please proceed with Customer (Mini Service A) for now.",{"id":892,"title":893,"titles":894,"content":895,"level":590},"/developers-guide/create-your-first-miniapp/create-miniapp#step-4-view-your-miniapp","Step 4: View Your Miniapp",[51,874],"Once completed, you will be redirected to your Miniapp's dashboard. Navigate to your Miniapp that you just created, Here you can view and manage your Miniapp settings.",{"id":897,"title":898,"titles":899,"content":900,"level":579},"/developers-guide/create-your-first-miniapp/create-miniapp#congratulations","Congratulations!",[51],"You have successfully created your first Miniapp! Follow along with the documentation to learn more about configuring and developing your Miniapp. Ready to continue? The next sections will guide you through understanding Miniapps and configuring your development environment.",{"id":57,"title":56,"titles":902,"content":903,"level":573},[],"Configuring your Miniapp credentials for UAT testing.",{"id":905,"title":115,"titles":906,"content":907,"level":579},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#overview",[56],"In this section, we will configure your Miniapp credentials and set it to the UAT environment so you can test it in the Super Qi UAT app. Follow the steps below to generate a QR code that will display your first Miniapp. As you will notice later, Miniapps consist of versions. You can add UAT, Production, or any other environment to each version. For now, we will be creating the UAT environment for the versions. Later on, in the last section of the Developer's Guide (Releasing to Production), we will create a Production environment for that specific version.",{"id":909,"title":910,"titles":911,"content":637,"level":579},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#configuring-your-miniapp","Configuring Your Miniapp",[56],{"id":913,"title":914,"titles":915,"content":916,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-1-open-global-configuration","Step 1: Open Global Configuration",[56,910],"Navigate to your Miniapp and click on Global Configuration to configure your Miniapp settings.",{"id":918,"title":919,"titles":920,"content":921,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-2-set-environment-and-credentials","Step 2: Set Environment and Credentials",[56,910],"In the configuration panel: Select Test as the environment for both the Client ID and Merchant IDEnter your Client IDEnter your Merchant ID You can find your Client ID and Merchant ID in the UAT and Credentials guide.",{"id":923,"title":924,"titles":925,"content":926,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-3-save-and-publish","Step 3: Save and Publish",[56,910],"After entering your Client ID and Merchant ID, click on Save & Publish.",{"id":928,"title":929,"titles":930,"content":931,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-4-confirm-version","Step 4: Confirm Version",[56,910],"You will be prompted to confirm the version. Click on Save & Publish again to confirm.",{"id":933,"title":934,"titles":935,"content":936,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-5-navigate-back-to-miniapp","Step 5: Navigate Back to Miniapp",[56,910],"After publishing, you will be redirected to that version. However, this is set to the Production environment by default, which is not what we want for testing. Navigate back to your Miniapp dashboard.",{"id":938,"title":939,"titles":940,"content":941,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-6-select-app-version","Step 6: Select App Version",[56,910],"Back in your Miniapp dashboard, go to the Versions tab. Click on Select app for the latest version you have created. If you want to see the environments available in this version, click on the + sign in front of the version.",{"id":943,"title":944,"titles":945,"content":946,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-7-select-target-app","Step 7: Select Target App",[56,910],"In the selection dialog: Select the Target app with your  / TestThe Client ID and Merchant ID will be automatically filledClick Select to confirm",{"id":948,"title":949,"titles":950,"content":951,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-8-generate-qr-code","Step 8: Generate QR Code",[56,910],"Now you can see that the environment is set to Test. Click on Temporary Testing QR Code to generate your QR code.",{"id":953,"title":954,"titles":955,"content":956,"level":590},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#step-9-scan-qr-code-in-super-qi-uat","Step 9: Scan QR Code in Super Qi UAT",[56,910],"Open your Super Qi UAT app and press the scan button to open the camera. Scan the QR code to open your first Miniapp. You will notice that your Miniapp displays Google (google.com) instead of your actual application. This is because the Miniapp URL is currently set to https://www.google.com as a placeholder. In the next section, we will change this to create your first Demo Miniapp.",{"id":958,"title":959,"titles":960,"content":961,"level":579},"/developers-guide/create-your-first-miniapp/configure-and-test-miniapp#whats-next","What's Next?",[56],"You have successfully configured your Miniapp for UAT testing! In the next documentation, we will set up a Demo Miniapp that has most of the functionalities used in Super Qi including authentications, payments, etc... and we will have it up and running when scanning the QR Code instead of getting Google.com Ready to continue? The next section will guide you through creating your first Demo Miniapp.",{"id":67,"title":66,"titles":963,"content":964,"level":573},[],"Installing and setting up the Super Qi Demo Miniapp.",{"id":966,"title":115,"titles":967,"content":968,"level":579},"/developers-guide/demo-miniapp/installation-steps#overview",[66],"This section of the documentation covers installing, running, and exploring the Demo Miniapp code. It is recommended to follow these steps to understand: How testing locally worksHow the Super Qi APIs function in code By the completing the \"Demo Miniapp\" section, you will have a fully functional Demo Miniapp running locally and a solid understanding of how to integrate with Super Qi.",{"id":970,"title":869,"titles":971,"content":972,"level":579},"/developers-guide/demo-miniapp/installation-steps#prerequisites",[66],"Before you begin, ensure you have the following installed: Git - for cloning the repositoryNode.js (v18 or higher recommended)npm or yarn - for package managementGo (v1.21 or higher recommended) - for the backend",{"id":974,"title":975,"titles":976,"content":977,"level":590},"/developers-guide/demo-miniapp/installation-steps#git","Git",[66,869],"Check if Git is installed: git --version If you see an error or \"command not found\", install Git: macOS: Install via Homebrew\nbrew install git\nWindows: Download from git-scm.comLinux (Ubuntu/Debian):\nsudo apt update && sudo apt install git",{"id":979,"title":980,"titles":981,"content":982,"level":590},"/developers-guide/demo-miniapp/installation-steps#nodejs-and-npm","Node.js and npm",[66,869],"Check if Node.js and npm are installed: node --version\nnpm --version If you see an error or \"command not found\", install Node.js (npm is included): macOS/Linux: We recommend using nvm (Node Version Manager)\n# Install nvm\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash\n\n# Restart terminal, then install Node.js\nnvm install 18\nnvm use 18\nWindows: Download from nodejs.org (LTS version recommended)",{"id":984,"title":985,"titles":986,"content":987,"level":590},"/developers-guide/demo-miniapp/installation-steps#yarn-optional","Yarn (Optional)",[66,869],"Check if Yarn is installed: yarn --version If you prefer using Yarn instead of npm and it's not installed: npm install -g yarn",{"id":989,"title":990,"titles":991,"content":992,"level":590},"/developers-guide/demo-miniapp/installation-steps#go","Go",[66,869],"Check if Go is installed: go version If you see an error or \"command not found\", install Go: macOS: Install via Homebrew\nbrew install go\nWindows: Download from go.dev/dlLinux (Ubuntu/Debian):\nsudo apt update && sudo apt install golang-go",{"id":994,"title":995,"titles":996,"content":997,"level":579},"/developers-guide/demo-miniapp/installation-steps#installation-guide","Installation Guide",[66],"Follow these steps to install the Demo Miniapp locally:",{"id":999,"title":1000,"titles":1001,"content":1002,"level":590},"/developers-guide/demo-miniapp/installation-steps#step-1-clone-the-repository","Step 1: Clone the Repository",[66,995],"Open your terminal, move to the folder where you want the project to live, and clone the Demo Miniapp: # Using HTTPS\ngit clone https://github.com/Qi-Mobile/superqi-demo-miniapp.git\n\n# Or, using SSH\ngit clone git@github.com:Qi-Mobile/superqi-demo-miniapp.git If the clone command doesn't work — for example, Git isn't installed or your access isn't set up — you can get the code manually instead: open the Super Qi Demo Miniapp repository on GitHub, click the green Code button, and either copy the clone URL or choose Download ZIP.",{"id":1004,"title":1005,"titles":1006,"content":1007,"level":590},"/developers-guide/demo-miniapp/installation-steps#step-2-navigate-to-the-project","Step 2: Navigate to the Project",[66,995],"Once the cloning is complete, navigate into the project directory: cd superqi-demo-miniapp",{"id":1009,"title":1010,"titles":1011,"content":1012,"level":590},"/developers-guide/demo-miniapp/installation-steps#step-3-install-dependencies","Step 3: Install Dependencies",[66,995],"Open two separate terminal windows to install dependencies for both the frontend and backend.",{"id":1014,"title":1015,"titles":1016,"content":1017,"level":739},"/developers-guide/demo-miniapp/installation-steps#terminal-1-frontend","Terminal 1: Frontend",[66,995,1010],"Navigate to the frontend directory and install npm packages: cd superqi-demo-miniapp/frontend\nnpm install",{"id":1019,"title":1020,"titles":1021,"content":1022,"level":739},"/developers-guide/demo-miniapp/installation-steps#terminal-2-backend","Terminal 2: Backend",[66,995,1010],"Navigate to the backend directory and install its dependencies. The demo ships\ntwo interchangeable backends — pick Go or Node.js: cd superqi-demo-miniapp/backend-go\ngo mod tidy\ngo mod download\ncd superqi-demo-miniapp/backend-node\nnpm install",{"id":1024,"title":1025,"titles":1026,"content":1027,"level":579},"/developers-guide/demo-miniapp/installation-steps#installation-complete","Installation Complete",[66],"You have successfully installed the Demo Miniapp and all its dependencies. Everything is now ready, and you can proceed to testing the Miniapp locally. Ready to continue? The next section will guide you through running and testing your Demo Miniapp. html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"id":72,"title":71,"titles":1029,"content":1030,"level":573},[],"Configuring and running the Demo Miniapp locally for testing.",{"id":1032,"title":115,"titles":1033,"content":1034,"level":579},"/developers-guide/demo-miniapp/testing-locally#overview",[71],"In this section, we will configure and run the Demo Miniapp locally for testing. This allows you to develop and debug your Miniapp before deploying it to a remote server.",{"id":1036,"title":1037,"titles":1038,"content":1039,"level":590},"/developers-guide/demo-miniapp/testing-locally#how-local-testing-works","How Local Testing Works",[71,115],"Local testing requires running both the backend and frontend simultaneously on your machine. Here's how it works: The backend runs on your machine and exposes an APIThe frontend runs on your machine and connects to the backendYour phone (with Super Qi UAT) scans the QR code and loads the frontendThe frontend communicates with the backend over your local network Important: Your phone and your machine (laptop or PC) must be connected to the same network for local testing to work. If they are on different networks, your phone won't be able to reach the backend.",{"id":1041,"title":1042,"titles":1043,"content":1044,"level":579},"/developers-guide/demo-miniapp/testing-locally#backend-configuration","Backend Configuration",[71],"The backend requires credentials to communicate with the Super Qi APIs.",{"id":1046,"title":1047,"titles":1048,"content":1049,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-1-create-the-env-file","Step 1: Create the .env File",[71,1042],"Navigate to the backend directory and create a .env file (Below is bash command, but select whether you want to run NodeJS or Go): cd superqi-demo-miniapp/backend-go\ntouch .env\ncd superqi-demo-miniapp/backend-node\ntouch .env",{"id":1051,"title":1052,"titles":1053,"content":1054,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-2-get-credentials","Step 2: Get Credentials",[71,1042],"Obtain your UAT credentials following the instructions in the UAT and Credentials guide. Add the following variables to your .env file (both the Go and Node.js backends use the same format): # Gateway Configuration\nALIPAY_GATEWAY_URL=\u003Cyour Gateway URL>\nALIPAY_CLIENT_ID=\u003Cyour Client ID>\n\n# RSA Keys — paths to the key files you save in Step 3\nALIPAY_MERCHANT_PRIVATE_KEY_PATH=\u003Cpath to your private key>\nALIPAY_PUBLIC_KEY_PATH=\u003Cpath to your public key>\n\n# Token Encryption — a 32-byte key required by the demo backend\nJWT_KEY=\u003C32-byte key for JWE> Your Merchant ID is used inside the Super Qi Console dashboard, not in the backend .env — so it does not appear here.",{"id":1056,"title":1057,"titles":1058,"content":1059,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-3-save-your-keys","Step 3: Save Your Keys",[71,1042],"You receive only the private key from the Miniapps team. Obtain the matching public key for your environment from the Signature Validation guide. Save both key files in the backend directory and reference their paths in your .env file (ALIPAY_MERCHANT_PRIVATE_KEY_PATH and ALIPAY_PUBLIC_KEY_PATH).",{"id":1061,"title":1062,"titles":1063,"content":1064,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-4-save-the-env-file","Step 4: Save the .env File",[71,1042],"After adding all the required credentials, save the .env file. Your backend is now configured.",{"id":1066,"title":1067,"titles":1068,"content":1069,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-5-install-dependencies","Step 5: Install Dependencies",[71,1042],"Install the required dependencies for your backend: go mod download\nnpm install",{"id":1071,"title":1072,"titles":1073,"content":1074,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-6-run-the-backend","Step 6: Run the Backend",[71,1042],"Start the backend server by running the following command: go run main.go\nnpm run dev The server should now be up and running. Keep this terminal open.",{"id":1076,"title":1077,"titles":1078,"content":1079,"level":579},"/developers-guide/demo-miniapp/testing-locally#frontend-configuration","Frontend Configuration",[71],"The frontend needs to know the IP address of the machine running the backend so it can make API requests.",{"id":1081,"title":1082,"titles":1083,"content":1084,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-1-get-your-machines-ip-address","Step 1: Get Your Machine's IP Address",[71,1077],"Open a terminal and run the following command to get your machine's network IP address: macOS/Linux: ifconfig | grep \"inet \" | grep -v 127.0.0.1 Windows: ipconfig Look for the IP address that is not 127.0.0.1 (loopback). This is your machine's IP on the local network (e.g., 192.168.1.100). Why not use localhost or 127.0.0.1 ?When you scan the QR code with your phone, the Miniapp runs on your phone's browser. If you use 127.0.0.1 or localhost, the phone will look for the backend on itself (the phone), not on your machine. You need to use your machine's network IP address so the phone can reach the backend over the network.",{"id":1086,"title":1087,"titles":1088,"content":1089,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-2-update-base_url","Step 2: Update BASE_URL",[71,1077],"Open the file common/main.js in the frontend directory: cd superqi-demo-miniapp/frontend Find the BASE_URL variable and update it with your machine's IP address: // Before\nconst BASE_URL = \"http://localhost:8080\";\n\n// After (replace with your IP address)\nconst BASE_URL = \"http://192.168.1.100:8080\";",{"id":1091,"title":1092,"titles":1093,"content":1094,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-3-save-the-file","Step 3: Save the File",[71,1077],"Save the main.js file after updating the BASE_URL.",{"id":1096,"title":1097,"titles":1098,"content":1099,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-4-update-the-dependencies","Step 4: Update the dependencies",[71,1077],"npm install",{"id":1101,"title":1102,"titles":1103,"content":1104,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-5-run-the-frontend","Step 5: Run the Frontend",[71,1077],"Start the frontend development server with host mode enabled: npm run dev -- --host This will start the development server and expose it on your network. Copy the IP address that is not the loopback address (127.0.0.1). This is the URL you will use in the Super Qi Console.",{"id":1106,"title":1107,"titles":1108,"content":1109,"level":579},"/developers-guide/demo-miniapp/testing-locally#super-qi-console-configuration","Super Qi Console Configuration",[71],"Now that both the backend and frontend are running, you need to update the Miniapp URL in the Super Qi Console and release a new version.",{"id":1111,"title":1112,"titles":1113,"content":1114,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-1-navigate-to-your-miniapp","Step 1: Navigate to Your Miniapp",[71,1107],"Log into Super Qi Console and navigate to your Miniapp.",{"id":1116,"title":1117,"titles":1118,"content":1119,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-2-go-to-information","Step 2: Go to Information",[71,1107],"Click on Information to view your Miniapp details.",{"id":1121,"title":1122,"titles":1123,"content":1124,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-3-edit-information","Step 3: Edit Information",[71,1107],"Click on Edit to modify your Miniapp information.",{"id":1126,"title":1127,"titles":1128,"content":1129,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-4-update-the-url","Step 4: Update the URL",[71,1107],"Update the Miniapp URL with the IP address you copied from the frontend development server. Click Save to save your changes.",{"id":1131,"title":1132,"titles":1133,"content":1134,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-5-release-a-new-version","Step 5: Release a New Version",[71,1107],"After saving the new URL, you need to release a new version of your Miniapp for the changes to take effect. For detailed steps on releasing a new version, follow the instructions in Configure Miniapp.",{"id":1136,"title":1137,"titles":1138,"content":1139,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-6-get-the-qr-code","Step 6: Get the QR code",[71,1107],"Click on the \"Temporary Testing QR Code\" for the QR code to appear, and now the Demo Miniapp is ready to be explored!",{"id":1141,"title":1142,"titles":1143,"content":1144,"level":579},"/developers-guide/demo-miniapp/testing-locally#super-qi-uat","Super Qi UAT",[71],"Now it's time to see your Demo Miniapp in action!",{"id":1146,"title":1147,"titles":1148,"content":1149,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-1-open-super-qi-uat","Step 1: Open Super Qi UAT",[71,1142],"Open the Super Qi UAT application on your phone.",{"id":1151,"title":1152,"titles":1153,"content":1154,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-2-scan-the-qr-code","Step 2: Scan the QR Code",[71,1142],"Use the scan feature to scan the QR code displayed in the Super Qi Console.",{"id":1156,"title":1157,"titles":1158,"content":1159,"level":590},"/developers-guide/demo-miniapp/testing-locally#step-3-explore-the-demo-miniapp","Step 3: Explore the Demo Miniapp",[71,1142],"The Super Qi Demo Miniapp home page will open: This is the Demo Miniapp! You can explore all of its features by navigating through the pages. Each functionality has its own dedicated page with a terminal that prints the results, allowing you to see exactly how the Super Qi APIs work. Happy Exploration!",{"id":1161,"title":1162,"titles":1163,"content":1164,"level":579},"/developers-guide/demo-miniapp/testing-locally#troubleshooting","Troubleshooting",[71],"If your Miniapp doesn't load or API calls fail, work through these common issues: SymptomLikely causeFixMiniapp loads but API calls fail / time outPhone and machine are on different networksConnect both to the same Wi-Fi. Guest/corporate networks often isolate devices — use a shared network or a phone hotspot.API calls go to the wrong placeBASE_URL still points to localhost/127.0.0.1Set BASE_URL in common/main.js to your machine's network IP (e.g. http://192.168.1.100:8080), not loopback.Connection refusedBackend isn't running, or the port in BASE_URL doesn't match the backend's portKeep the backend terminal running, and make sure the port in BASE_URL matches the port the backend prints on startup.Phone can't reach the backend at allYour machine's firewall is blocking incoming connectionsAllow incoming connections on the backend port, or temporarily disable the firewall while testing.Frontend URL not reachable from phoneFrontend wasn't started in host modeRestart with npm run dev -- --host.IP stopped working after a whileMachine got a new IP via DHCP, or a VPN changed itRe-run the IP lookup, update BASE_URL, and disable any VPN during local testing.Miniapp opens but shows the wrong or old buildThe scanned Miniapp is set to the Prod environment, not TestingIn Super Qi UAT, make sure you scan the Miniapp that is in the Testing environment, not the Prod environment.Changes don't appear after updating the URLNew version wasn't released in the ConsoleRelease a new version after editing the Miniapp URL, then regenerate the testing QR code. Still stuck? See the FAQ or contact the Miniapps team. Ready to continue? The next section will guide you through exploring the code. html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"id":82,"title":81,"titles":1166,"content":1167,"level":573},[],"Exploring the Demo Miniapp frontend code structure.",{"id":1169,"title":115,"titles":1170,"content":1171,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/frontend#overview",[81],"The Demo Miniapp frontend is written in Vanilla JavaScript - no frameworks, no libraries, just pure JavaScript. This keeps the codebase simple and easy to understand, making it a great reference for learning how to integrate with Super Qi APIs.",{"id":1173,"title":1174,"titles":1175,"content":1176,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/frontend#project-structure","Project Structure",[81],"The frontend code is organized into the following structure: frontend/\n├── common/           # Shared utilities and helpers\n│   ├── main.js       # Main configuration (BASE_URL, etc.)\n│   ├── console.js    # Terminal/console output utilities\n│   └── ...           # Other shared utilities\n├── category files    # Navigation and grouping pages\n└── feature files     # Individual API/feature implementations",{"id":1178,"title":1179,"titles":1180,"content":1181,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/frontend#common-folder","Common Folder",[81],"The common folder contains shared utilities and helper functions that are used across all pages: FileDescriptionmain.jsContains the main configuration including BASE_URL for API requestsconsole.jsProvides terminal/console output functionality for displaying API responses These common files ensure consistency across the application and reduce code duplication. The only configuration you need to change in the frontend is the BASE_URL inside main.js. This is the URL where the frontend connects to the backend. See Testing Locally for instructions on setting this up.",{"id":1183,"title":1184,"titles":1185,"content":1186,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/frontend#file-types","File Types",[81],"Outside the common folder, there are two types of files:",{"id":1188,"title":1189,"titles":1190,"content":1191,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/frontend#category-files","Category Files",[81,1184],"Category files serve as navigation pages that group related features together. They help organize the Demo Miniapp into logical sections. The Demo Miniapp includes the following categories: auth - Authentication and authorization featuresdevice - Device information and capabilitiesnetwork - Network-related functionalityfile - File system operationslocation - Location and geolocation servicesmedia - Media handling (audio, video, images)messages - Messaging and communication featuresstorage - Data storage and persistenceUI - User interface components and interactions",{"id":1193,"title":1194,"titles":1195,"content":1196,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/frontend#feature-files","Feature Files",[81,1184],"Feature files are dedicated to specific Super Qi APIs or functionalities. Each file demonstrates a particular feature with: A user interface for triggering the APIA terminal/console that displays the resultsExample code showing how to integrate with Super Qi This structure allows you to explore each Super Qi feature independently and see exactly how it works in practice.",{"id":1198,"title":1199,"titles":1200,"content":1201,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/frontend#code-structure","Code Structure",[81],"The frontend follows a linear structure where all files are organized in the same directory. This simple, flat organization is intentional - since this is a demo application built with vanilla JavaScript, there's no need for complex hierarchies or nested folder structures. Each feature file is self-contained and can be understood independently, making it easy to: Find specific examples quicklyCopy code snippets for your own projectsUnderstand how individual APIs work without navigating through multiple directories This straightforward approach keeps the focus on learning Super Qi's capabilities rather than dealing with complicated project organization.",{"id":87,"title":86,"titles":1203,"content":1204,"level":573},[],"Exploring the Demo Miniapp backend code structure.",{"id":1206,"title":115,"titles":1207,"content":1208,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#overview",[86],"The Demo Miniapp backend is available in two implementations - Go and Node.js - both providing the same RESTful API that integrates with the Alipay+ payment gateway. Choose the implementation that best fits your technology stack and preferences. Both versions demonstrate Super Qi's core capabilities including authentication, payments, refunds, agreement payments, and inbox notifications. The backends are intentionally kept simple and straightforward - they're demo applications designed to show you how to integrate with Super Qi APIs, not production-ready systems.",{"id":1210,"title":1211,"titles":1212,"content":1213,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#tech-stack","Tech Stack",[86],"Technology          Version    Purpose\n─────────────────────────────────────────────────────────────\nGo                  1.24.2     Programming language\nFiber               v2         Fast web framework (Express-inspired)\ngo-jose             v3         JWE token encryption\nuuid                v1.6       Unique ID generation\ngodotenv            v1.5       Environment variable management\nTechnology          Version    Purpose\n─────────────────────────────────────────────────────────────\nNode.js             18+        JavaScript runtime\nExpress             v5         Web application framework\nnode-jose           v2.2       JWE token encryption\nuuid                v13        Unique ID generation\ndotenv              v17        Environment variable management\naxios               v1.13      HTTP client for API requests",{"id":1215,"title":1174,"titles":1216,"content":1217,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#project-structure",[86],"The backend code is organized into focused modules: backend-go/\n├── main.go              # Application entry point\n├── api/                 # HTTP endpoint handlers\n│   ├── authEndpoint.go         # Auth token exchange & user info\n│   ├── paymentEndpoint.go      # Online payment creation\n│   ├── refundEndpoint.go       # Payment refunds with polling\n│   ├── agreementEndpoint.go    # 3-step agreement payments\n│   └── notificationEndpoint.go # Inbox message sending\n├── alipay/              # Alipay+ SDK client\n│   ├── client.go        # HTTP client, RSA signing\n│   ├── alipay.go        # API method implementations\n│   ├── model.go         # Request/response types\n│   ├── constants.go     # Product codes (ONLINE_PURCHASE, AGREEMENT_PAYMENT)\n│   └── util.go          # RSA key loading utilities\n└── jwe/                 # Token encryption\n    └── jwe.go           # JWE create/parse with A256GCM\nbackend-node/\n├── src/                 # Source code directory\n│   ├── index.js         # Application entry point\n│   ├── api/             # HTTP endpoint handlers\n│   │   ├── index.js             # Exports all endpoint initializers\n│   │   ├── authEndpoint.js      # Auth token exchange & user info\n│   │   ├── paymentEndpoint.js   # Online payment creation\n│   │   ├── refundEndpoint.js    # Payment refunds with polling\n│   │   ├── agreementEndpoint.js # 3-step agreement payments\n│   │   └── notificationEndpoint.js # Inbox message sending\n│   ├── alipay/          # Alipay+ SDK client\n│   │   ├── index.js     # Exports alipay functions\n│   │   ├── client.js    # HTTP client, RSA signing with Axios\n│   │   ├── alipay.js    # API method implementations\n│   │   ├── constants.js # Product codes (ONLINE_PURCHASE, AGREEMENT_PAYMENT)\n│   │   └── util.js      # RSA key loading utilities\n│   └── jwe/             # Token encryption\n│       └── jwe.js       # JWE create/parse with A256GCM\n└── res/                 # Resources (crypto keys)\n    └── crypto/          # RSA key files directory",{"id":1219,"title":1220,"titles":1221,"content":1222,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#application-entry-point","Application Entry Point",[86],"The application entry point bootstraps the server and sets up routing: File: main.go (lines 15-42)\n\n• Load environment variables from .env file\n• Initialize Alipay+ client with credentials\n• Create Fiber app instance\n• Configure CORS and recovery middleware\n• Register API route handlers under /api prefix\n• Start server on port 1999 (default) or PORT env variable\nFile: src/index.js (lines 13-48)\n\n• Load environment variables from .env file\n• Initialize Alipay+ client with credentials (async)\n• Create Express app instance\n• Configure CORS middleware\n• Parse JSON and URL-encoded request bodies\n• Register API route handlers under /api prefix\n• Start server on port 1999 (default) or PORT env variable Both backend implementations require several environment variables to function. See the Configuration section below for required settings.",{"id":1224,"title":1225,"titles":1226,"content":1227,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#api-endpoints","API Endpoints",[86],"All endpoints are prefixed with /api and organized by functionality:",{"id":1229,"title":128,"titles":1230,"content":1231,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#authentication",[86,1225],"POST /api/auth/apply-token Exchanges an authorization code for an access token and retrieves user information. Purpose: Establishes authenticated session for the user. // File: api/authEndpoint.go\n// Receives auth_code, calls ApplyToken(), then InquiryUserInfo(),\n// and returns a JWE token containing user_id and access_token\n// File: src/api/authEndpoint.js\n// Receives auth_code, calls applyToken(), then inquiryUserInfo(),\n// and returns a JWE token containing user_id and access_token",{"id":1233,"title":1234,"titles":1235,"content":1236,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#online-payment","Online Payment",[86,1225],"POST /api/payment/create Creates a one-time payment transaction.",{"id":1238,"title":1239,"titles":1240,"content":1241,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#refund","Refund",[86,1225],"POST /api/payment/refund Refunds a completed payment transaction.",{"id":1243,"title":133,"titles":1244,"content":1245,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#agreement-payment",[86,1225],"Agreement payments enable recurring charges without user interaction each time. POST /api/agreement/prepare Prepares authorization for agreement payment setup. POST /api/agreement/apply-token Exchanges agreement authorization code for agreement access token. POST /api/agreement/pay Executes payment using a previously established agreement. Use Cases: Subscriptions, recurring billing, automated payments",{"id":1247,"title":1248,"titles":1249,"content":1250,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#inbox-notification","Inbox Notification",[86,1225],"POST /api/notification/send-inbox Sends inbox messages to user's Super Qi wallet app.",{"id":1252,"title":1253,"titles":1254,"content":1255,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#alipay-client-implementation","Alipay+ Client Implementation",[86],"Both backends provide a complete SDK for interacting with Alipay+ APIs with identical functionality.",{"id":1257,"title":1258,"titles":1259,"content":1260,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#client-structure","Client Structure",[86,1253],"The client implements: RSA256 signature generation for request authenticationSignature format: {METHOD} {PATH}\\n{ClientId}.{RequestTime}.{JSONBody}Required headers: Client-Id, Request-Time, Signature, Content-Type // Package: alipay/client.go\n\n// Generate signature for API request\nsignContent := fmt.Sprintf(\"%s %s\\n%s.%s.%s\",\n    httpMethod, path, clientID, requestTime, jsonContent)\n\nhash := sha256.Sum256([]byte(signContent))\nsignature, err := rsa.SignPKCS1v15(rand.Reader, privateKey,\n    crypto.SHA256, hash[:])\nbase64Signature := base64.StdEncoding.EncodeToString(signature)\n// Module: src/alipay/client.js\n\n// Generate signature for API request\nconst signContent = `${httpMethod} ${path}\\n${clientId}.${requestTime}.${content}`;\n\nconst sign = crypto.createSign('SHA256');\nsign.update(signContent);\nsign.end();\n\nconst signature = sign.sign(privateKey, 'base64');",{"id":1262,"title":1263,"titles":1264,"content":1265,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#available-methods","Available Methods",[86,1253],"// Package: alipay/\n\nApplyToken(authCode) → ApplyTokenResponse\nInquiryUserInfo(accessToken) → InquiryUserInfoResponse\nPrepareAuthorization(contractDesc) → PrepareAuthorizationResponse\nInquiryUserCardList(accessToken) → InquiryUserCardListResponse\nPay(PaymentRequest) → PaymentResponse\nRefund(RefundRequest) → RefundResponse\nInquiryRefund(InquiryRefundRequest) → InquiryRefundResponse\nSendInbox(SendInboxRequest) → SendInboxResponse\n// Module: src/alipay/\n\napplyToken(authCode) → Promise\u003CApplyTokenResponse>\ninquiryUserInfo(accessToken) → Promise\u003CInquiryUserInfoResponse>\nprepareAuthorization(contractDescription) → Promise\u003CPrepareAuthorizationResponse>\ninquiryUserCardList(accessToken) → Promise\u003CInquiryUserCardListResponse>\npay(request) → Promise\u003CPaymentResponse>\nrefund(request) → Promise\u003CRefundResponse>\ninquiryRefund(request) → Promise\u003CInquiryRefundResponse>\nsendInbox(request) → Promise\u003CSendInboxResponse>",{"id":1267,"title":1268,"titles":1269,"content":1270,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#response-handling","Response Handling",[86,1253],"All API responses contain a Result struct with: resultStatus: \"S\" (success), \"F\" (fail), \"U\" (unknown), \"A\" (accepted)resultCode: SUCCESS, PAYMENT_NOT_EXIST, REFUND_NOT_EXIST, etc.resultMessage: Human-readable error message",{"id":1272,"title":1273,"titles":1274,"content":637,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#security-token-management","Security & Token Management",[86],{"id":1276,"title":1277,"titles":1278,"content":1279,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#jwe-encryption","JWE Encryption",[86,1273],"Both backends use JWE (JSON Web Encryption) to securely transmit sensitive data: Algorithm: A256GCM (AES-256-GCM)Key encryption: Direct (jose.DIRECT)Key size: 32-byte symmetric key from JWT_KEY environment variableFormat: Base64-encoded full serializationClaims: {user_id, access_token} // Package: jwe/jwe.go\n\n// Create encrypted token\nclaims := jwe.TokenClaims{\n    UserID:      userId,\n    AccessToken: accessToken,\n}\ntoken, err := jwe.CreateJWE(claims)\n\n// Parse encrypted token\nclaims, err := jwe.ParseAndValidateJWE(token)\nuserId := claims.UserID\naccessToken := claims.AccessToken\n// Module: src/jwe/jwe.js\n\n// Create encrypted token\nconst token = await createJWE({\n    user_id: userId,\n    access_token: accessToken\n});\n\n// Parse encrypted token\nconst claims = await parseJWE(token);\nconst userId = claims.user_id;\nconst accessToken = claims.access_token; The main purpose behind using JWE here is to send the data to the frontend and store it in the frontend because we are not using a database in this demo to simplify the whole process. In normal scenarios there won't be a need to use JWE and send the data to the frontend again - just store it in the backend with proper database security.",{"id":1281,"title":1282,"titles":1283,"content":1284,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#configuration","Configuration",[86,1273],"Create a .env file in the backend directory (backend-go or backend-node) with the following variables: # Alipay+ Gateway Configuration\nALIPAY_GATEWAY_URL=\u003CAPI base URL>\nALIPAY_CLIENT_ID=\u003CYour client ID>\n\n# RSA Keys (PEM format)\nALIPAY_MERCHANT_PRIVATE_KEY_PATH=\u003CPath to private key>\nALIPAY_PUBLIC_KEY_PATH=\u003CPath to public key>\n\n# Token Encryption\nJWT_KEY=\u003C32-byte key for JWE> Never commit your .env file or RSA private keys to version control. Keep these credentials secure and separate from your codebase. Both Go and Node.js implementations use the same .env format.",{"id":1286,"title":1287,"titles":1288,"content":637,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#key-implementation-details","Key Implementation Details",[86],{"id":1290,"title":1291,"titles":1292,"content":1293,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#request-id-generation","Request ID Generation",[86,1287],"All API requests use unique IDs following the pattern: {PREFIX}-{UUID}-{TIMESTAMP} Prefixes: Online payment: PAY-...Agreement payment: AGREEMENT-PAY-...Refund: REFUND-...Notification: NOTIF-... Purpose: Ensures idempotency and enables request tracing. import (\n    \"github.com/google/uuid\"\n    \"time\"\n)\n\nrequestId := fmt.Sprintf(\"PAY-%s-%d\",\n    uuid.New().String(),\n    time.Now().Unix()\n)\n// Example: PAY-550e8400-e29b-41d4-a716-446655440000-1640000000\nimport { v4 as uuidv4 } from 'uuid';\n\nconst requestId = `PAY-${uuidv4()}-${Date.now()}`;\n// Example: PAY-550e8400-e29b-41d4-a716-446655440000-1640000000000",{"id":1295,"title":1296,"titles":1297,"content":1298,"level":590},"/developers-guide/demo-miniapp/exploring-the-code/backend#error-handling","Error Handling",[86,1287],"Both backends use consistent error responses: HTTP StatusScenario400 Bad RequestInvalid request body401 UnauthorizedToken validation failure500 Internal Server ErrorAPI call failures All errors return JSON with: success, resultStatus, resultCode, resultMessage // Error response example\nc.Status(fiber.StatusBadRequest).JSON(fiber.Map{\n    \"success\":       false,\n    \"resultStatus\":  \"F\",\n    \"resultCode\":    \"INVALID_REQUEST\",\n    \"resultMessage\": \"Invalid request body\",\n})\n// Error response example\nres.status(400).json({\n    success: false,\n    resultStatus: \"F\",\n    resultCode: \"INVALID_REQUEST\",\n    resultMessage: \"Invalid request body\"\n});",{"id":1300,"title":1301,"titles":1302,"content":1303,"level":579},"/developers-guide/demo-miniapp/exploring-the-code/backend#next-steps","Next Steps",[86],"Now that you understand the backend structure in both Go and Node.js, you can: Choose your stack - Pick the implementation that fits your team's expertiseDevelop your miniapp - Use these demos as a reference for your own implementationTest locally - See Testing Locally for deployment instructionsGo to production - Once complete, move on to the \"Releasing to Production\" section Both backends provide identical functionality, so you can even build a hybrid approach or migrate between them later! html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"id":97,"title":96,"titles":1305,"content":1306,"level":573},[],"How to obtain a permanent UAT/Test QR code for your Miniapp production release.",{"id":1308,"title":115,"titles":1309,"content":1310,"level":579},"/developers-guide/releasing-to-production/security-review#overview",[96],"Once you've completed development and thoroughly tested your Miniapp, it's time to prepare it for the security review, once you pass the security review, you can go live! The first step in this process is obtaining a UAT/test permanent QR code that will be used for the security test.",{"id":1312,"title":1313,"titles":1314,"content":1315,"level":579},"/developers-guide/releasing-to-production/security-review#important-security-considerations","Important Security Considerations",[96],"The Security Team conducts a thorough review of your Miniapp according to standardized security frameworks. In average cases, the security team will report back to the Miniapps development team multiple security issues that need to be patched. It can easily take more than one report back from the security team for your Miniapp to receive the green light to go live. Sometimes issues cannot be fully patched from the first report, requiring multiple review cycles.",{"id":1317,"title":869,"titles":1318,"content":1319,"level":579},"/developers-guide/releasing-to-production/security-review#prerequisites",[96],"Before proceeding, ensure you have: Completed development of your MiniappTested all features thoroughlyHosted your frontend applicationHosted your backend applicationUpdated the frontend URL in the Super Qi Console Make sure your Miniapp is production-ready before applying for a permanent UAT/test QR code. The security team will review your application, so ensure everything is working correctly.",{"id":1321,"title":1322,"titles":1323,"content":637,"level":579},"/developers-guide/releasing-to-production/security-review#step-by-step-guide","Step-by-Step Guide",[96],{"id":1325,"title":1112,"titles":1326,"content":1327,"level":590},"/developers-guide/releasing-to-production/security-review#step-1-navigate-to-your-miniapp",[96,1322],"Log in to the Super Qi Console and navigate to your Miniapp. Select the UAT/test version that you want to release to production.",{"id":1329,"title":1330,"titles":1331,"content":1332,"level":590},"/developers-guide/releasing-to-production/security-review#step-2-apply-for-release","Step 2: Apply for Release",[96,1322],"Click on the \"Apply Release\" button. This will initiate the process of generating a permanent QR code for your Miniapp.",{"id":1334,"title":1335,"titles":1336,"content":1337,"level":590},"/developers-guide/releasing-to-production/security-review#step-3-confirm-release-application","Step 3: Confirm Release Application",[96,1322],"A confirmation popup will appear. Review the details and click \"Apply\" to confirm. Once you click \"Apply\", the system will begin processing your request. This may take a few moments.",{"id":1339,"title":1340,"titles":1341,"content":1342,"level":590},"/developers-guide/releasing-to-production/security-review#step-4-refresh-and-view-qr-code","Step 4: Refresh and View QR Code",[96,1322],"After clicking \"Apply\", wait a few moments and then refresh the page. You should now see your permanent QR code displayed. This QR code is unique to your Miniapp and will be used for the security review.",{"id":1344,"title":1345,"titles":1346,"content":1347,"level":579},"/developers-guide/releasing-to-production/security-review#submitting-for-security-review","Submitting for Security Review",[96],"Once you have obtained the permanent QR code, follow these steps:",{"id":1349,"title":1350,"titles":1351,"content":1352,"level":590},"/developers-guide/releasing-to-production/security-review#_1-contact-miniapp-team","1. Contact Miniapp Team",[96,1345],"Send an email to hani.salih@qi.iq and CC mouamle.hameed@qi.iq with the following information: The permanent QR codeMiniapp nameThe purpose of the Miniapp and how it operatesAPI Documentation (Swagger/Postman)Test user in your dashboard (the one that generally manages, adminstrates... etc) credentials for all roles in the MiniApp (e.g., User, Admin) If your Miniapp doesn't use tools like Swagger/Postman, or uses different technologies that are not specified, you can still describe in your email how your Miniapp behaves. Example email: To: hani.salih@qi.iq\nCC: mouamle.hameed@qi.iq\nSubject: Miniapp Security Review Request - [Your Miniapp Name]\n\nHello team,\n\nOur Miniapp \"Example App\" (v1.0.0) is ready for production release and security review.\n\nAttached is the permanent QR code.\n\nMiniapp Name: Example App\n\nMiniapp Purpose:\nThis Miniapp is an e-commerce platform that allows users to browse products, add items to cart, and make payments using QiCard. Users can view their order history and track deliveries.\n\nHow it operates:\n- Users authenticate using my.getAuthCode and applyToken\n- Product browsing and cart management\n- Payment processing via cashier payment flow (my.tradePay)\n- Order tracking and history\n\nAPI Documentation:\n- Swagger: https://api.example.com/swagger\n- Postman Collection: https://api.example.com/postman-collection.json\n- Manual API description: Our backend exposes REST APIs for product management (GET /api/products, POST /api/orders), user authentication (POST /api/auth/login), and payment processing (POST /api/payments). All endpoints require Bearer token authentication. Request/response formats follow JSON standards.\n\nTest User Credentials:\nWe will provide a dedicated test account in our dashboard for your security testing with the following roles:\n- Admin Role (full access to dashboard and administrative functions)\n- Regular User Role (standard customer access)\nUsername: securityTestUser\nPassword: abc123\n\nPlease proceed with the security review.\n\nThank you!",{"id":1354,"title":1355,"titles":1356,"content":1357,"level":590},"/developers-guide/releasing-to-production/security-review#_2-wait-for-security-team-review","2. Wait for Security Team Review",[96,1345],"After you submit the email: The Miniapp team and the Security Team will review your submissionThe security team will perform a thorough review of your MiniappThey will test functionality, security, and compliance Be patient during the review process. The security team needs time to thoroughly evaluate your Miniapp. This is an important step to ensure the safety and quality of all Miniapps on the Super Qi platform.",{"id":1359,"title":1301,"titles":1360,"content":1361,"level":579},"/developers-guide/releasing-to-production/security-review#next-steps",[96],"After receiving security approval, proceed to Merchant Registration to complete the production release process.",{"id":102,"title":101,"titles":1363,"content":1364,"level":573},[],"Submit your business information to obtain production credentials.",{"id":1366,"title":115,"titles":1367,"content":1368,"level":579},"/developers-guide/releasing-to-production/merchant-registration#overview",[101],"After receiving security approval for your Miniapp, the next step is to complete Merchant Registration. This process involves submitting your business information so that the Super Qi team can create production credentials for your Miniapp.",{"id":1370,"title":869,"titles":1371,"content":1372,"level":579},"/developers-guide/releasing-to-production/merchant-registration#prerequisites",[101],"Before proceeding with merchant registration, ensure: Your Miniapp has been approved by the security teamYou have your business information ready Production credentials are different from your testing/UAT credentials. These credentials will be used for your live Miniapp in production.",{"id":1374,"title":1322,"titles":1375,"content":637,"level":579},"/developers-guide/releasing-to-production/merchant-registration#step-by-step-guide",[101],{"id":1377,"title":1378,"titles":1379,"content":1380,"level":590},"/developers-guide/releasing-to-production/merchant-registration#step-1-wait-for-qi-team-contact","Step 1: Wait for Qi Team Contact",[101,1322],"Once your Miniapp has passed the security review, wait for the Qi team to contact you. They will reach out to initiate the merchant registration process. If you haven't been contacted after your Miniapp's approval, feel free to notify the Miniapps team to let them know your Miniapp has been approved. The team may be busy and might not have noticed the approval yet.",{"id":1382,"title":1383,"titles":1384,"content":1385,"level":590},"/developers-guide/releasing-to-production/merchant-registration#step-2-receive-and-complete-the-excel-sheet","Step 2: Receive and Complete the Excel Sheet",[101,1322],"The Qi team will send you an Excel sheet containing the fields that need to be filled in for merchant credential creation. Fill in all the required information accurately and completely. This information will be used to create your production credentials.",{"id":1387,"title":1388,"titles":1389,"content":1390,"level":590},"/developers-guide/releasing-to-production/merchant-registration#step-3-submit-the-completed-excel-sheet","Step 3: Submit the Completed Excel Sheet",[101,1322],"Once you have filled in all the required details, submit the completed Excel sheet back to the Qi team. Make sure all information is accurate and matches your official business documentation. Incorrect information may delay the credential generation process.",{"id":1392,"title":857,"titles":1393,"content":1394,"level":579},"/developers-guide/releasing-to-production/merchant-registration#what-happens-next",[101],"After submitting your completed Excel sheet: Document Review - The Qi team will review your submitted informationAdditional Requests - The Qi team might contact you multiple times during the credential creation process if they need:\nAdditional official documentsClarification on any informationFurther business verification detailsCredential Generation - Production credentials will be created for your MiniappCredential Delivery - The Miniapps team will contact you with your new production credentials Be responsive to any inquiries from the Qi team. The credential generation process may take some time, especially if additional documentation is required.",{"id":1396,"title":1397,"titles":1398,"content":1399,"level":579},"/developers-guide/releasing-to-production/merchant-registration#receiving-your-credentials","Receiving Your Credentials",[101],"The Miniapps team will contact you and provide your production credentials once they are ready. Keep your production credentials secure! Never share them publicly or commit them to version control. Store them securely using environment variables or a secrets management service.",{"id":1401,"title":1301,"titles":1402,"content":1403,"level":579},"/developers-guide/releasing-to-production/merchant-registration#next-steps",[101],"Once you have received your production credentials, you can proceed to Release Production Miniapp to complete the final steps and launch your Miniapp to production.",{"id":107,"title":106,"titles":1405,"content":1406,"level":573},[],"Final steps to release your Miniapp to production.",{"id":1408,"title":115,"titles":1409,"content":1410,"level":579},"/developers-guide/releasing-to-production/release-prod-miniapp#overview",[106],"You're almost there! By now, you should have received your unique production credentials from the Miniapps team. This final step involves creating a new version of your Miniapp with production credentials and applying for the official release.",{"id":1412,"title":869,"titles":1413,"content":1414,"level":579},"/developers-guide/releasing-to-production/release-prod-miniapp#prerequisites",[106],"By this point, you should have received your production credentials from the Miniapps team. These include your Client ID, Merchant ID, and the Gateway URL. Your production frontend and backend should already be deployed and tested, and you'll need access to Super Qi Console to proceed. Production credentials are different from your UAT/testing credentials. Make sure you're using the correct production credentials for this step.",{"id":1416,"title":1322,"titles":1417,"content":637,"level":579},"/developers-guide/releasing-to-production/release-prod-miniapp#step-by-step-guide",[106],{"id":1419,"title":1420,"titles":1421,"content":1422,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-1-create-new-version-with-production-credentials","Step 1: Create New Version with Production Credentials",[106,1322],"Log in to Super Qi Console and navigate to your Miniapp. You need to create a new version with your production credentials. The process for creating a new version is almost the same as creating your testing version, except at the end, dont create UAT version, stay with the prod version. For detailed instructions, refer to: Configure and Test Miniapp When creating this new version, make sure to use your Production Client ID and Production Merchant ID - not your testing credentials. You'll also need to configure your deployed production frontend URL in this version. Double-check that you're using production credentials, not testing credentials. Using the wrong credentials will cause issues when your Miniapp goes live.",{"id":1424,"title":1425,"titles":1426,"content":1427,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-2-verify-your-configuration","Step 2: Verify Your Configuration",[106,1322],"Before applying for release, take a moment to verify that all your credentials are correctly entered. Make sure your production frontend URL is configured properly, and double-check that your backend is using the production credentials in its .env file.",{"id":1429,"title":1430,"titles":1431,"content":1432,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-3-apply-to-release","Step 3: Apply to Release",[106,1322],"Once you've created the new version with production credentials and verified everything works, navigate to the latest version (the one with production credentials) and click on \"Apply to Release\". A confirmation dialog will appear. Review the details carefully and confirm the release application.",{"id":1434,"title":1435,"titles":1436,"content":1437,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-4-wait-for-miniapps-team-approval","Step 4: Wait for Miniapps Team Approval",[106,1322],"After you apply for release, your application will be sent to the Miniapps team for final review. The team will verify your production setup to ensure everything meets the required standards. Once approved, You will be notified to proceed to the next step. Be patient during the approval process. The Miniapps team will review your submission to ensure everything meets production standards. You will be notified once your Miniapp is approved and goes live.",{"id":1439,"title":1440,"titles":1441,"content":1442,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-5-pilot-testing","Step 5: Pilot Testing",[106,1322],"Once approved, you'll move on to the Pilot Testing stage. Click on the \"Add Testers\" button to begin. Add anything in the input and click on Add. Note that you don't actually have to add real testers - we just need the input to not be empty so it can be submitted. Next, click on the \"Complete Testing\" button to proceed. Then click on the \"Complete\" button for confirmation.",{"id":1444,"title":1445,"titles":1446,"content":1447,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-6-grayscale-release","Step 6: Grayscale Release",[106,1322],"In the Grayscale Release stage, select \"Final Release\" and then click on \"Confirm\" so that the Miniapp can go live.",{"id":1449,"title":1450,"titles":1451,"content":1452,"level":590},"/developers-guide/releasing-to-production/release-prod-miniapp#step-7-miniapp-released","Step 7: Miniapp Released",[106,1322],"Congratulations - your Miniapp is now going live! Now wait 30 minutes and then the Miniapp will be available in Super Qi search. To have your Miniapp appear in a designated section, you will need to communicate with the Miniapps team via the communication channel agreed on.",{"id":1454,"title":898,"titles":1455,"content":1456,"level":579},"/developers-guide/releasing-to-production/release-prod-miniapp#congratulations",[106],"You have successfully completed the development and release process for your Miniapp! Your Miniapp is now awaiting final approval before going public on the Super Qi platform.",{"id":1458,"title":1459,"titles":1460,"content":1461,"level":579},"/developers-guide/releasing-to-production/release-prod-miniapp#need-help","Need Help?",[106],"If you have questions or encounter issues, check the FAQ for frequently asked questions. You can also contact the Miniapps team through your communication channel",{"id":111,"title":115,"titles":1463,"content":1464,"level":573},[],"Complete reference for Super Qi Mini Program APIs, flows, and integration guides.",{"id":1466,"title":115,"titles":1467,"content":1468,"level":579},"/api-reference#overview",[115],"This section contains the complete API reference documentation for building Super Qi Mini Programs. Here you'll find detailed guides on authentication flows, payment integration, backend APIs, and client-side JavaScript APIs.",{"id":1470,"title":1471,"titles":1472,"content":1473,"level":579},"/api-reference#documentation-sections","Documentation Sections",[115],"The API Reference is organized into three main sections to help you quickly find what you need:",{"id":1475,"title":118,"titles":1476,"content":1477,"level":590},"/api-reference#flows",[115,1471],"End-to-end integration guides that walk you through complete user journeys and workflows. What it contains: Step-by-step flow diagramsComplete authentication and payment workflowsRequest/response examplesIntegration best practices When to use: Understanding how different APIs work togetherImplementing user authenticationSetting up payment flows (cashier or agreement)Learning the complete integration process Available Flows Examples: Authentication - User authorization and token managementCashier Payment - Standard payment with wallet cashierAgreement Payment - Recurring auto-debit payments",{"id":1479,"title":1480,"titles":1481,"content":1482,"level":590},"/api-reference#open-apis","Open APIs",[115,1471],"Backend-to-backend HTTP APIs called from your merchant server to the Super Qi backend. What it contains: REST API endpointsRequest/response structuresAuthentication and signature requirementsError codes and handling When to use: Exchanging authorization codes for tokensCreating payment ordersQuerying payment statusProcessing refundsAny server-side operations Key Characteristics: Called from merchant backendRequires digital signature authenticationUses POST method with JSON payloadsBackend-to-backend communication Available Categories: Authorization APIs - Token exchange and agreement preparationPayment APIs - Payment processing and inquiry",{"id":1484,"title":1485,"titles":1486,"content":1487,"level":590},"/api-reference#jsapis","JSAPIs",[115,1471],"Client-side JavaScript APIs called from your Mini Program to access platform features. What it contains: JavaScript function referencesSDK integration guideCallback and promise patterns When to use: Requesting user authorization in the Mini ProgramLaunching the payment cashierSigning agreement contractsAccessing device featuresMaking HTTP requests from the clientDisplaying UI elements (alerts, toasts) Key Characteristics: Called from Mini Program client (front-end)Uses JavaScript with callbacks/promisesRequires JSBridge SDK integrationDirect user interaction Available Categories: Essential APIs - Authentication and payment APIsUI, Network, Storage, Device, Location, and Media APIs",{"id":1489,"title":1490,"titles":1491,"content":1492,"level":579},"/api-reference#quick-decision-guide","Quick Decision Guide",[115],"Need to authenticate a user? Start with the Authentication FlowUse my.getAuthCode JSAPI in your Mini ProgramCall applyToken Open API from your backend Need to process a payment? Start with the Cashier Payment FlowCall pay Open API from your backendUse my.tradePay JSAPI to launch the cashier Need recurring payments? Start with the Agreement Payment FlowUse prepare and qicardSignContractCall pay with agreement parameters",{"id":124,"title":123,"titles":1494,"content":1495,"level":573},[],"End-to-end guide for redirecting users to the wallet cashier flow.",{"id":1497,"title":115,"titles":1498,"content":1499,"level":579},"/api-reference/flows/cashier-payment#overview",[123],"This flow covers the standard cashier payment experience where the Mini Program hands off to the wallet hosted cashier page. Use POST /v1/payments/pay (cashier mode) to create the order, then open the cashier via my.tradePay. Cashier payment is part of the pay API, which supports both cashier and agreement payment scenarios.",{"id":1501,"title":1502,"titles":1503,"content":1504,"level":590},"/api-reference/flows/cashier-payment#flow-steps","Flow Steps",[123,115],"The Mini Program calls this my.getAuthCode JSAPI with specific scopes(USER_ID) to request an authorization code.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-Wallet backend returns accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.The Mini Program creates an order with customerId.The merchant backend calls the payment API to initiate payment flow, including customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.The E-Wallet backend returns payment detail information the merchant backend, such as redirectionUrl.The merchant backend passes the payment detail information to the Mini Program.The Mini Program calls the my.tradePay JSAPI with redirectionUrl to conduct the payment.The E-Wallet App Service displays the cashier page with order information, such as amount, order details, etc.The user confirms the payment in the cashier page.The E-Wallet App Service calls payment service and execute the payment process.When the payment reaches the final status, the E-wallet backend returns the payment result to the Mini Program (Step 18).Also the E-wallet backend notifies the merchant backend of the payment result with paymentNotifyUrl provided in Step 10(Step 19).Finally, E-wallet backend notifies the user of the payment result via SMS/Email/Inbox message (Step 20).",{"id":1506,"title":1507,"titles":1508,"content":1509,"level":579},"/api-reference/flows/cashier-payment#request-structure","Request Structure",[123],"POST /v1/payments/pay\nContent-Type: application/json\n\n{\n  \"productCode\": \"51051000101000000011\",\n  \"paymentRequestId\": \"UDQzzvxwvyvUDxGqhMHUlIBpGkydOQC6\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"order_description\",\n    \"buyer\": {\n      \"referenceBuyerId\": \"216610000000003660xxxx\"\n    }\n  },\n  \"paymentExpiryTime\": \"2024-01-18T16:10:36+03:00\",\n  \"paymentNotifyUrl\": \"https://www.merchant.com/paymentNotifyxxxx\",\n  \"paymentRedirectUrl\": \"https://www.merchant.com/order/return\",\n  \"voidNotifyUrl\": \"https://www.merchant.com/payment/void\",\n  \"extendInfo\": \"{\\\"memo\\\":\\\"channel=miniapp\\\"}\"\n}",{"id":1511,"title":1512,"titles":1513,"content":1514,"level":590},"/api-reference/flows/cashier-payment#field-notes","Field Notes",[123,1507],"productCode: cashier product identifier defined by the wallet (e.g., \"51051000101000000011\").paymentRequestId: unique ID per payment (max 64 characters) for idempotence.paymentAmount.value: value in IQD fils; ensure it matches the order total.order.buyer.referenceBuyerId: must match the customerId returned by applyToken.paymentExpiryTime: optional ISO 8601 timestamp to auto-close the order.paymentNotifyUrl: HTTPS endpoint to receive asynchronous payment results.paymentRedirectUrl: optional URL for post-payment completion/cancel page.voidNotifyUrl: optional endpoint for void notifications.extendInfo: JSON string for custom metadata (max 2048 chars).",{"id":1516,"title":1517,"titles":1518,"content":1519,"level":579},"/api-reference/flows/cashier-payment#response","Response",[123],"{\n  \"result\": {\n    \"resultCode\": \"ACCEPT\",\n    \"resultStatus\": \"A\",\n    \"resultMessage\": \"accept\"\n  },\n  \"paymentId\": \"2023120611121280010016600900000xxxx\",\n  \"redirectActionForm\": {\n    \"redirectionUrl\": \"https://www.wallet.com/cashier?orderId=xxxxxxx\"\n  }\n}",{"id":1521,"title":1522,"titles":1523,"content":1524,"level":590},"/api-reference/flows/cashier-payment#response-interpretation","Response Interpretation",[123,1517],"result.resultStatus = A: payment accepted; redirect the user using redirectActionForm.redirectionUrl via my.tradePay.result.resultStatus = S: payment completed instantly; update order status and wait for notifications.result.resultStatus = U: wallet returned an unknown status; do not mark success/failure yet—wait for notification or poll /v1/payments/inquiryPayment.result.resultStatus = F: payment failed. Inspect result.resultCode (e.g., USER_BALANCE_NOT_ENOUGH, RISK_REJECT, REPEAT_REQ_INCONSISTENT) and provide remediation to the user.",{"id":1526,"title":536,"titles":1527,"content":1528,"level":579},"/api-reference/flows/cashier-payment#common-error-codes",[123],"StatusresultCodeDescriptionRecommended ActionUPAYMENT_IN_PROCESSPayment still processing.Wait for wallet notification or poll /v1/payments/inquiryPayment.FPAYMENT_AMOUNT_EXCEED_LIMITAmount exceeds wallet limit.Send smaller amount or request higher limit.FUSER_BALANCE_NOT_ENOUGHUser’s wallet balance insufficient.Prompt user to top up balance.FUSER_STATUS_ABNORMALUser account restricted.Instruct user to resolve with wallet support.FPARTNER_STATUS_ABNORMALMerchant account restricted.Resolve merchant compliance issues before retrying.FRISK_REJECTBlocked by risk engine.Request user to try later or different channel.FCURRENCY_NOT_SUPPORTUnsupported currency.Use IQD or permitted currency.FINVALID_ACCESS_TOKENAccess token invalid/expired.Re-run applyToken.FREPEAT_REQ_INCONSISTENTDuplicate paymentRequestId with different payload.Reuse original payload or change paymentRequestId.",{"id":1530,"title":1531,"titles":1532,"content":1533,"level":579},"/api-reference/flows/cashier-payment#related-apis","Related APIs",[123],"my.getAuthCodeapplyTokenpaymy.tradePayinquiryPaymentrefund html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":129,"title":128,"titles":1535,"content":1536,"level":573},[],"End-to-end guide for authorizing users and exchanging codes for access tokens.",{"id":1538,"title":115,"titles":1539,"content":1540,"level":579},"/api-reference/flows/authentication#overview",[128],"This flow covers the user authentication process in Mini Programs, enabling merchants to obtain user authorization and access tokens. The flow consists of two key steps: requesting an authorization code via my.getAuthCode and exchanging it for access tokens via applyToken. These tokens allow merchants to access user data and perform authorized operations. Authentication is a prerequisite for both Cashier Payment and Agreement Payment flows. Merchants do not need to implement any additional authentication or authorization mechanisms beyond Super Qi's authentication flow. This authentication system is sufficient for all user authorization and API access requirements.",{"id":1542,"title":1502,"titles":1543,"content":637,"level":590},"/api-reference/flows/authentication#flow-steps",[128,115],{"id":1545,"title":1546,"titles":1547,"content":1548,"level":739},"/api-reference/flows/authentication#authorization-request-phase","Authorization Request Phase",[128,115,1502],"The Mini Program calls the my.getAuthCode JSAPI with specific scopes to request an authorization code.The E-wallet App processes the request and displays the authorization page that needs to be authorized.The user confirms the authorization in the super app.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-Wallet backend returns accessToken information to the merchant backend, such as accessToken, refreshToken, etc. Silent scopes like auth_base, USER_ID, USER_LOGIN_ID, and HASH_LOGIN_ID do not require explicit user consent and are granted automatically.",{"id":1550,"title":1551,"titles":1552,"content":1553,"level":739},"/api-reference/flows/authentication#token-exchange-phase","Token Exchange Phase",[128,115,1502],"After obtaining the authorization code, the merchant exchanges it for access tokens: 1. Request Authorization Code (my.getAuthCode)\nThe Mini Program initiates the authentication flow by calling my.getAuthCode with the required scopes. This JSAPI prompts the user (if needed) and returns an authCode that represents the user's consent. For more details, check the my.getAuthCode documentation. 2. Exchange for Access Token (applyToken)\nThe merchant backend securely exchanges the authCode for access tokens by calling POST /v1/authorizations/applyToken. This endpoint returns an accessToken, refreshToken, and customerId which are used for subsequent API calls. For more details, check the applyToken endpoint documentation. 3. Token Refresh (applyToken with REFRESH_TOKEN)\nWhen the accessToken expires, merchants can obtain a new token without user interaction by calling applyToken with grantType: REFRESH_TOKEN and the stored refreshToken. This maintains seamless user experience without re-authorization. For more details, check the applyToken endpoint documentation.",{"id":1555,"title":1556,"titles":1557,"content":637,"level":579},"/api-reference/flows/authentication#authorization-code-request","Authorization Code Request",[128],{"id":1559,"title":1560,"titles":1561,"content":1562,"level":590},"/api-reference/flows/authentication#mygetauthcode-parameters","my.getAuthCode Parameters",[128,1556],"my.getAuthCode({\n  scopes: ['USER_ID'],\n  success: (res) => {\n    // Send res.authCode to merchant backend\n    my.request({\n      url: 'https://merchant.com/api/auth',\n      method: 'POST',\n      data: {\n        authCode: res.authCode\n      }\n    });\n  },\n  fail: (err) => {\n    console.log('Authorization failed:', err.authErrorScopes);\n  }\n});",{"id":1564,"title":1565,"titles":1566,"content":1567,"level":590},"/api-reference/flows/authentication#available-scopes","Available Scopes",[128,1556],"For the complete, authoritative list of scopes — covering both Customer User and Business (Merchant) User scopes and which support silent authorization — see the Scope Reference in getAuthCode. Scopes marked with \"Silent Authorization: No\" require explicit user consent and will display an authorization dialog. Scope Access by Merchant Type:Internal Qi Merchants: Have access to all available scopes listed above.External Merchants: Can only access auth_base and USER_ID scopes.",{"id":1569,"title":1570,"titles":1571,"content":1572,"level":590},"/api-reference/flows/authentication#success-response","Success Response",[128,1556],"{\n  \"authCode\": \"0000000001T1dc0W0tv44B0BD00007826\",\n  \"authSuccessScopes\": [\"USER_ID\"]\n}",{"id":1574,"title":1575,"titles":1576,"content":1577,"level":590},"/api-reference/flows/authentication#failure-response","Failure Response",[128,1556],"{\n  \"authErrorScopes\": {\n    \"auth_user\": \"10001\"\n  }\n}",{"id":1579,"title":1580,"titles":1581,"content":637,"level":579},"/api-reference/flows/authentication#token-exchange-request","Token Exchange Request",[128],{"id":1583,"title":1584,"titles":1585,"content":1586,"level":590},"/api-reference/flows/authentication#applytoken-request-structure","applyToken Request Structure",[128,1580],"POST /v1/authorizations/applyToken\nContent-Type: application/json\n\n{\n  \"grantType\": \"AUTHORIZATION_CODE\",\n  \"authCode\": \"2810111301lGzcM9CjlF91WH00039190xxxx\"\n}",{"id":1588,"title":1512,"titles":1589,"content":1590,"level":590},"/api-reference/flows/authentication#field-notes",[128,1580],"grantType: Use AUTHORIZATION_CODE to exchange an authCode, or REFRESH_TOKEN to refresh an expired access token.authCode: The authorization code obtained from my.getAuthCode (required when grantType is AUTHORIZATION_CODE).refreshToken: The refresh token from a previous applyToken call (required when grantType is REFRESH_TOKEN).extendInfo: Optional JSON string for additional metadata (max 4096 characters). Never expose accessToken or refreshToken to the Mini Program client. Store them securely on your backend server.",{"id":1592,"title":1593,"titles":1594,"content":1595,"level":579},"/api-reference/flows/authentication#token-exchange-response","Token Exchange Response",[128],"{\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\",\n  \"accessTokenExpiryTime\": \"2023-06-06T12:12:12+08:00\",\n  \"refreshToken\": \"2810100334F62CBC577F468AAC87CFC6C9107811xxxx\",\n  \"refreshTokenExpiryTime\": \"2023-06-08T12:12:12+08:00\",\n  \"customerId\": \"1000001119398804xxxx\"\n}",{"id":1597,"title":1522,"titles":1598,"content":1599,"level":590},"/api-reference/flows/authentication#response-interpretation",[128,1593],"result.resultStatus = S: token exchange successful; store the tokens and customerId securely.result.resultStatus = U: unknown exception; retry the request or check server logs.result.resultStatus = F: exchange failed. Inspect result.resultCode (e.g., INVALID_CODE, EXPIRED_CODE, USED_CODE) and handle accordingly.",{"id":1601,"title":1602,"titles":1603,"content":1604,"level":590},"/api-reference/flows/authentication#response-fields","Response Fields",[128,1593],"accessToken: Token used to authenticate API requests on behalf of the user. Has a shorter lifespan.accessTokenExpiryTime: ISO 8601 timestamp indicating when the access token expires.refreshToken: Token used to obtain a new access token without user interaction.refreshTokenExpiryTime: ISO 8601 timestamp indicating when the refresh token expires.customerId: Unique identifier for the user; use this as referenceBuyerId in payment requests.",{"id":1606,"title":1607,"titles":1608,"content":1609,"level":579},"/api-reference/flows/authentication#token-refresh-request","Token Refresh Request",[128],"When the accessToken expires, use the refresh token to obtain a new one: POST /v1/authorizations/applyToken\nContent-Type: application/json\n\n{\n  \"grantType\": \"REFRESH_TOKEN\",\n  \"refreshToken\": \"2810110033AAB2F588D14B43238637264FCA5AAF35xxxx\"\n} If the refreshToken also expires, the user must re-authorize via my.getAuthCode to obtain a new authorization code.",{"id":1611,"title":536,"titles":1612,"content":637,"level":579},"/api-reference/flows/authentication#common-error-codes",[128],{"id":1614,"title":1615,"titles":1616,"content":1617,"level":590},"/api-reference/flows/authentication#mygetauthcode-errors","my.getAuthCode Errors",[128,536],"CodeDescriptionRecommended Action3Unknown error occurred.Retry the request or check app logs.1000Unknown error occurred.Retry the request or check app logs.1001User cancelled the authorization.Prompt user to try again or explain why authorization is needed.1002App service error occurred.Check network connectivity and retry.1003Request timed out.Retry with a stable network connection.2001Pending agreement authorization.Complete agreement setup first.",{"id":1619,"title":1620,"titles":1621,"content":1622,"level":590},"/api-reference/flows/authentication#applytoken-errors","applyToken Errors",[128,536],"resultCoderesultStatusDescriptionRecommended ActionAUTH_CLIENT_UNSUPPORTED_GRANT_TYPEFUnsupported grant type.Use AUTHORIZATION_CODE or REFRESH_TOKEN.INVALID_CODEFAuthorization code is invalid.Obtain a new authCode via my.getAuthCode.USED_CODEFAuthorization code already used.Obtain a new authCode via my.getAuthCode.EXPIRED_CODEFAuthorization code expired.Obtain a new authCode via my.getAuthCode.INVALID_REFRESH_TOKENFRefresh token is invalid.Re-authorize with my.getAuthCode to get new tokens.EXPIRED_REFRESH_TOKENFRefresh token expired.Re-authorize with my.getAuthCode to get new tokens.USED_REFRESH_TOKENFRefresh token already used.Use the tokens from the previous successful refresh.",{"id":1624,"title":1531,"titles":1625,"content":1626,"level":579},"/api-reference/flows/authentication#related-apis",[128],"my.getAuthCodeapplyTokenprepareqicardSignContract html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"id":134,"title":133,"titles":1628,"content":1629,"level":573},[],"End-to-end guide for setting up recurring payments via QiCard agreement authorization.",{"id":1631,"title":115,"titles":1632,"content":1633,"level":579},"/api-reference/flows/agreement-payment#overview",[133],"This flow covers the agreement payment experience where users authorize recurring or auto-debit payments without requiring approval for each transaction. The merchant first obtains user consent via qicardSignContract, then can charge the user automatically using POST /v1/payments/pay (agreement mode) with the signed agreement token. Agreement payment is part of the pay API and requires the special scope AGREEMENT_PAY to be authorized during the agreement setup phase.",{"id":1635,"title":1502,"titles":1636,"content":1637,"level":590},"/api-reference/flows/agreement-payment#flow-steps",[133,115],"The Mini Program calls merchant backend to prepare the contract.The merchant backend calls this prepare API with contract information to prepare the contract.The E-Wallet backend returns authorization information to the merchant backend, such as authorizationUrl.The merchant backend passes the authorization information to the Mini Program.The Mini Program calls the my.call(\"qicardSignContract\") JSAPI with authorizationUrl to conduct the authorization.The E-Wallet App Service displays the authorization page with contract information provided in Step 2.The user confirms the authorization agreement pay in the authorization page.The E-Wallet App Service calls authorization service and execute the authorization process.When the authorization reaches the final status, the E-wallet backend returns the authCode to the Mini Program (Step 10).The Mini Program sends the authCode merchant backend.The merchant backend calls this applyToken API with authCode to apply the accessToken(Step 12).The E-Wallet backend returns accessToken information to the merchant backend, such as accessToken, refreshToken, etc.The merchant backend calls this payment API with accessToken to deduct money from user's balance silently without user operation(Step 14).The E-wallet backend returns the payment result to the merchant backend instantly(Step 15).Also the E-wallet backend notifies the merchant backend of the payment result with paymentNotifyUrl provided in Step 14(Step 16).Finally, E-wallet backend notifies the user of the payment result via SMS/Email/Inbox message (Step 17).",{"id":1639,"title":1507,"titles":1640,"content":1641,"level":579},"/api-reference/flows/agreement-payment#request-structure",[133],"POST /v1/payments/pay\nContent-Type: application/json\n\n{\n  \"productCode\": \"51051000101000100031\",\n  \"paymentRequestId\": \"UDQzzvxwvyvUDxGqhMHUlIBpGKydOQC6\",\n  \"paymentAuthCode\": \"0000000002202310013fQ6vpiUNV79nT00006725\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"Monthly subscription payment\"\n  },\n  \"paymentExpiryTime\": \"2024-01-18T16:10:36+03:00\",\n  \"paymentNotifyUrl\": \"https://www.merchant.com/paymentNotifyxxxx\"\n}",{"id":1643,"title":1512,"titles":1644,"content":1645,"level":590},"/api-reference/flows/agreement-payment#field-notes",[133,1507],"productCode: agreement payment product identifier defined by the wallet (e.g., \"51051000101000100031\").paymentRequestId: unique ID per payment (max 64 characters) for idempotence.paymentAuthCode: required for agreement payments; this is the accessToken obtained from applyToken after agreement signing.paymentAmount.value: value in IQD fils; ensure it matches the order total.order.buyer.referenceBuyerId: optional in agreement payment; if provided, must match the customerId associated with the agreement.paymentExpiryTime: optional ISO 8601 timestamp to auto-close the order.paymentNotifyUrl: HTTPS endpoint to receive asynchronous payment results.extendInfo: JSON string for custom metadata (max 2048 chars). Ensure the paymentAuthCode is valid and matches the user who signed the agreement. Mismatches will be rejected by the wallet.",{"id":1647,"title":1517,"titles":1648,"content":1649,"level":579},"/api-reference/flows/agreement-payment#response",[133],"{\n  \"result\": {\n    \"resultStatus\": \"S\",\n    \"resultCode\": \"SUCCESS\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"paymentId\": \"2023103011121280010016679410005274x\",\n  \"paymentTime\": \"2023-10-30T09:17:13+03:00\"\n}",{"id":1651,"title":1522,"titles":1652,"content":1653,"level":590},"/api-reference/flows/agreement-payment#response-interpretation",[133,1517],"result.resultStatus = S: payment completed successfully; update order status immediately.result.resultStatus = U: wallet returned an unknown status; wait for notification or poll /v1/payments/inquiryPayment.result.resultStatus = F: payment failed. Inspect result.resultCode (e.g., USER_BALANCE_NOT_ENOUGH, INVALID_ACCESS_TOKEN, AUTH_CODE_ALREADY_USED) and provide remediation to the user. Agreement payments typically complete synchronously (status S or F), unlike cashier payments which return status A (accepted) and require a redirect.",{"id":1655,"title":536,"titles":1656,"content":1657,"level":579},"/api-reference/flows/agreement-payment#common-error-codes",[133],"StatusresultCodeDescriptionRecommended ActionUPAYMENT_IN_PROCESSPayment still processing.Wait for wallet notification or poll /v1/payments/inquiryPayment.FPAYMENT_AMOUNT_EXCEED_LIMITAmount exceeds wallet limit.Send smaller amount or request higher limit.FUSER_BALANCE_NOT_ENOUGHUser's wallet balance insufficient.Notify user to top up balance.FUSER_STATUS_ABNORMALUser account restricted.Instruct user to resolve with wallet support.FPARTNER_STATUS_ABNORMALMerchant account restricted.Resolve merchant compliance issues before retrying.FRISK_REJECTBlocked by risk engine.Request user to try later or different channel.FCURRENCY_NOT_SUPPORTUnsupported currency.Use IQD or permitted currency.FINVALID_ACCESS_TOKENAccess token invalid/expired.Re-run agreement signing flow to obtain new token.FAUTH_CODE_ALREADY_USEDAuthorization code already consumed.Generate new authCode via prepare + qicardSignContract.FINVALID_CODEAuthorization code is illegal.Verify authCode format and expiry.FUSER_AMOUNT_EXCEED_LIMITPayment amount exceeds user's limit.Reduce amount or request user to increase limit.",{"id":1659,"title":1531,"titles":1660,"content":1661,"level":579},"/api-reference/flows/agreement-payment#related-apis",[133],"prepareqicardSignContractapplyTokenpayinquiryPaymentrefund html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":139,"title":138,"titles":1663,"content":1664,"level":573},[],"End-to-end guide for buyer-protected escrow payments with merchant acceptance and customer confirmation.",{"id":1666,"title":115,"titles":1667,"content":1668,"level":579},"/api-reference/flows/escrow-payment#overview",[138],"Escrow payment provides buyer protection by holding funds in escrow until the customer confirms receipt of goods or services. This flow requires multiple API calls throughout the transaction lifecycle: payment initiation, merchant acceptance, and customer confirmation (or void/cancel if issues arise). The escrow flow ensures that: Funds are held securely until the merchant fulfills the orderMerchants must explicitly accept orders before fulfillmentCustomers can confirm receipt to release fundsMerchants can void/cancel if fulfillment cannot be completed Escrow payment uses the special product code 51051000101000100008. Standard cashier payments use a different product code and complete immediately without the acceptance/confirmation steps.",{"id":1670,"title":1671,"titles":1672,"content":637,"level":579},"/api-reference/flows/escrow-payment#complete-escrow-flow","Complete Escrow Flow",[138],{"id":1674,"title":1675,"titles":1676,"content":1677,"level":590},"/api-reference/flows/escrow-payment#_1-initial-payment-cashier-mode","1. Initial Payment (Cashier Mode)",[138,1671],"The flow starts like a standard cashier payment, but uses the escrow product code. Steps 1-18: Follow the standard cashier payment flow: Mini Program gets authorization via my.getAuthCodeMerchant backend exchanges authCode for accessToken via applyTokenMini Program creates order and sends to merchant backendMerchant backend calls pay API with escrow product codeCustomer completes payment in wallet cashierFunds are held in escrow (not released to merchant yet) Request to /v1/payments/pay: {\n  \"productCode\": \"51051000101000100008\",\n  \"paymentRequestId\": \"escrow_order_20240101_123456\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"500000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"iPhone 15 Pro - Space Black\",\n    \"buyer\": {\n      \"referenceBuyerId\": \"216610000000003660xxxx\"\n    }\n  },\n  \"paymentNotifyUrl\": \"https://www.merchant.com/notify/payment\",\n  \"paymentRedirectUrl\": \"https://www.merchant.com/order/return\"\n} Response: {\n  \"result\": {\n    \"resultCode\": \"ACCEPT\",\n    \"resultStatus\": \"A\",\n    \"resultMessage\": \"accept\"\n  },\n  \"paymentId\": \"2024010111121280010016600900000xxxx\",\n  \"redirectActionForm\": {\n    \"redirectionUrl\": \"https://www.wallet.com/cashier?orderId=xxxxxxx\"\n  }\n}",{"id":1679,"title":1680,"titles":1681,"content":1682,"level":590},"/api-reference/flows/escrow-payment#_2-merchant-accepts-order","2. Merchant Accepts Order",[138,1671],"After payment is completed, the merchant reviews the order (checks inventory, validates delivery address, etc.) and must explicitly accept it to proceed with fulfillment. API: POST /v1/payments/merchantAccept Request: {\n  \"paymentId\": \"2024010111121280010016600900000xxxx\"\n} Response: {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  }\n} Why Accept? The acceptance step commits the merchant to fulfilling the order. If the merchant cannot fulfill (out of stock, delivery issue, etc.), they should not accept and should instead use the cancel API.",{"id":1684,"title":1685,"titles":1686,"content":1687,"level":590},"/api-reference/flows/escrow-payment#_3-fulfillment-delivery","3. Fulfillment & Delivery",[138,1671],"After acceptance, the merchant: Prepares and ships the goodsProvides tracking information to customerDelivers the product/service During this phase, the funds remain in escrow.",{"id":1689,"title":1690,"titles":1691,"content":1692,"level":590},"/api-reference/flows/escrow-payment#_4-customer-confirms-receipt","4. Customer Confirms Receipt",[138,1671],"Once the customer receives and verifies the goods/services are satisfactory, they confirm receipt through the Mini Program. This releases the escrowed funds to the merchant. API: POST /v1/payments/confirm Request: {\n  \"paymentId\": \"2024010111121280010016600900000xxxx\",\n  \"confirmRequestId\": \"confirm_20240115_789012\"\n} Response: {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"confirmId\": \"202401151112128001016xxxx\",\n  \"confirmTime\": \"2024-01-15T14:30:22+03:00\"\n} Irreversible Action: Once confirmed, funds are immediately released to the merchant and cannot be reversed. Customers should only confirm after verifying goods are satisfactory.",{"id":1694,"title":1695,"titles":1696,"content":1697,"level":590},"/api-reference/flows/escrow-payment#transaction-complete","Transaction Complete",[138,1671],"The escrow payment is now complete and the merchant receives the funds.",{"id":1699,"title":1700,"titles":1701,"content":637,"level":579},"/api-reference/flows/escrow-payment#alternative-flows","Alternative Flows",[138],{"id":1703,"title":1704,"titles":1705,"content":1706,"level":590},"/api-reference/flows/escrow-payment#cancel-before-acceptance","Cancel Before Acceptance",[138,1700],"If the merchant decides not to accept the order (e.g., out of stock, cannot deliver), they can cancel the payment before calling merchantAccept. This immediately returns the full amount to the customer. API: POST /v1/payments/cancel Use when: Merchant is out of stockCannot deliver to customer's locationPricing error on the orderPayment result delayed and merchant wants to cancel Request: {\n  \"paymentId\": \"2024010111121280010016600900000xxxx\"\n} Response: {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"paymentId\": \"2024010111121280010016600900000xxxx\",\n  \"cancelTime\": \"2024-01-01T15:20:10+03:00\"\n} Important: After calling merchantAccept, you cannot use cancel. Use void instead.",{"id":1708,"title":1709,"titles":1710,"content":1711,"level":590},"/api-reference/flows/escrow-payment#void-after-acceptance","Void After Acceptance",[138,1700],"If issues arise after the merchant has accepted the order but before/during delivery, the merchant can initiate a void to return funds to the customer. API: POST /v1/payments/void Use when: Merchant accepted but cannot fulfill (supplier issue, damaged goods, etc.)Delivery failed or goods cannot be deliveredGoods were damaged and cannot be replacedAny other fulfillment issue preventing order completion Full Void Request: {\n  \"voidRequestId\": \"void_20240105_345678\",\n  \"paymentId\": \"2024010111121280010016600900000xxxx\"\n} Partial Void Request: {\n  \"voidRequestId\": \"void_20240105_345678\",\n  \"paymentId\": \"2024010111121280010016600900000xxxx\",\n  \"voidAmount\": {\n    \"value\": \"200000\",\n    \"currency\": \"IQD\"\n  }\n} Response: {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"voidRequestId\": \"void_20240105_345678\",\n  \"voidId\": \"202401051112128017xxxx\"\n} Partial vs Full Void:Full void: Returns entire amount and closes the orderPartial void: Returns part of the amount; order remains open with timeout for remaining funds",{"id":1713,"title":1714,"titles":1715,"content":1716,"level":590},"/api-reference/flows/escrow-payment#refund-after-completion","Refund After Completion",[138,1700],"If the customer already confirmed receipt but later discovers issues (defective product, wrong item, etc.), the merchant can issue a refund. API: POST /v1/payments/refund Use when: Customer confirmed but goods were defectiveWrong item was deliveredCustomer changed mind after confirmation (merchant's discretion)Warranty claim or return processing Request: {\n  \"refundRequestId\": \"refund_20240120_901234\",\n  \"paymentId\": \"2024010111121280010016600900000xxxx\",\n  \"refundAmount\": {\n    \"value\": \"500000\",\n    \"currency\": \"IQD\"\n  }\n}",{"id":1718,"title":1719,"titles":1720,"content":1721,"level":579},"/api-reference/flows/escrow-payment#key-differences-escrow-vs-standard-payment","Key Differences: Escrow vs Standard Payment",[138],"AspectStandard Cashier PaymentEscrow PaymentProduct Code5105100010100000001151051000101000100008Fund ReleaseImmediateAfter customer confirmationMerchant ActionNone requiredMust call merchantAcceptCustomer ActionNone requiredMust call confirm to release fundsBuyer ProtectionStandard wallet policiesExtended protection with escrow holdAfter AcceptanceUse refund after completionUse void before completion, refund after",{"id":1723,"title":1724,"titles":1725,"content":1726,"level":579},"/api-reference/flows/escrow-payment#polling-payment-status","Polling Payment Status",[138],"Since escrow payments involve multiple steps, use inquiryPayment to check the current transaction status: API: POST /v1/payments/inquiryPayment Request: {\n  \"paymentId\": \"2024010111121280010016600900000xxxx\"\n} Response includes: paymentStatus: Current payment status (PROCESSING, SUCCESS, FAIL, etc.)transactions: Array of all transaction operations (PAY, VOID, REFUND, etc.)",{"id":1728,"title":536,"titles":1729,"content":637,"level":579},"/api-reference/flows/escrow-payment#common-error-codes",[138],{"id":1731,"title":1732,"titles":1733,"content":1734,"level":590},"/api-reference/flows/escrow-payment#merchantaccept-errors","merchantAccept Errors",[138,536],"resultCodeCauseActionORDER_STATUS_INVALIDPayment not completed or already acceptedVerify payment status via inquiryPaymentORDER_IS_MERCHANT_ACCEPTEDAlready acceptedNo action neededORDER_NOT_EXISTInvalid payment IDVerify paymentId",{"id":1736,"title":1737,"titles":1738,"content":1739,"level":590},"/api-reference/flows/escrow-payment#void-errors","void Errors",[138,536],"resultCodeCauseActionORDER_STATUS_INVALIDOrder cannot be voided in current statusCheck if already voided/cancelled/confirmedVOID_AMOUNT_EXCEEDS_AUTH_LIMITVoid amount exceeds payment amountReduce void amountMUTEX_OPERATION_IN_PROCESSINGAnother operation in progressWait and retryORDER_UNSUPPORTED_OPERATIONNon-escrow paymentOnly escrow payments support void",{"id":1741,"title":1742,"titles":1743,"content":1744,"level":590},"/api-reference/flows/escrow-payment#confirm-errors","confirm Errors",[138,536],"resultCodeCauseActionORDER_STATUS_INVALIDMerchant hasn't accepted yetWait for merchant acceptanceMUTEX_OPERATION_IN_PROCESSINGVoid/refund in progressWait and retryORDER_NOT_EXISTInvalid payment IDVerify paymentId",{"id":1746,"title":1747,"titles":1748,"content":1749,"level":590},"/api-reference/flows/escrow-payment#cancel-errors","cancel Errors",[138,536],"resultCodeCauseActionORDER_HAS_BEEN_CAPTUREDAlready confirmed/completedUse refund insteadORDER_HAS_BEEN_VOIDEDAlready voidedNo action neededCANCEL_WINDOW_EXCEEDToo late to cancelUse void or refund",{"id":1751,"title":1531,"titles":1752,"content":1753,"level":579},"/api-reference/flows/escrow-payment#related-apis",[138],"pay - Initiate escrow paymentmerchantAccept - Accept the orderconfirm - Confirm receipt and release fundsvoid - Void payment after acceptancecancel - Cancel before acceptancerefund - Refund after completioninquiryPayment - Query payment status",{"id":1755,"title":1756,"titles":1757,"content":1758,"level":579},"/api-reference/flows/escrow-payment#best-practices","Best Practices",[138],"Always check payment status before calling merchantAccept to ensure payment was successfulSet reasonable timeouts for acceptance and confirmation to avoid funds being held indefinitelyImplement notifications for all payment events (payment, acceptance, confirmation, void, etc.)Validate inventory before accepting orders to avoid accepting orders you cannot fulfillProvide tracking information to customers after acceptance to reduce disputesHandle async notifications properly as some operations may complete asynchronouslyUse idempotent IDs (voidRequestId, confirmRequestId) to safely retry failed operationsMonitor for UNKNOWN_EXCEPTION status and poll inquiryPayment rather than assuming failure html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":143,"title":115,"titles":1760,"content":1761,"level":573},[],"Complete guide to Super Qi's backend-to-backend OpenAPIs for Mini Programs.",{"id":1763,"title":115,"titles":1764,"content":1765,"level":579},"/api-reference/open-apis#overview",[115],"Mini Programs offer a comprehensive set of OpenAPIs to achieve various capabilities, such as payment processing, user authorization, and data exchange. These APIs are designed for backend-to-backend communication between your merchant backend and the Super Qi backend using HTTPS requests. Open APIs are called from your merchant backend to the Super Qi backend. They should never be called directly from the Mini Program client to ensure security and proper authentication. This guide covers the message structure, authentication, and signature generation required for all OpenAPI communications.",{"id":1767,"title":1768,"titles":1769,"content":1770,"level":579},"/api-reference/open-apis#project-setup","Project Setup",[115],"Before sending requests to the Super Qi backend, ensure you have: Client ID: Provided during merchant onboardingPrivate Key: Submitted when creating your merchant account (used to sign all requests)Public Key: Registered with Super Qi for signature verification Keep your private key secure and never expose it in client-side code or public repositories.",{"id":1772,"title":1773,"titles":1774,"content":1775,"level":579},"/api-reference/open-apis#versioning","Versioning",[115],"The current API version is v1. The version is specified in the URL path. Example: https://{host}/v1/payments/pay Different versions of the same API are treated as separate endpoints: /v1/payments/pay is different from /v2/payments/pay",{"id":1777,"title":1778,"titles":1779,"content":1780,"level":579},"/api-reference/open-apis#message-structure","Message Structure",[115],"Understanding how OpenAPI requests and responses are structured is essential before making any API calls. The diagram below illustrates the complete request structure:",{"id":1782,"title":1783,"titles":1784,"content":1785,"level":590},"/api-reference/open-apis#request-url","Request URL",[115,1778],"The request URL follows this structure: https://{host}/{restful_path} Components: host: The base gateway URL assigned to you by the Super Qi team. It is shared privately during onboarding and is not published here — always use the value you received.restful_path: The path to the specific API interface, formatted as /{version}/{resource}/{action} — for example, /v1/payments/pay.version: The current API version is v1. Examples: https://{host}/v1/payments/pay\nhttps://{host}/v1/authorizations/applyToken\nhttps://{host}/v1/payments/refund Each interface is uniquely identified by its restful_path.",{"id":1787,"title":1788,"titles":1789,"content":1790,"level":579},"/api-reference/open-apis#request-method","Request Method",[115],"All OpenAPI requests use the POST method for HTTP requests. POST /v1/payments/pay\nHost: {host}",{"id":1792,"title":1793,"titles":1794,"content":1795,"level":579},"/api-reference/open-apis#authentication-and-security","Authentication and Security",[115],"All requests to Super Qi OpenAPIs require proper authentication through request headers and digital signatures.",{"id":1797,"title":1798,"titles":1799,"content":1800,"level":590},"/api-reference/open-apis#request-headers","Request Headers",[115,1793],"Each request must include the following headers: HeaderRequiredDescriptionExampleContent-TypeYesMedia type of the request body. Always use JSON with UTF-8.application/json; charset=UTF-8Client-IdYesYour unique merchant identifier provided during onboarding.2021001234567890Request-TimeYesISO 8601 timestamp when the request is sent.2024-01-01T12:00:00-07:00SignatureYesDigital signature for request authentication and integrity.algorithm=RSA256, keyVersion=1, signature=**** Complete Header Example: Content-Type: application/json; charset=UTF-8\nClient-Id: 2021001234567890\nRequest-Time: 2024-01-01T12:00:00-07:00\nSignature: algorithm=RSA256, keyVersion=1, signature=base64_encoded_signature Header field names are case-insensitive, but values are case-sensitive.",{"id":1802,"title":1803,"titles":1804,"content":1805,"level":590},"/api-reference/open-apis#signature-generation","Signature Generation",[115,1793],"The signature ensures request authenticity and prevents tampering. Follow these steps to generate a valid signature:",{"id":1807,"title":1808,"titles":1809,"content":1810,"level":739},"/api-reference/open-apis#step-1-create-sign-content","Step 1: Create Sign Content",[115,1793,1803],"Combine the HTTP method, path, and request details in this format: {HTTP_METHOD} {PATH}\\n\n{CLIENT_ID}.{REQUEST_TIME}.{JSON_CONTENT} Example: POST /v1/authorizations/applyToken\n2021001234567890.2024-01-01T12:00:00-07:00.{\"grantType\":\"AUTHORIZATION_CODE\",\"authCode\":\"281011130...\"}",{"id":1812,"title":1813,"titles":1814,"content":1815,"level":739},"/api-reference/open-apis#step-2-hash-the-content","Step 2: Hash the Content",[115,1793,1803],"Use SHA-256 to hash the sign content created in Step 1. const hash = SHA256(signContent);",{"id":1817,"title":1818,"titles":1819,"content":1820,"level":739},"/api-reference/open-apis#step-3-sign-with-rsa","Step 3: Sign with RSA",[115,1793,1803],"Sign the hash using your private key with: Algorithm: RSAPadding: PKCS1v15Hash: SHA-256 const signature = RSA_Sign(hash, privateKey, PKCS1v15);",{"id":1822,"title":1823,"titles":1824,"content":1825,"level":739},"/api-reference/open-apis#step-4-base64-encode","Step 4: Base64 Encode",[115,1793,1803],"Encode the signature in base64 format. const base64Signature = Base64.encode(signature);",{"id":1827,"title":1828,"titles":1829,"content":1830,"level":739},"/api-reference/open-apis#step-5-add-to-header","Step 5: Add to Header",[115,1793,1803],"Include the signature in the request header: Signature: algorithm=RSA256, keyVersion=1, signature={base64Signature} Signature Header Components: ComponentDescriptionValuealgorithmDigital signature algorithm (case-insensitive)RSA256 (default)keyVersionVersion of the key used for signing1 (or your current key version)signatureBase64-encoded signature valueGenerated in Step 4",{"id":1832,"title":1833,"titles":1834,"content":1835,"level":590},"/api-reference/open-apis#code-examples","Code Examples",[115,1793],"Here are complete signature generation examples in different programming languages: signContent := fmt.Sprintf(\"%s %s\\n%s.%s.%s\",\n  httpMethod, path, clientID,\n  requestTime, content\n)\n\nhash := sha256.Sum256([]byte(signContent))\nsignature, err := rsa.SignPKCS1v15(nil, privateKey, crypto.SHA256, hash[:])\n\nbase64Signature := base64.StdEncoding.EncodeToString(signature)\nimport crypto from \"crypto\";\n\nconst signContent = `${httpMethod} ${path}\\n${clientID}.${requestTime}.${content}`;\n\nconst hash = crypto.createHash(\"sha256\").update(signContent).digest();\nconst signature = crypto.sign(\"RSA-SHA256\", hash, privateKey);\n\nconst base64Signature = signature.toString(\"base64\");",{"id":1837,"title":1838,"titles":1839,"content":1840,"level":579},"/api-reference/open-apis#request-body","Request Body",[115],"The request body contains detailed request information in JSON format. All request bodies are JSON objects with parameters specific to each API endpoint.",{"id":1842,"title":1843,"titles":1844,"content":1845,"level":590},"/api-reference/open-apis#parameter-structure","Parameter Structure",[115,1838],"Each API has its own required parameters. Here are some common examples: applyToken Request: {\n  \"grantType\": \"AUTHORIZATION_CODE\",\n  \"authCode\": \"2810111301lGzcM9CjlF91WH00039190xxxx\"\n} pay Request (Cashier Payment): {\n  \"productCode\": \"51051000101000000011\",\n  \"paymentRequestId\": \"UDQzzvxwvyvUDxGqhMHUlIBpGkydOQC6\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"order_description\",\n    \"buyer\": {\n      \"referenceBuyerId\": \"216610000000003660xxxx\"\n    }\n  },\n  \"paymentNotifyUrl\": \"https://www.merchant.com/paymentNotify\"\n} For detailed information about specific request body parameters, refer to the individual API documentation.",{"id":1847,"title":1848,"titles":1849,"content":1850,"level":579},"/api-reference/open-apis#response-structure","Response Structure",[115],"All OpenAPI responses follow a consistent structure with a result object containing status information.",{"id":1852,"title":1853,"titles":1854,"content":1855,"level":590},"/api-reference/open-apis#response-header","Response Header",[115,1848],"Response headers contain metadata about the response: HeaderDescriptionResponse-TimeISO 8601 timestamp when the response was generatedContent-TypeMedia type of the response body (typically application/json; charset=UTF-8)",{"id":1857,"title":1858,"titles":1859,"content":1860,"level":590},"/api-reference/open-apis#response-body","Response Body",[115,1848],"General Structure: {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"additionalField1\": \"value1\",\n  \"additionalField2\": \"value2\"\n} Result Object Fields: FieldTypeDescriptionresultCodestringSpecific result code (e.g., SUCCESS, INVALID_PARAMETER, PAYMENT_IN_PROCESS)resultStatusstringGeneral result status: S (Success), F (Failed), U (Unknown), A (Accepted)resultMessagestringHuman-readable description of the result",{"id":1862,"title":1863,"titles":1864,"content":1865,"level":590},"/api-reference/open-apis#result-status-values","Result Status Values",[115,1848],"StatusMeaningAction RequiredSSuccess - Operation completed successfullyProceed with business logicAAccepted - Request accepted, further action requiredFollow instructions in response (e.g., redirect user)UUnknown - Result uncertain due to system errorRetry or query status; do not assume success/failureFFailed - Operation failedCheck resultCode and handle error appropriately",{"id":1867,"title":1868,"titles":1869,"content":1870,"level":579},"/api-reference/open-apis#response-example","Response Example",[115],"HTTP/1.1 200 OK\nContent-Type: application/json; charset=UTF-8\nResponse-Time: 2024-11-15T14:30:01.234+03:00\n\n{\n  \"result\": {\n    \"resultCode\": \"ACCEPT\",\n    \"resultStatus\": \"A\",\n    \"resultMessage\": \"accept\"\n  },\n  \"paymentId\": \"2023120611121280010016600900000xxxx\",\n  \"redirectActionForm\": {\n    \"redirectionUrl\": \"https://www.wallet.com/cashier?orderId=xxxxxxx\"\n  }\n}",{"id":1872,"title":1873,"titles":1874,"content":1875,"level":579},"/api-reference/open-apis#related-documentation","Related Documentation",[115],"inquireUserInfo - Inquiring the user's informationpay - payment APIs guideapplyToken - Exchanging authCode for an accessToken html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"id":154,"title":153,"titles":1877,"content":1878,"level":573},[],"Exchanging the auth code for wallet access tokens.",{"id":1880,"title":115,"titles":1881,"content":1882,"level":579},"/api-reference/open-apis/authorization/apply-token#overview",[153],"POST /v1/authorizations/applyToken issues wallet access tokens for merchants. Call this endpoint after obtaining an authorization code (for example via my.getAuthCode or qicardSignContract) or when you need to refresh an existing token. The app returns accessToken and refreshToken values that must be stored securely on your server. The client should invoke my.getAuthCode before calling applyToken to collect the authCode.Use grantType: REFRESH_TOKEN with the refreshToken to renew expiring tokens without user interaction.Never expose the resulting tokens to the Mini Program; keep them on the merchant backend. To view the end-to-end diagram, see the Authentication flow.",{"id":1884,"title":1885,"titles":1886,"content":1887,"level":579},"/api-reference/open-apis/authorization/apply-token#endpoint","Endpoint",[153],"MethodPathPOST/v1/authorizations/applyToken",{"id":1889,"title":1890,"titles":1891,"content":1892,"level":579},"/api-reference/open-apis/authorization/apply-token#api-structure","API Structure",[153],"A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see: OpenAPIs Overview.",{"id":1894,"title":1895,"titles":1896,"content":1897,"level":590},"/api-reference/open-apis/authorization/apply-token#request","Request",[153,1890],"FieldTypeRequiredDescriptionExamplegrantTypestringYesToken exchange mode. Accepted values: AUTHORIZATION_CODE (exchange authCode), REFRESH_TOKEN (exchange refreshToken).\"AUTHORIZATION_CODE\"authCodestringConditionalAuthorization code obtained from the wallet. Required when grantType is AUTHORIZATION_CODE. Max length 64; no special characters @#?.\"2810111301lGzcM9CjlF91WH00039190xxxx\"refreshTokenstringConditionalRefresh token issued previously. Required when grantType is REFRESH_TOKEN. Max length 128; no @#?.\"2810110133AB2F588D14B43238637264FCA5AAF35xxxx\"extendInfostringNoAdditional metadata (max 4096 characters, no @#?).{ \"memo\": \"Recurring agreement\" } {\n  \"grantType\": \"AUTHORIZATION_CODE\",\n  \"authCode\": \"2810111301lGzcM9CjlF91WH00039190xxxx\"\n} {\n  \"grantType\": \"REFRESH_TOKEN\",\n  \"refreshToken\": \"2810110033AAB2F588D14B43238637264FCA5AAF35xxxx\"\n}",{"id":1899,"title":1517,"titles":1900,"content":1901,"level":590},"/api-reference/open-apis/authorization/apply-token#response",[153,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesOutcome metadata including status and error codes.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"success\" }accessTokenstringConditionalAccess token for user data APIs. Present when exchange succeeds. Max length 128; no @#?.\"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"accessTokenExpiryTimestringConditionalExpiry timestamp (ISO 8601). Required when accessToken is issued.\"2023-06-06T12:12:12+08:00\"refreshTokenstringConditionalRefresh token for future exchanges. Required when exchange succeeds.\"2810100334F62CBC577F468AAC87CFC6C9107811xxxx\"refreshTokenExpiryTimestringConditionalExpiry timestamp (ISO 8601). Required when refreshToken is issued.\"2023-06-08T12:12:12+08:00\"customerIdstringYesIdentifier of the authorizing user or merchant app. Max length 64; no @#?.\"1000001119398804xxxx\"extendInfostringNoExtended response metadata (max 4096 characters, no @#?).null {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\",\n  \"accessTokenExpiryTime\": \"2023-06-06T12:12:12+08:00\",\n  \"refreshToken\": \"2810100334F62CBC577F468AAC87CFC6C9107811xxxx\",\n  \"refreshTokenExpiryTime\": \"2023-06-08T12:12:12+08:00\",\n  \"customerId\": \"1000001119398804xxxx\"\n}",{"id":1903,"title":1904,"titles":1905,"content":1906,"level":590},"/api-reference/open-apis/authorization/apply-token#result-processing-logic","Result Processing Logic",[153,1890],"StatusDescriptionSRequest succeeded. resultCode is SUCCESS and resultMessage is success.UOutcome unknown. resultCode is UNKNOWN_EXCEPTION; retry after checking Common error codes or logs.FRequest failed. Inspect resultCode and cross-reference Error codes.",{"id":1908,"title":1909,"titles":1910,"content":1911,"level":579},"/api-reference/open-apis/authorization/apply-token#error-codes","Error Codes",[153],"Error CodeResult StatusMessageNext StepAUTH_CLIENT_UNSUPPORTED_GRANT_TYPEFMerchant client does not support this grantType.Use AUTHORIZATION_CODE or REFRESH_TOKEN.INVALID_REFRESH_TOKENFRefresh token is invalid.Request a new refresh token via applyToken.EXPIRED_REFRESH_TOKENFRefresh token expired.Re-authorize with my.getAuthCode to obtain a new refresh token.USED_REFRESH_TOKENFRefresh token already used.Acquire a new refresh token via applyToken.INVALID_CODEFAuthorization code invalid.Obtain a new authCode via my.getAuthCode.USED_CODEFAuthorization code already used.Request a new authCode via my.getAuthCode.EXPIRED_CODEFAuthorization code expired.Request a new authCode via my.getAuthCode.",{"id":1913,"title":1914,"titles":1915,"content":1916,"level":579},"/api-reference/open-apis/authorization/apply-token#related-links","Related Links",[153],"my.getAuthCodeqicardSignContractAgreement Payment flow html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":159,"title":158,"titles":1918,"content":1919,"level":573},[],"Initialize a QiCard agreement authorization request.",{"id":1921,"title":115,"titles":1922,"content":1923,"level":579},"/api-reference/open-apis/authorization/prepare#overview",[158],"POST /v1/authorizations/prepare issues an authUrl that merchants use to launch the QiCard signing experience. Supply the agreement scope and descriptive metadata; upon success the API returns a hosted URL for qicardSignContract. To view the end-to-end diagram, see the Agreement Payment flow.",{"id":1925,"title":1885,"titles":1926,"content":1927,"level":579},"/api-reference/open-apis/authorization/prepare#endpoint",[158],"MethodPathPOST/v1/authorizations/prepare",{"id":1929,"title":1890,"titles":1930,"content":1892,"level":579},"/api-reference/open-apis/authorization/prepare#api-structure",[158],{"id":1932,"title":1895,"titles":1933,"content":1934,"level":590},"/api-reference/open-apis/authorization/prepare#request",[158,1890],"FieldTypeRequiredDescriptionscopesstringYesScope to authorize. Use AGREEMENT_PAY to initiate agreement payments. Max length 16 characters.extendInfostringYesJSON string describing the contract. Max length 4096 characters; disallow @, #, ?. Include keys such as language (\"en-US\" or \"ar-IQ\") and contractDesc. {\n  \"scopes\": \"AGREEMENT_PAY\",\n  \"extendInfo\": \"{\\\"language\\\":\\\"en-US\\\",\\\"contractDesc\\\":\\\"agreement payment description.\\\"}\"\n}",{"id":1936,"title":1517,"titles":1937,"content":1938,"level":590},"/api-reference/open-apis/authorization/prepare#response",[158,1890],"FieldTypeRequiredDescriptionresultobjectYesOutcome metadata with status and codes.authUrlstringNoHosted authorization URL to pass into qicardSignContract. Returned when result.resultStatus is S. Max length 256 characters. {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"authUrl\": \"https://xxxxx.wallet.iq?authId=xxxxx\"\n}",{"id":1940,"title":1904,"titles":1941,"content":1942,"level":590},"/api-reference/open-apis/authorization/prepare#result-processing-logic",[158,1890],"StatusDescriptionSRequest succeeded. The merchant can redirect users via authUrl.UResult unknown (resultCode: UNKNOWN_EXCEPTION). Retry or inspect Common error codes.FRequest failed. Check resultCode and the Error codes table.",{"id":1944,"title":1909,"titles":1945,"content":1946,"level":579},"/api-reference/open-apis/authorization/prepare#error-codes",[158],"Error CodeResult StatusMessageNext StepINVALID_SCOPEFThe provided scope is invalid.Use a supported scope such as AGREEMENT_PAY.PARAM_ILLEGALFRequest parameters are invalid (e.g., non-numeric fields, malformed JSON).Validate payload fields before retrying.",{"id":1948,"title":1914,"titles":1949,"content":1950,"level":579},"/api-reference/open-apis/authorization/prepare#related-links",[158],"qicardSignContractapplyTokenAgreement Payment flow html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":169,"title":168,"titles":1952,"content":1953,"level":573},[],"Poll payment status when asynchronous notifications are delayed.",{"id":1955,"title":115,"titles":1956,"content":1957,"level":579},"/api-reference/open-apis/payments/inquiry-payment#overview",[168],"POST /v1/payments/inquiryPayment returns the latest status of a wallet payment. Merchants poll this API when asynchronous callbacks (for example via paymentNotifyUrl) do not arrive in time. Always send requests in the smallest currency unit (IQD fils). Poll at a round-robin interval between 5 seconds and 1 minute to avoid throttling.Monetary values must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD is 100000. Mini Program calls my.getAuthCode with the required scopes to request authorization.Wallet app service processes the authorization request and displays the consent page to the user.User approves the authorization, and the wallet backend verifies the request and issues an authCode.Wallet app service returns the authCode to the Mini Program.Mini Program forwards the authCode to the merchant backend.Merchant backend calls applyToken with the authCode to obtain tokens.Wallet backend returns accessToken, refreshToken, and customerId information to the merchant backend.Mini Program creates the payment order using the received customerId and sends it to the merchant backend.Merchant backend invokes /v1/payments/pay to initiate the payment and receives a redirectionUrl and optional paymentNotifyUrl confirmation.Merchant backend relays the redirectionUrl to the Mini Program.Mini Program calls my.tradePay with the redirectionUrl to open the cashier experience.Wallet app service presents the cashier UI, the user confirms the payment, and the wallet backend processes the transaction.Wallet backend returns the payment result to the Mini Program and pushes notifications to the merchant backend via paymentNotifyUrl.Merchant backend polls /v1/payments/inquiryPayment with paymentId or paymentRequestId, and the wallet backend responds with the latest payment status and transaction details.",{"id":1959,"title":1885,"titles":1960,"content":1961,"level":579},"/api-reference/open-apis/payments/inquiry-payment#endpoint",[168],"MethodPathPOST/v1/payments/inquiryPayment",{"id":1963,"title":1890,"titles":1964,"content":1892,"level":579},"/api-reference/open-apis/payments/inquiry-payment#api-structure",[168],{"id":1966,"title":1895,"titles":1967,"content":1968,"level":590},"/api-reference/open-apis/payments/inquiry-payment#request",[168,1890],"FieldTypeRequiredDescriptionExamplepaymentIdstringConditionalWallet-generated payment ID. Max 64 characters. Provide either paymentId or paymentRequestId.\"202312061112128001001660090000xxxx\"paymentRequestIdstringConditionalMerchant-generated payment ID. Max 64 characters. Used when paymentId is unavailable.\"20230101234567890133333xxxx\" {\n  \"paymentRequestId\": \"102217200000000000001xxxx\"\n} {\n  \"paymentId\": \"202312061112128001001660090000xxxx\"\n} Provide either paymentId or paymentRequestId (not both). If both are provided, paymentId takes precedence.",{"id":1970,"title":1517,"titles":1971,"content":1972,"level":590},"/api-reference/open-apis/payments/inquiry-payment#response",[168,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesRequest outcome metadata (status and error codes).{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"success\" }paymentIdstringNoWallet payment ID.\"202312061112128001001660090000xxxx\"paymentRequestIdstringNoMerchant payment ID.\"20230101234567890133333xxxx\"paymentAmountobjectNoAmount/value pair in smallest currency unit.{ \"value\": \"100000\", \"currency\": \"IQD\" }paymentTimestringNoPayment completion timestamp in ISO 8601 format.\"2023-01-01T12:01:01+08:00\"paymentStatusstringNoStatus of the payment. Possible values: PROCESSING, AUTH_SUCCESS, SUCCESS, FAIL.\"SUCCESS\"transactionsarrayNoDetailed transaction records (amount, type, status, timestamp).[{\"transactionAmount\":{\"value\":\"100000\",\"currency\":\"IQD\"},\"transactionId\":\"20231206111212800100xxxx\",\"transactionTime\":\"2023-01-01T12:01:01+08:30\",\"transactionType\":\"PAY\",\"transactionStatus\":\"SUCCESS\"}]extendInfostringNoAdditional information supplied by wallet or merchant. Max length 2048 characters.\"extendInfo\": \"additional information\" {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"paymentId\": \"202312061112128001001660090000xxxx\",\n  \"paymentRequestId\": \"20230101234567890133333xxxx\",\n  \"paymentAmount\": {\n    \"value\": \"100000\",\n    \"currency\": \"IQD\"\n  },\n  \"paymentTime\": \"2023-01-01T12:01:01+08:00\",\n  \"paymentStatus\": \"SUCCESS\",\n  \"transactions\": [\n    {\n      \"transactionAmount\": {\n        \"value\": \"100000\",\n        \"currency\": \"IQD\"\n      },\n      \"transactionId\": \"20231206111212800100xxxx\",\n      \"transactionTime\": \"2023-01-01T12:01:01+08:30\",\n      \"transactionType\": \"PAY\",\n      \"transactionStatus\": \"SUCCESS\"\n    }\n  ]\n}",{"id":1974,"title":1904,"titles":1975,"content":1976,"level":590},"/api-reference/open-apis/payments/inquiry-payment#result-processing-logic",[168,1890],"StatusDescriptionSInquiry succeeded. Check paymentStatus for the actual payment outcome.UResult unknown (resultCode: UNKNOWN_EXCEPTION). Retry later and monitor notifications.FInquiry failed. Review resultCode and resultMessage; see Error codes.",{"id":1978,"title":1909,"titles":1979,"content":1980,"level":579},"/api-reference/open-apis/payments/inquiry-payment#error-codes",[168],"resultStatusresultCoderesultMessageRecommended ActionFORDER_NOT_EXISTOrder does not exist.Verify paymentId/paymentRequestId; treat as unpaid until clarified.",{"id":1982,"title":1914,"titles":1983,"content":1984,"level":579},"/api-reference/open-apis/payments/inquiry-payment#related-links",[168],"my.getAuthCodetradePayapplyToken html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"id":174,"title":173,"titles":1986,"content":1987,"level":573},[],"Poll refund status when asynchronous notifications are delayed.",{"id":1989,"title":115,"titles":1990,"content":1991,"level":579},"/api-reference/open-apis/payments/inquiry-refund#overview",[173],"POST /v1/payments/inquiryRefund retrieves the current status of a wallet refund. Use this endpoint when the refund completion callback takes longer than expected. All monetary amounts must be sent in the smallest currency unit (IQD fils). Poll no more than once every 5 seconds (up to 1 minute) to reduce load.Refund amounts and amounts in responses use the smallest currency unit, e.g. 100 IQD → 100000. Mini Program calls my.getAuthCode with USER_ID scope to request authorization.Wallet app service calls the authorization service to validate the request.Wallet backend returns authCode to the wallet app service.Wallet app service returns authCode to the Mini Program.Mini Program sends the authCode to the merchant backend.Merchant backend invokes applyToken with the authCode to obtain tokens.Wallet backend returns token data (accessToken, refreshToken, customerId) to the merchant backend.Mini Program creates an order using customerId.Merchant backend initiates the payment request with /v1/payments/pay, providing customerId, paymentNotifyUrl, etc.Wallet backend returns payment details (including redirectionUrl) to the merchant backend.Merchant backend forwards the payment details to the Mini Program.Mini Program calls my.tradePay with the redirectionUrl.Wallet app service opens the cashier page with order information.Wallet app service displays the cashier UI to the user.User confirms payment within the cashier UI.Wallet app service triggers the payment execution in the backend.Wallet backend processes the payment and returns the result to the wallet app service.Mini Program receives the payment result from the wallet backend.Wallet backend sends payment notifications to the merchant backend via paymentNotifyUrl.Wallet backend notifies the user via SMS/email/inbox of the payment outcome.User initiates a full or partial refund after receiving goods/services.Mini Program submits the refund request to the merchant backend.Merchant backend calls /v1/payments/refund to request the refund from the wallet backend.Wallet backend returns the refund processing result to the merchant backend.Wallet backend returns refund status to the Mini Program (displayed to user).Mini Program shows the refund result in the UI.If resultCode of the refund is REFUND_IN_PROCESS, merchant backend polls /v1/payments/inquiryRefund using refundId or refundRequestId.Wallet backend responds with the latest refund inquiry result to the merchant backend.",{"id":1993,"title":1885,"titles":1994,"content":1995,"level":579},"/api-reference/open-apis/payments/inquiry-refund#endpoint",[173],"MethodPathPOST/v1/payments/inquiryRefund",{"id":1997,"title":1890,"titles":1998,"content":1892,"level":579},"/api-reference/open-apis/payments/inquiry-refund#api-structure",[173],{"id":2000,"title":1895,"titles":2001,"content":2002,"level":590},"/api-reference/open-apis/payments/inquiry-refund#request",[173,1890],"FieldTypeRequiredDescriptionExamplerefundIdstringConditionalWallet-generated refund ID (max 64 characters). Provide either refundId or refundRequestId.\"202312061112128013001660090000xxxx\"refundRequestIdstringConditionalMerchant-generated refund ID (max 64 characters). Used when refundId is not available.\"2023010123456789013255xxxx\" {\n  \"refundId\": \"202312061112128013001660090000xxxx\",\n  \"refundRequestId\": \"2023010123456789013255xxxx\"\n} If both identifiers are supplied, refundId takes precedence and refundRequestId is ignored.",{"id":2004,"title":1517,"titles":2005,"content":2006,"level":590},"/api-reference/open-apis/payments/inquiry-refund#response",[173,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesOutcome metadata, including resultCode, resultStatus, and resultMessage.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"success\" }refundIdstringNoWallet refund ID.\"202312061112128013001660090000xxxx\"refundRequestIdstringNoMerchant refund ID.\"2023010123456789013255xxxx\"refundAmountobjectNoRefund amount/value in smallest currency unit.{ \"value\": \"100000\", \"currency\": \"IQD\" }refundReasonstringNoReason for the refund, if supplied (max 256 characters).\"Customer requested order cancellation.\"refundTimestringNoTimestamp when funds were deducted from the merchant (ISO 8601).\"2023-01-02T12:01:01+08:30\"refundStatusstringNoRefund processing state: PROCESSING, SUCCESS, or FAIL.\"SUCCESS\"refundFailReasonstringNoDescription explaining why the refund failed (present when refundStatus is FAIL).\"Refund declined by issuer.\"extendInfostringNoAdditional metadata provided by wallet or merchant (max 2048 characters).\"extendInfo\": \"additional info\" {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"refundId\": \"202312061112128013001660090000xxxx\",\n  \"refundRequestId\": \"2023010123456789013255xxxx\",\n  \"refundAmount\": {\n    \"value\": \"100000\",\n    \"currency\": \"IQD\"\n  },\n  \"refundReason\": \"Order cancelled by user.\",\n  \"refundTime\": \"2023-01-02T12:01:01+08:30\",\n  \"refundStatus\": \"SUCCESS\"\n}",{"id":2008,"title":1904,"titles":2009,"content":2010,"level":590},"/api-reference/open-apis/payments/inquiry-refund#result-processing-logic",[173,1890],"StatusDescriptionSRefund inquiry succeeded. Inspect refundStatus for the current state.UUnknown result (resultCode: UNKNOWN_EXCEPTION). Retry later or review logs.FInquiry failed. Review resultCode/resultMessage; see Error codes.",{"id":2012,"title":1909,"titles":2013,"content":2014,"level":579},"/api-reference/open-apis/payments/inquiry-refund#error-codes",[173],"resultStatusresultCoderesultMessageRecommended ActionFREFUND_NOT_EXISTRefund does not exist.Verify refundId/refundRequestId; treat as pending if refund is still in process.",{"id":2016,"title":1914,"titles":2017,"content":2018,"level":579},"/api-reference/open-apis/payments/inquiry-refund#related-links",[173],"my.getAuthCodetradePayapplyTokeninquiryPayment html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":179,"title":178,"titles":2020,"content":2021,"level":573},[],"Create wallet payment orders for cashier and agreement scenarios.",{"id":2023,"title":115,"titles":2024,"content":2025,"level":579},"/api-reference/open-apis/payments/pay#overview",[178],"POST /v1/payments/pay creates payment orders within the wallet. The endpoint supports three flows: Cashier payment (standard commerce) – redirect the Mini Program to the wallet cashier where users approve each payment.Agreement payment (auto-debit) – reuse a previously signed agreement (paymentAuthCode) to charge the user without presenting the cashier.Escrow payment – funds are held securely in escrow until the merchant accepts and fulfills the order, protecting both buyer and seller. All monetary amounts in requests and responses must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000. A payment which takes place at wallets. The merchant/partner initiates a payment request to wallet through this interface, and the wallet will handle different payment scenarios based on the parameters in the request.",{"id":2027,"title":1885,"titles":2028,"content":2029,"level":579},"/api-reference/open-apis/payments/pay#endpoint",[178],"MethodPathPOST/v1/payments/pay",{"id":2031,"title":1890,"titles":2032,"content":1892,"level":579},"/api-reference/open-apis/payments/pay#api-structure",[178],{"id":2034,"title":2035,"titles":2036,"content":2037,"level":590},"/api-reference/open-apis/payments/pay#shared-request-fields","Shared Request Fields",[178,1890],"FieldTypeRequiredDescriptionproductCodestringYesDefined by wallets. The wallet uses the productCode to get the contract configuration which includes fee, limitation information, and so on. Max. length: 32 characters.Examples:• Online Purchase: \"51051000101000000011\"• Online Purchase (Auth Capture): \"51051000101000000012\"• Agreement Payment: \"51051000101000100031\"• Escrow Payment: \"51051000101000100008\"paymentRequestIdstringYesThe unique ID of a payment generated by merchants.• Max. length: 64 characters.• This field is used for idempotence control. For the payment requests which are initiated with the same paymentRequestId and reach a final status (S or F), the wallet must return the unique result.paymentAuthCodestringNo*The payment auth code generated by the wallet, such as the accessToken in the agreement pay scenario. Max. length: 128 characters.*Required for Agreement Payment scenario only.paymentAmountobjectYesThe order amount, displaying users' consumption records, payment results page.Note: The monetary unit of value is fils, e.g. if the price is 100 IQD, then the paymentAmount.value should be \"100000\".paymentAmount.currencystringYesCurrency code (e.g., \"IQD\").paymentAmount.valuestringYesAmount value in smallest currency unit (fils).orderobjectYesThe purchase order details, such as Merchant, Buyer, Goods, etc. The information in the Order is only used to display user's payment result page and transactions history, regulation reporting, etc. It will not make use of the amount in the order for fund operation.Note: The buyer field is optional only in the Agreement Payment scenario.order.orderDescriptionstringYesDescription of the order.order.buyerobjectNo*Buyer information.*Optional in Agreement Payment, required in Cashier Payment.order.buyer.referenceBuyerIdstringYesThe unique userId, which can be the customerId obtained from accessToken information in applyToken API. It must not be default.️ Important: Please make sure the buyer and the payer is the same person.paymentExpiryTimestring/datetimeNoThe payment order close time defined by merchant, which means the payment order will be closed automatically after paymentExpiryTime. If empty, the expiryTime will be defined by E-wallet. It follows the ISO 8601 standard.paymentRedirectUrlstringNoThe redirect URL defined by merchants. Max. length: 1024 characters.paymentNotifyUrlstringNoThe payment success notification URL defined by merchants. Max. length: 1024 characters.voidNotifyUrlstringNoThe url that void notification will be sent to. Max. length: 1024 characters.extendInfostringNoThe extensive information. The wallet and merchant can put extensive information in this property. The format should be JSON format. Max. length: 2048 characters. Ensure referenceBuyerId in order.buyer matches the customerId retrieved from applyToken.",{"id":2039,"title":123,"titles":2040,"content":2041,"level":590},"/api-reference/open-apis/payments/pay#cashier-payment",[178,1890],"In this mode the merchant redirects the user to the wallet cashier embedded in the Mini Program.",{"id":2043,"title":2044,"titles":2045,"content":2046,"level":739},"/api-reference/open-apis/payments/pay#flow-overview","Flow Overview",[178,1890,123],"For example, a user purchases a 100 IQD good at the merchant/partner (online merchant usually), the merchant/partner calls this API to create the payment order first, the wallet will return the payment order ID and wallet cashier page URL to the merchant/partner, then merchant/partner can redirect user to wallet cashier page with the my.tradePay API. To view the end-to-end diagram, see the Cashier Payment flow.",{"id":2048,"title":2049,"titles":2050,"content":2051,"level":739},"/api-reference/open-apis/payments/pay#cashier-payment-request-additional-fields","Cashier Payment Request Additional Fields",[178,1890,123],"FieldTypeRequiredDescriptionpaymentRedirectUrlstringNoMerchant URL displayed when the user finishes or cancels the payment. Max 1024 characters.order.buyerobjectYesRequired for cashier payment.",{"id":2053,"title":2054,"titles":2055,"content":2056,"level":739},"/api-reference/open-apis/payments/pay#sample-cashier-payment-request","Sample Cashier Payment Request",[178,1890,123],"{\n  \"productCode\": \"51051000101000000011\",\n  \"paymentRequestId\": \"UDQzzvxwvyvUDxGqhMHUlIBpGkydOQC6\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"order_description\",\n    \"buyer\": {\n      \"referenceBuyerId\": \"216610000000003660xxxx\"\n    }\n  },\n  \"paymentExpiryTime\": \"2024-01-18T16:10:36+03:00\",\n  \"paymentNotifyUrl\": \"https://www.merchant.com/paymentNotifyxxxx\"\n}",{"id":2058,"title":2059,"titles":2060,"content":2061,"level":739},"/api-reference/open-apis/payments/pay#key-points-for-cashier-payment","Key Points for Cashier Payment",[178,1890,123],"paymentRequestId is generated by the merchant/partner, which uniquely identifies the payment. Wallet must make use of paymentRequestId for idempotent control. For example, if a payment with paymentRequestId=2023112719074101000700000077771 has been processed successfully by Wallet, when the merchant/partner uses the same paymentRequestId for payment, Wallet will respond with successful payment.productCode is the product code. The wallet uses the productCode to get the contract configuration which includes fee, limitation information, and so on.paymentNotifyUrl is the URL defined by the merchant/partner. In the cashier payment scenario, after the user finished payment in the wallet cashier page, the wallet will notify the merchant of the payment result based on this URL.paymentAmount describes the amount of 100 IQD to be collected by Wallet from user's account for this payment.order describes the order details of the purchase of the 100 IQD merchandise by the user at the merchant. Such as Merchant, Buyer, Goods, etc are included in order. The information in the Order is only used to display user's payment result page and transactions history, regulation reporting, etc.referenceBuyerId is the unique userID, which can be the customerId obtained from accessToken information in applyToken API. It must not be default. Please make sure the buyer and the payer is the same person.paymentExpiryTime is the payment order close time defined by merchant, which means the payment order will be closed automatically after paymentExpiryTime. If empty, the expiryTime will be defined by E-wallet.",{"id":2063,"title":2064,"titles":2065,"content":1519,"level":739},"/api-reference/open-apis/payments/pay#sample-cashier-payment-response","Sample Cashier Payment Response",[178,1890,123],{"id":2067,"title":2068,"titles":2069,"content":2070,"level":739},"/api-reference/open-apis/payments/pay#response-field-details","Response Field Details",[178,1890,123],"result.resultStatus == A shows that the payment is accept success. After user finish payment in cashier page, payment will change to success.paymentId is generated by Wallet, uniquely identifies the payment.redirectActionForm returns the cashier page URL to the merchant/partner. After the merchant/partner receives the accept result, which will be redirected to this URL.",{"id":2072,"title":133,"titles":2073,"content":2074,"level":590},"/api-reference/open-apis/payments/pay#agreement-payment",[178,1890],"Agreement payments charge the user using an existing contract established via qicardSignContract.",{"id":2076,"title":2044,"titles":2077,"content":2078,"level":739},"/api-reference/open-apis/payments/pay#flow-overview-1",[178,1890,133],"For example, a user authorizes an AgreementPay contract at the merchant/partner (online merchant usually), such as monthly subscription, the merchant/partner can call this API to automatically deduct money from the user's wallet without user's operation. To view the end-to-end diagram, see the Agreement Payment flow.",{"id":2080,"title":2081,"titles":2082,"content":2083,"level":739},"/api-reference/open-apis/payments/pay#agreement-payment-request-additional-fields","Agreement Payment Request Additional Fields",[178,1890,133],"FieldTypeRequiredDescriptionpaymentAuthCodestringYesAuthorization token obtained during agreement signing (e.g., from qicardSignContract + applyToken). Max 128 characters. This was generated by the wallet as the accessToken in the agreement pay scenario.order.buyer.referenceBuyerIdstringNoOptional in agreement payment, but if provided must match the customerId associated with the agreement. Other fields (such as paymentRedirectUrl) are optional and often unused because no cashier is displayed. Ensure the payer represented by referenceBuyerId matches the user who signed the agreement; mismatches are rejected.",{"id":2085,"title":2086,"titles":2087,"content":2088,"level":739},"/api-reference/open-apis/payments/pay#sample-agreement-payment-request","Sample Agreement Payment Request",[178,1890,133],"{\n  \"productCode\": \"51051000101000100031\",\n  \"paymentRequestId\": \"UDQzzvxwvyvUDxGqhMHUlIBpGKydOQC6\",\n  \"paymentAuthCode\": \"0000000002202310013fQ6vpiUNV79nT00006725\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"order_description\"\n  },\n  \"paymentExpiryTime\": \"2024-01-18T16:10:36+03:00\",\n  \"paymentNotifyUrl\": \"https://www.merchant.com/paymentNotifyxxxx\"\n}",{"id":2090,"title":2091,"titles":2092,"content":2093,"level":739},"/api-reference/open-apis/payments/pay#key-points-for-agreement-payment","Key Points for Agreement Payment",[178,1890,133],"paymentRequestId is generated by the merchant/partner, which uniquely identifies the payment. Wallet must make use of paymentRequestId for idempotent control. For example, if a payment with paymentRequestId=2023112719074101000700000077771 has been processed successfully by Wallet, when the merchant/partner uses the same paymentRequestId for payment, Wallet will respond with successful payment.productCode is the product code. The wallet uses the productCode to get the contract configuration which includes fee, limitation information, and so on.paymentNotifyUrl is the URL defined by the merchant/partner. In the cashier payment scenario, after the user finished payment in the wallet cashier page, the wallet will notify the merchant of the payment result based on this URL.paymentAmount describes the amount of 100 IQD to be collected by Wallet from user's account for this payment.order describes the order details of the purchase of the 100 IQD merchandise by the user at the merchant. Such as Merchant, Buyer, Goods, etc are included in order. The information in the Order is only used to display user's payment result page and transactions history, regulation reporting, etc.paymentAuthCode was generated by the wallet as the accessToken in the agreement pay scenario.paymentExpiryTime is the payment order close time defined by merchant, which means the payment order will expire automatically after paymentExpiryTime. If empty, the expiryTime will be defined by E-wallet.",{"id":2095,"title":2096,"titles":2097,"content":2098,"level":739},"/api-reference/open-apis/payments/pay#sample-agreement-payment-response","Sample Agreement Payment Response",[178,1890,133],"Agreement payments usually complete synchronously. The wallet returns the payment result without a redirect form. {\n  \"result\": {\n    \"resultStatus\": \"S\",\n    \"resultCode\": \"SUCCESS\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"paymentId\": \"2023103011121280010016679410005274x\",\n  \"paymentTime\": \"2023-10-30T09:17:13+03:00\"\n}",{"id":2100,"title":2068,"titles":2101,"content":2102,"level":739},"/api-reference/open-apis/payments/pay#response-field-details-1",[178,1890,133],"result.resultStatus == S shows that the payment is success.paymentId is generated by Wallet, uniquely identifies the payment.paymentTime is generated by Wallet, it shows the payment finish time.",{"id":2104,"title":138,"titles":2105,"content":2106,"level":590},"/api-reference/open-apis/payments/pay#escrow-payment",[178,1890],"Escrow payments hold funds securely until the merchant accepts and fulfills the order, protecting both buyer and seller. The buyer pays upfront, but funds remain in escrow until the merchant completes delivery and the buyer confirms receipt.",{"id":2108,"title":2044,"titles":2109,"content":2110,"level":739},"/api-reference/open-apis/payments/pay#flow-overview-2",[178,1890,138],"For example, a user purchases a 100 IQD product from a merchant. The merchant creates an escrow payment, and the user completes payment through the cashier. The funds are held in escrow until the merchant accepts the order, ships the product, and the customer confirms receipt. To view the complete escrow flow, see the escrow payment APIs: merchantAccept, confirmOrder, cancelPayment, and voidPayment.",{"id":2112,"title":2113,"titles":2114,"content":2115,"level":739},"/api-reference/open-apis/payments/pay#escrow-payment-request-additional-fields","Escrow Payment Request Additional Fields",[178,1890,138],"FieldTypeRequiredDescriptionproductCodestringYesMust be \"51051000101000100008\" for escrow payments.paymentRedirectUrlstringNoMerchant URL displayed when the user finishes or cancels the payment. Max 1024 characters.order.buyerobjectYesRequired for escrow payment.paymentExpiryTimestringNoPayment expiry time. If not provided, wallet defines the expiry time.",{"id":2117,"title":2118,"titles":2119,"content":2120,"level":739},"/api-reference/open-apis/payments/pay#sample-escrow-payment-request","Sample Escrow Payment Request",[178,1890,138],"{\n  \"productCode\": \"51051000101000100008\",\n  \"paymentRequestId\": \"ESCROW-PAY-550e8400-1702123456\",\n  \"paymentAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"order\": {\n    \"orderDescription\": \"Premium Cotton T-Shirt\",\n    \"buyer\": {\n      \"referenceBuyerId\": \"216610000000003660xxxx\"\n    }\n  },\n  \"paymentExpiryTime\": \"2024-01-18T16:10:36+03:00\",\n  \"paymentRedirectUrl\": \"http://merchant.com/order-tracking\",\n  \"paymentNotifyUrl\": \"https://www.merchant.com/paymentNotifyxxxx\"\n}",{"id":2122,"title":2123,"titles":2124,"content":2125,"level":739},"/api-reference/open-apis/payments/pay#key-points-for-escrow-payment","Key Points for Escrow Payment",[178,1890,138],"productCode must be \"51051000101000100008\" for escrow payments.After payment, funds are held in escrow.Merchant must call merchantAccept to accept the order.After fulfillment, customer calls confirmOrder to release funds.Merchant can cancel before acceptance using cancelPayment.After acceptance, merchant can use voidPayment to void if fulfillment cannot be completed.",{"id":2127,"title":2128,"titles":2129,"content":1519,"level":739},"/api-reference/open-apis/payments/pay#sample-escrow-payment-response","Sample Escrow Payment Response",[178,1890,138],{"id":2131,"title":1700,"titles":2132,"content":2133,"level":739},"/api-reference/open-apis/payments/pay#alternative-flows",[178,1890,138],"Early Cancellation: Merchant can call cancelPayment if they cannot fulfill before acceptingVoid After Acceptance: Merchant can call voidPayment if fulfillment cannot be completed after acceptanceFulfillment Issues: Merchant can call voidPayment if goods cannot be deliveredPost-Completion Refund: After completion, merchant can issue refund if needed",{"id":2135,"title":1517,"titles":2136,"content":2137,"level":590},"/api-reference/open-apis/payments/pay#response",[178,1890],"FieldTypeRequiredDescriptionresultobjectYesThe request result, which contains information related to the request result, such as status and error codes.result.resultCodestringYesResult code (e.g., \"SUCCESS\", \"ACCEPT\", \"UNKNOWN_EXCEPTION\").result.resultStatusstringYesResult status: S (Success), A (Accepted), U (Unknown), F (Failed).result.resultMessagestringYesResult message description.paymentIdstringNoThe unique ID of a payment generated by Wallet. Max. length: 64 characters. Present when payment is accepted or successful.paymentTimestring/datetimeNoPayment success time, which follows the ISO 8601 standard. Present when resultStatus is S.redirectActionFormobjectNoIndicates a redirect URL for cashier payment. Present when resultStatus is A.redirectActionForm.redirectionUrlstringNoThe wallet cashier page URL.",{"id":2139,"title":1904,"titles":2140,"content":2141,"level":590},"/api-reference/open-apis/payments/pay#result-processing-logic",[178,1890],"In the response, the result.resultStatus field indicates the result of processing a request as follows: resultStatusDescriptionSSuccess – The corresponding result.resultCode is \"SUCCESS\" and the result.resultMessage is \"Success.\". That means that this transaction is successful. The merchant/partner can update transaction to success.AAccepted – The corresponding result.resultCode is \"ACCEPT\", and the result.resultMessage varies based on different situations. That means that the transaction is already accepted by wallets. The merchant/partner needs to continue the next operation according to the redirectActionForm response, such as display the order code to users or redirect to the wallet cashier page.UUnknown – The corresponding result.resultCode is \"UNKNOWN_EXCEPTION\" and result.resultMessage is \"An API calling is failed, which is caused by unknown reasons.\". For details, see the Common error codes section.That means that unknown exception occurs on the wallet side. The merchant/partner can inquiry the payment result or wait for the payment status notification to get the real payment result. What needs to do is:• Payment evaluation scenario can not be inquired.• U status can not set to fail or success on the merchant/partner system.• U status can not refund to users by offline (Maybe will make fund loss).FFailed – That means this transaction is failed. The corresponding result.resultCode and result.resultMessage vary based on different situations. For details, see the following Error codes section.Usually the F transactions can not be successful again if use the same payment request to call wallets.",{"id":2143,"title":2144,"titles":2145,"content":2146,"level":739},"/api-reference/open-apis/payments/pay#result-status-reference","Result Status Reference",[178,1890,1904],"resultStatusMeaningMerchant ActionSPayment succeeded.Mark order as paid; expect notification at paymentNotifyUrl.AAccepted; further action required (cashier flow).Redirect user using redirectActionForm.UUnknown exception.Retry later or wait for notifications; do not duplicate charges immediately.FFailed.Inspect resultCode and decide whether to retry or alert the user.",{"id":2148,"title":1909,"titles":2149,"content":2150,"level":579},"/api-reference/open-apis/payments/pay#error-codes",[178],"Error codes are usually classified into the following categories: Common error codes: are common for all Mini Program OpenAPIs.API-specific error codes: are listed in the following table. resultStatusresultCoderesultMessageUPAYMENT_IN_PROCESSThe payment is still under process.FREPEAT_REQ_INCONSISTENTRepeated submission, and requests are inconsistent.FPAYMENT_AMOUNT_EXCEED_LIMITPayment amount exceeds limit.FUSER_NOT_EXISTThe user does not exist.FUSER_STATUS_ABNORMALThe user status is abnormal.FUSER_BALANCE_NOT_ENOUGHThe user balance is not enough for this payment.FPARTNER_NOT_EXISTThe partner does not exist.FPARTNER_STATUS_ABNORMALThe partner status is abnormal.FRISK_REJECTRisk reject.FCURRENCY_NOT_SUPPORTThe currency is not supported.FORDER_STATUS_INVALIDOrder is in invalid status such closed.FINVALID_ACCESS_TOKENInvalid accesstoken.FUSER_AMOUNT_EXCEED_LIMITPayment amount exceeds user's amount limit.FAUTH_CODE_ALREADY_USEDAuth code already used.FINVALID_CODEAuth code illegal.",{"id":2152,"title":1914,"titles":2153,"content":2154,"level":579},"/api-reference/open-apis/payments/pay#related-links",[178],"my.getAuthCodetradePayapplyTokenqicardSignContractmerchantAccept (Escrow)confirmOrder (Escrow)cancelPayment (Escrow)voidPayment (Escrow) html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":183,"title":182,"titles":2156,"content":2157,"level":573},[],"Initiate wallet refunds for previously completed payments.",{"id":2159,"title":115,"titles":2160,"content":2161,"level":579},"/api-reference/open-apis/payments/refund#overview",[182],"POST /v1/payments/refund deducts funds from the merchant and returns them to the user for a successful payment. Partial or full refunds are supported, and multiple refund requests can be made against a single payment as long as the cumulative amount does not exceed the original payment value. All monetary amounts must be provided in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000. Submit refunds after confirming the underlying payment reached a final success state.Poll /v1/payments/inquiryRefund if the refund status remains REFUND_IN_PROCESS after submission.For escrow payments: Use cancelPayment before merchant accepts, or voidPayment after acceptance. Use refund only after order completion or void. Mini Program obtains authorization via my.getAuthCode.Wallet app service validates the authorization with the wallet backend.Wallet backend issues an authCode.Wallet app service returns the authCode to the Mini Program.Mini Program forwards the authCode to the merchant backend.Merchant backend exchanges the authCode for tokens using applyToken.Wallet backend returns token information (accessToken, refreshToken, customerId) to the merchant backend.Mini Program creates the original payment order with customerId.Merchant backend initiates payment via /v1/payments/pay.Wallet backend responds with cashier details (including redirectionUrl).Merchant backend sends payment details to the Mini Program.Mini Program calls my.tradePay to launch the cashier.Wallet app service displays the cashier UI with order info.Wallet app service shows the order page to the user.User confirms the payment.Wallet app service executes the payment.Wallet backend processes the payment and returns the result to the wallet app service.Mini Program receives the payment result.Wallet backend notifies the merchant backend via paymentNotifyUrl.Wallet backend notifies the user via SMS/email/inbox.User or merchant initiates a full or partial refund request.Mini Program submits the refund request to the merchant backend.Merchant backend calls /v1/payments/refund.Wallet backend returns the refund result to the merchant backend.Wallet backend returns the refund result to the Mini Program.Mini Program displays the refund status to the user.If refund status is REFUND_IN_PROCESS, merchant backend polls /v1/payments/inquiryRefund.Wallet backend responds with the latest refund inquiry result.",{"id":2163,"title":1885,"titles":2164,"content":2165,"level":579},"/api-reference/open-apis/payments/refund#endpoint",[182],"MethodPathPOST/v1/payments/refund",{"id":2167,"title":1890,"titles":2168,"content":1892,"level":579},"/api-reference/open-apis/payments/refund#api-structure",[182],{"id":2170,"title":1895,"titles":2171,"content":2172,"level":590},"/api-reference/open-apis/payments/refund#request",[182,1890],"FieldTypeRequiredDescriptionExamplerefundRequestIdstringYesMerchant-generated refund ID (max 64 characters). Used for idempotence—repeat submissions with the same ID yield the same final result.\"202311271907410100070000008881xxxx\"paymentIdstringConditionalWallet payment ID associated with the refund. Provide either paymentId, paymentRequestId, or captureId.\"202312061112128001001660090000xxxx\"paymentRequestIdstringConditionalMerchant payment ID associated with the refund.\"20230101234567890133333xxxx\"captureIdstringConditionalWallet capture ID (used in capture flows).\"202311271907410100070000007777xxxx\"refundAmountobjectYesRefund amount object. value must not exceed the remaining refundable amount.{ \"currency\": \"IQD\", \"value\": \"100000\" }refundReasonstringNoDescription of why the refund is issued (max 256 characters).\"Returned goods to merchant\"extendInfostringNoAdditional metadata in JSON format (max 2048 characters).\"extendInfo\": \"additional information\" {\n  \"refundRequestId\": \"202311271907410100070000008881xxxx\",\n  \"paymentId\": \"202312061112128001001660090000xxxx\",\n  \"refundAmount\": {\n    \"currency\": \"IQD\",\n    \"value\": \"100000\"\n  },\n  \"refundReason\": \"Customer requested cancellation.\"\n} At least one of paymentId, paymentRequestId, or captureId must be provided. If multiple are supplied, the wallet prioritizes paymentId, then paymentRequestId, then captureId.",{"id":2174,"title":1517,"titles":2175,"content":2176,"level":590},"/api-reference/open-apis/payments/refund#response",[182,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesOutcome metadata including resultCode, resultStatus, and resultMessage.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"Success.\" }refundIdstringConditionalWallet-generated refund ID. Present when resultStatus is S.\"202312061112128013001660090000xxxx\"refundTimestringConditionalISO 8601 timestamp indicating when funds were deducted from the merchant (returned when resultStatus is S).\"2023-11-27T12:01:01+08:30\" {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"refundId\": \"202312061112128013001660090000xxxx\",\n  \"refundTime\": \"2023-11-27T12:01:01+08:30\"\n}",{"id":2178,"title":1904,"titles":2179,"content":2180,"level":590},"/api-reference/open-apis/payments/refund#result-processing-logic",[182,1890],"StatusDescriptionSRefund succeeded—funds deducted from merchant; await user settlement.URefund request encountered an unknown exception. Do not retry immediately; use /v1/payments/inquiryRefund to check status.FRefund failed. Review resultCode and resultMessage; see Error codes. Common reasons include exceeding refund window or amount.",{"id":2182,"title":1909,"titles":2183,"content":2184,"level":579},"/api-reference/open-apis/payments/refund#error-codes",[182],"resultStatusresultCoderesultMessageRecommended ActionUREFUND_IN_PROCESSRefund is under processing.Poll /v1/payments/inquiryRefund.FMULTI_REFUND_NOT_ALLOWEDMultiple refund not allowed in agreement.Verify agreement rules; issue a single refund.FREFUND_NOT_ALLOWEDRefund not allowed in agreement.Check agreement configuration.FREPEAT_REQ_INCONSISTENTData inconsistent with prior request.Ensure idempotent parameters match original submission.FPARTNER_STATUS_ABNORMALMerchant status abnormal.Resolve merchant account issues before retrying.FORDER_NOT_EXISTThe order does not exist.Confirm payment identifiers.FORDER_STATUS_INVALIDOrder has invalid status (e.g., closed).Verify payment lifecycle.FREFUND_WINDOW_EXCEEDExceeded allowable refund window.Decline refund or seek manual intervention.FREFUND_AMOUNT_EXCEEDRequested refund exceeds payment amount.Adjust to remaining refundable amount.FPARTNER_BALANCE_NOT_ENOUGHMerchant balance insufficient.Top up merchant account before retrying.FCURRENCY_NOT_SUPPORTCurrency not supported.Use supported currency (e.g., IQD).FUSER_NOT_EXISTUser identifier invalid.Verify user account.FUSER_STATUS_ABNORMALUser account status abnormal.Resolve user status before retrying.",{"id":2186,"title":1914,"titles":2187,"content":2188,"level":579},"/api-reference/open-apis/payments/refund#related-links",[182],"payinquiryRefundinquiryPaymentapplyTokencancelPayment (Escrow - before acceptance)voidPayment (Escrow - after acceptance) html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":188,"title":187,"titles":2190,"content":2191,"level":573},[],"Merchant accepts an escrow payment to begin order fulfillment.",{"id":2193,"title":115,"titles":2194,"content":2195,"level":579},"/api-reference/open-apis/payments/merchant-accept#overview",[187],"POST /v1/payments/merchantAccept is used in escrow payment scenarios. After the mini-app merchant reviews the customer's order and verifies that the items are in stock and everything is fine (conditions are satisfied, etc.), the merchant may call this OpenAPI to accept the order. All monetary amounts in requests and responses must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000. Only payments with escrow product code (51051000101000100008) can use this API.The payment must be successfully completed before the merchant can accept.Once accepted, the merchant is committed to fulfilling the order. The Mini Program calls this my.getAuthCode JSAPI with specific scopes(USER_ID) to request an authorization code.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-Wallet backend returns accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.The merchant backend returns customerId to mini program.The Mini Program creates an order with customerId.The merchant backend calls the payment API to initiate payment flow, including customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.The E-Wallet backend returns payment detail information the merchant backend, such as redirectionUrl.The merchant backend passes the payment detail information to the Mini Program.The Mini Program calls the my.tradePay JSAPI with redirectionUrl to conduct the payment.The E-Wallet App Service displays the cashier page with order information, such as amount, order details, etc.The user confirms the payment in the cashier page.The E-Wallet App Service calls payment service and execute the payment process.When the payment reaches the final status, the E-wallet backend returns the payment result to the Mini Program (Step 19).The E-Wallet App Service returns the payment result to mini program.Also the E-wallet backend notifies the merchant backend of the payment result with paymentNotifyUrl provided in Step 10.Finally, E-wallet backend notifies the user of the payment result via SMS/Email/Inbox message.Merchant backend calls the merchantAccept API to accept this order.The E-Wallet backend returns the merchantAccept result to the merchant backend.",{"id":2197,"title":1885,"titles":2198,"content":2199,"level":579},"/api-reference/open-apis/payments/merchant-accept#endpoint",[187],"MethodPathPOST/v1/payments/merchantAccept",{"id":2201,"title":1890,"titles":2202,"content":1892,"level":579},"/api-reference/open-apis/payments/merchant-accept#api-structure",[187],{"id":2204,"title":1895,"titles":2205,"content":2206,"level":590},"/api-reference/open-apis/payments/merchant-accept#request",[187,1890],"FieldTypeRequiredDescriptionExamplepaymentIdstringYesThe unique ID that is assigned by the wallet to identify a payment. Max. length: 64 characters.\"202312061112128001016\"",{"id":2208,"title":2209,"titles":2210,"content":2211,"level":739},"/api-reference/open-apis/payments/merchant-accept#sample-request","Sample Request",[187,1890,1895],"{\n  \"paymentId\": \"2024071911121280010016601720002644\"\n}",{"id":2213,"title":1517,"titles":2214,"content":2215,"level":590},"/api-reference/open-apis/payments/merchant-accept#response",[187,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesThe request result, which contains information such as result status and error codes.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"Success.\" }",{"id":2217,"title":2218,"titles":2219,"content":2220,"level":739},"/api-reference/open-apis/payments/merchant-accept#sample-response","Sample Response",[187,1890,1517],"{\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  }\n}",{"id":2222,"title":2223,"titles":2224,"content":2225,"level":579},"/api-reference/open-apis/payments/merchant-accept#result-process-logic","Result Process Logic",[187],"In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status: resultStatusDescriptionSIt means that the merchant accept is successful. The corresponding result.resultCode is \"SUCCESS\", and the result.resultMessage is \"Success.\".UIt means that the status of the merchant accept result is unknown. The corresponding result.resultCode is UNKNOWN_EXCEPTION, and result.resultMessage is \"An API calling is failed, which is caused by unknown reasons\". For details, see the Common error codes section.FIt means that the merchant accept fails. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the Error codes section.",{"id":2227,"title":1909,"titles":2228,"content":2229,"level":579},"/api-reference/open-apis/payments/merchant-accept#error-codes",[187],"Error codes are usually classified into the following categories: Common error codes are common across all mini program's APIs.API-specific error codes are listed in the following table. resultStatusresultCoderesultMessageFORDER_UNSUPPORTED_OPERATIONThe order not supported the operation.FORDER_STATUS_INVALIDThe order status is invalid.FORDER_NOT_EXISTThe order does not exist.FORDER_IS_FROZENThe order is frozen.FORDER_IS_MERCHANT_ACCEPTEDThe order has been accepted by merchant.FCURRENCY_NOT_SUPPORTThe currency of a user's payment is not supported by the merchant.FUSER_NOT_EXISTThe user does not exist.FUSER_STATUS_ABNORMALThe user status is abnormal.FPARTNER_NOT_EXISTThe partner does not exist.FPARTNER_STATUS_ABNORMALThe partner status is abnormal.",{"id":2231,"title":1914,"titles":2232,"content":2233,"level":579},"/api-reference/open-apis/payments/merchant-accept#related-links",[187],"pay (Use product code 51051000101000100008 for escrow)confirmcancelvoid html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":193,"title":192,"titles":2235,"content":2236,"level":573},[],"Customer confirms receipt of goods to release escrow funds to merchant.",{"id":2238,"title":115,"titles":2239,"content":2240,"level":579},"/api-reference/open-apis/payments/confirm-order#overview",[192],"POST /v1/payments/confirm is used to capture the total authorized payment amount from a user's account, and then transfer the total amount of the payment to a merchant's account after the user confirms receipt. The confirm can only be initiated once and in full. Note: The merchant may call the confirm API to notify A+ that the order has been confirmed only after the customer has actually completed the order confirmation. All monetary amounts in requests and responses must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000. Only payments with escrow product code (51051000101000100008) can use this API.The merchant must have already accepted the payment using merchantAccept before the customer can confirm.Once confirmed, funds are immediately released to the merchant and cannot be reversed.Customers should only confirm after verifying the goods are satisfactory. The Mini Program calls this my.getAuthCode JSAPI with specific scopes(USER_ID) to request an authorization code.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-Wallet backend returns accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.The merchant backend returns customerId to mini program.The Mini Program creates an order with customerId.The merchant backend calls the payment API to initiate payment flow, including customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.The E-Wallet backend returns payment detail information the merchant backend, such as redirectionUrl.The merchant backend passes the payment detail information to the Mini Program.The Mini Program calls the my.tradePay JSAPI with redirectionUrl to conduct the payment.The E-Wallet App Service displays the cashier page with order information, such as amount, order details, etc.The user confirms the payment in the cashier page.The E-Wallet App Service calls payment service and execute the payment process.When the payment reaches the final status, the E-wallet backend returns the payment result to the Mini Program (Step 19).The E-Wallet App Service returns the payment result to mini program.Also the E-wallet backend notifies the merchant backend of the payment result with paymentNotifyUrl provided in Step 10.Finally, E-wallet backend notifies the user of the payment result via SMS/Email/Inbox message.Merchant backend calls the merchantAccept API to accept this order.The E-Wallet backend returns the merchantAccept result to the merchant backend.The Mini Program sends the confirm request to merchant backend, and the merchant backend calls the confirm API to capture the money(Step 25).(This step is internal - see step 25)Send confirm request via /v1/payments/confirm.The E-Wallet backend returns the confirm result to the merchant backend.The merchant backend returns confirm result.And the Mini Program displays the confirm result to the user(Step 28). Alternative flow:\nWhen the E-Wallet backend returns the resultCode as CONFIRM_IN_PROCESS, the merchant can call inquiryPayment API to query confirm result (Step 29).",{"id":2242,"title":1885,"titles":2243,"content":2244,"level":579},"/api-reference/open-apis/payments/confirm-order#endpoint",[192],"MethodPathPOST/v1/payments/confirm",{"id":2246,"title":1890,"titles":2247,"content":1892,"level":579},"/api-reference/open-apis/payments/confirm-order#api-structure",[192],{"id":2249,"title":1895,"titles":2250,"content":2251,"level":590},"/api-reference/open-apis/payments/confirm-order#request",[192,1890],"FieldTypeRequiredDescriptionExamplepaymentIdstringYesThe unique ID that is assigned by the wallet to identify a payment. Max. length: 64 characters.\"202312061112128001016\"confirmRequestIdstringYesThe unique ID is assigned by a merchant to identify a confirm request. Max. length: 64 characters.\"1022188000000000001xxxx\"extendInfostringNoThe extension information that wallets and merchants want to describe. The format should be JSON format. Max. length: 2048 characters.-",{"id":2253,"title":2209,"titles":2254,"content":2255,"level":739},"/api-reference/open-apis/payments/confirm-order#sample-request",[192,1890,1895],"{\n  \"paymentId\": \"202312061112128001001660090000xxxx\",\n  \"confirmRequestId\": \"1022188000000000001xxxx\"\n} The confirmRequestId is used for idempotence—repeat submissions with the same ID will yield the same final result.",{"id":2257,"title":1517,"titles":2258,"content":2259,"level":590},"/api-reference/open-apis/payments/confirm-order#response",[192,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesThe request result, which contains information such as result status and error codes.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"Success.\" }confirmIdstringNoThe unique ID for a confirm request generated by the wallet. Max. length: 64 characters.\"202312061112128001016x\"confirmTimestringNoThe processing time for a confirm request. The format of the value follows the ISO 8601 standard.\"2025-07-08T12:12:12+08:00\"",{"id":2261,"title":2218,"titles":2262,"content":2263,"level":739},"/api-reference/open-apis/payments/confirm-order#sample-response",[192,1890,1517],"{\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"confirmId\": \"202312061112128001016x\",\n  \"confirmTime\": \"2025-07-08T12:12:12+08:00\"\n}",{"id":2265,"title":2223,"titles":2266,"content":2267,"level":579},"/api-reference/open-apis/payments/confirm-order#result-process-logic",[192],"In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status: resultStatusDescriptionSIt means that the confirm is successful. The corresponding result.resultCode is \"SUCCESS\", and the result.resultMessage is \"Success.\".UIt means that the status of the confirm result is unknown. The corresponding result.resultCode is UNKNOWN_EXCEPTION, and result.resultMessage is \"An API calling is failed, which is caused by unknown reasons\". For details, see the Common error codes section.FIt means that the confirm fails. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the Error codes section.",{"id":2269,"title":1909,"titles":2270,"content":2271,"level":579},"/api-reference/open-apis/payments/confirm-order#error-codes",[192],"Error codes are usually classified into the following categories: Common error codes are common across all mini program's APIs.API-specific error codes are listed in the following table. resultStatusresultCoderesultMessageFORDER_UNSUPPORTED_OPERATIONThe order is not support capture.FORDER_STATUS_INVALIDThe order status is invalid.FORDER_NOT_EXISTThe order does not exist.UCONFIRM_IN_PROCESSThe confirm is processing.FCURRENCY_NOT_SUPPORTThe currency of a user's payment is not supported by the merchant.FUSER_NOT_EXISTThe user does not exist.FUSER_STATUS_ABNORMALThe user status is abnormal.FREPEAT_REQ_INCONSISTENTThe submitted request is not consistent with the repeated one.FMUTEX_OPERATION_IN_PROCESSINGThere is another payment void, confirm, or capture in processing.FPARTNER_NOT_EXISTThe partner does not exist.FPARTNER_STATUS_ABNORMALThe partner status is abnormal.",{"id":2273,"title":1914,"titles":2274,"content":2275,"level":579},"/api-reference/open-apis/payments/confirm-order#related-links",[192],"pay (Use product code 51051000101000100008 for escrow)merchantAcceptvoidinquiryPayment html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":198,"title":197,"titles":2277,"content":2278,"level":573},[],"Cancel a payment when the payment result has not been returned or merchant decides not to accept.",{"id":2280,"title":115,"titles":2281,"content":2282,"level":579},"/api-reference/open-apis/payments/cancel-payment#overview",[197],"POST /v1/payments/cancel is used to cancel a payment when the payment result has not been returned for an extended period, or when the merchant, after reviewing the customer's order, decides not to accept it. Upon successful invocation of the cancel API, the full amount paid by the customer will be returned. To cancel a payment, you need to provide one of the following parameters: paymentId: The original payment ID of the payment request to be canceled. It is generated by Alipay when a merchant initiates the original payment.paymentRequestId: The original paymentRequestId of the payment request to be canceled. All monetary amounts in requests and responses must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000. Note: After merchant initiated capture, void, refund for a payment, it is not allowed to initiate a cancel. The Mini Program calls this my.getAuthCode JSAPI with scopes=USER_ID.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-Wallet backend returns accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.The merchant backend returns customerId to mini program.The Mini Program creates an order with customerId.The merchant backend calls the payment API to initiate payment flow, including customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.The E-Wallet backend returns payment detail information the merchant backend, such as redirectionUrl.The merchant backend passes the payment detail information to the Mini Program.The Mini Program calls the my.tradePay JSAPI with redirectionUrl to conduct the payment.The E-Wallet App Service displays the cashier page with order information, such as amount, order details, etc.The user confirms the payment in the cashier page.The E-Wallet App Service calls payment service and execute the payment process.When the payment reaches the final status, the E-wallet backend returns the payment result to the Mini Program (Step 19).The E-Wallet App Service returns the payment result to mini program.Send cancel request within T day via /v1/payments/cancel.The E-Wallet backend returns cancel result to the merchant backend.",{"id":2284,"title":1885,"titles":2285,"content":2286,"level":579},"/api-reference/open-apis/payments/cancel-payment#endpoint",[197],"MethodPathPOST/v1/payments/cancel",{"id":2288,"title":1890,"titles":2289,"content":1892,"level":579},"/api-reference/open-apis/payments/cancel-payment#api-structure",[197],{"id":2291,"title":1895,"titles":2292,"content":2293,"level":590},"/api-reference/open-apis/payments/cancel-payment#request",[197,1890],"FieldTypeRequiredDescriptionExamplepaymentIdstringNoThe unique ID that is assigned by the wallet to identify a payment. Max. length: 64 characters.\"202312061112128001001660x\"paymentRequestIdstringNoThe unique ID is assigned by a merchant to identify a payment request. Max. length: 64 characters.\"20231127190741010007000x\"extendInfostringNoThe extension information that wallets and merchants want to describe. The format should be JSON format. Max. length: 2048 characters.\"extendInfo: This is additional information\" At least one of paymentId or paymentRequestId must be provided.",{"id":2295,"title":2209,"titles":2296,"content":2297,"level":739},"/api-reference/open-apis/payments/cancel-payment#sample-request",[197,1890,1895],"{\n  \"paymentId\": \"202312061112128001001660090000xxxx\"\n}",{"id":2299,"title":1517,"titles":2300,"content":2301,"level":590},"/api-reference/open-apis/payments/cancel-payment#response",[197,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesThe request result, which contains information such as result status and error codes.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"Success.\" }paymentIdstringNoThe unique ID is assigned by the wallet to identify a payment. Max. length: 64 characters.\"202312061112128001001660x\"paymentRequestIdstringNoThe unique ID is assigned by a merchant to identify a payment request. Max. length: 64 characters.\"20231127190741010007000x\"cancelTimedatetimeNoThe actual time when the payment cancellation process is completed. This property is returned only when the cancellation succeeds. The value follows the ISO 8601 standard.\"2023-01-08T12:12:12+08:00\"",{"id":2303,"title":2218,"titles":2304,"content":2305,"level":739},"/api-reference/open-apis/payments/cancel-payment#sample-response",[197,1890,1517],"{\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"paymentId\": \"202312061112128001001660090000xxxx\",\n  \"paymentRequestId\": \"20231127190741010007000070000xxxx\",\n  \"cancelTime\": \"2023-01-08T12:12:12+08:00\"\n}",{"id":2307,"title":2223,"titles":2308,"content":2309,"level":579},"/api-reference/open-apis/payments/cancel-payment#result-process-logic",[197],"In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status: resultStatusDescriptionSIt means that the cancellation is successful. The corresponding result.resultCode is \"SUCCESS\", and the result.resultMessage is \"Success.\".UIt means that the status of the cancellation result is unknown. The corresponding result.resultCode is UNKNOWN_EXCEPTION, and result.resultMessage is \"An API calling is failed, which is caused by unknown reasons\". For details, see the Common error codes section.FIt means that the cancellation fails. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the Error codes section.",{"id":2311,"title":1909,"titles":2312,"content":2313,"level":579},"/api-reference/open-apis/payments/cancel-payment#error-codes",[197],"Error codes are usually classified into the following categories: Common error codes are common across all mini program's APIs.API-specific error codes are listed in the following table. resultStatusresultCoderesultMessageFORDER_STATUS_INVALIDThe order is in invalid status such as CLOSED.FORDER_HAS_BEEN_CAPTUREDThe cancellation does not support when the order has been captured.FORDER_HAS_BEEN_REFUNDEDThe cancellation does not support when the order has been refunded.FORDER_HAS_BEEN_VOIDEDThe cancellation does not support when the order has been voided.FCANCEL_NOT_ALLOWEDThe cancellation not allowed in agreement.FCANCEL_WINDOW_EXCEEDThe cancellation date is beyond the period that is agreed in the contract.FORDER_NOT_EXISTThe order does not exist.FKEY_NOT_FOUNDThe key is not found.FCLIENT_INVALIDThe client is invalid.FINVALID_SIGNATUREThe signature is invalid.FMETHOD_NOT_SUPPORTEDThe server does not implement the requested HTTP method.FMEDIA_TYPE_NOT_ACCEPTABLEThe server does not implement the media type that can be accepted by the client.FPARTNER_STATUS_ABNORMALThe partner status is abnormal.FPARTNER_BALANCE_NOT_ENOUGHThe partner balance is not enough.",{"id":2315,"title":2316,"titles":2317,"content":2318,"level":579},"/api-reference/open-apis/payments/cancel-payment#samples","Samples",[197],"The merchant can call this cancel API to cancel the payment transaction within T day under these circumstances and E-Wallet will not settle payment this transaction in T+N day either. when the merchant decides to provide a full refund before settlement.when the payment result does not return for a long time.when the merchant cannot fulfill the order before accepting it. For refunds after the money has been settled to the merchant, the merchant backend should call refund API instead.",{"id":2320,"title":1914,"titles":2321,"content":2322,"level":579},"/api-reference/open-apis/payments/cancel-payment#related-links",[197],"pay (Use product code 51051000101000100008 for escrow)merchantAcceptvoidrefund html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":203,"title":202,"titles":2324,"content":2325,"level":573},[],"Void a paid order before payment is captured and return money to the payer.",{"id":2327,"title":115,"titles":2328,"content":2329,"level":579},"/api-reference/open-apis/payments/void-payment#overview",[202],"POST /v1/payments/void is used to void a paid order before the payment is captured, and then return money to the payer. There are the following two types of voiding a paid order: Partially void: To partially void a paid order will return a part of the payment amount to the payer. It will not change the order status. There is a timeout setting for the remaining payment amount. Once the time is out of the setting, the remaining payment amount will be voided or confirmed automatically.Fully void: To fully void an order will close the order automatically. The timeout setting is available when the remaining payment amount is voided or confirmed automatically if the session timeout is set. All monetary amounts in requests and responses must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000. Only payments with escrow product code (51051000101000100008) can use this API.This API is used after the merchant has accepted the payment.For payments not yet accepted by the merchant, use cancel instead. The Mini Program calls this my.getAuthCode JSAPI with specific scopes(USER_ID) to request an authorization code.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-Wallet backend returns accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.The merchant backend returns customerId to mini program.The Mini Program creates an order with customerId.The merchant backend calls the payment API to initiate payment flow, including customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.The E-Wallet backend returns payment detail information the merchant backend, such as redirectionUrl.The merchant backend passes the payment detail information to the Mini Program.The Mini Program calls the my.tradePay JSAPI with redirectionUrl to conduct the payment.The E-Wallet App Service displays the cashier page with order information, such as amount, order details, etc.The user confirms the payment in the cashier page.The E-Wallet App Service calls payment service and execute the payment process.When the payment reaches the final status, the E-wallet backend returns the payment result to the Mini Program (Step 18).The E-Wallet App Service returns the payment result to mini program.Also the E-wallet backend notifies the merchant backend of the payment result with paymentNotifyUrl provided in Step 10(Step 19).Finally, E-wallet backend notifies the user of the payment result via SMS/Email/Inbox message (Step 20).If the merchant cannot fulfill the order or needs to void the transaction, the merchant initiates the void process (Step 21).The merchant backend calls the void API to return the money to the customer (Step 23).Send void request via /v1/payments/void.The E-Wallet backend returns the void result to the merchant backend.The merchant backend returns void result.And the Mini Program displays the void result to the user(Step 26). Alternative flow:\nWhen the E-Wallet backend returns the resultCode as VOID_IN_PROCESS, the merchant can call inquiryPayment API to query void result (Step 27).",{"id":2331,"title":1885,"titles":2332,"content":2333,"level":579},"/api-reference/open-apis/payments/void-payment#endpoint",[202],"MethodPathPOST/v1/payments/void",{"id":2335,"title":1890,"titles":2336,"content":1892,"level":579},"/api-reference/open-apis/payments/void-payment#api-structure",[202],{"id":2338,"title":1895,"titles":2339,"content":2340,"level":590},"/api-reference/open-apis/payments/void-payment#request",[202,1890],"FieldTypeRequiredDescriptionExamplevoidRequestIdstringYesThe unique ID of a void request generated by a merchant. Max. length: 64 characters.\"2023010123456789013\"paymentIdstringYesThe payment ID of the original authorization to be voided. Max. length: 64 characters.\"202312061112128001016xx\"voidAmountobjectNoThe void payment amount. The voidAmount is mandatory in partial void scenario. The voidAmount is optional in full void scenario.{ \"value\":\"40000\", \"currency\":\"IQD\" }extendInfostringNoThe extension information that wallets and merchants want to describe. The format should be JSON format. Max. length: 2048 characters.\"extendInfo: This is additional information\"",{"id":2342,"title":2209,"titles":2343,"content":2344,"level":739},"/api-reference/open-apis/payments/void-payment#sample-request",[202,1890,1895],"{\n  \"voidRequestId\": \"2023010123456789013\",\n  \"paymentId\": \"202312061112128001016xx\",\n  \"voidAmount\": {\n    \"value\": \"40000\",\n    \"currency\": \"IQD\"\n  }\n} The voidRequestId is used for idempotence—repeat submissions with the same ID will yield the same final result.",{"id":2346,"title":1517,"titles":2347,"content":2348,"level":590},"/api-reference/open-apis/payments/void-payment#response",[202,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesThe request result, which contains information such as result status and error codes.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"Success.\" }voidRequestIdstringNoThe unique ID of a void request generated by a merchant. Max. length: 64 characters.\"2023010123456789013\"voidIdstringNoThe unique ID of a void request generated by the wallet. Max. length: 64 characters.\"202312061112128017xxx\"",{"id":2350,"title":2218,"titles":2351,"content":2352,"level":739},"/api-reference/open-apis/payments/void-payment#sample-response",[202,1890,1517],"{\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success.\"\n  },\n  \"voidRequestId\": \"2023010123456789013\",\n  \"voidId\": \"202312061112128017xxx\"\n}",{"id":2354,"title":2223,"titles":2355,"content":2356,"level":579},"/api-reference/open-apis/payments/void-payment#result-process-logic",[202],"In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status: resultStatusDescriptionSIt means that the void is successful. The corresponding result.resultCode is \"SUCCESS\", and the result.resultMessage is \"Success.\".UIt means that the status of the void is unknown. The corresponding result.resultCode is UNKNOWN_EXCEPTION, and result.resultMessage is \"An API calling is failed, which is caused by unknown reasons\". For details, see the Common error codes section.What needs to note is as follow:• U status (inquiry/retry still gets U) can not set to fail or success on merchant/partner system.If other response (almost never occur), the merchant/partner should process like U.FIt means that the void fails. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the Error codes section.",{"id":2358,"title":1909,"titles":2359,"content":2360,"level":579},"/api-reference/open-apis/payments/void-payment#error-codes",[202],"Error codes are usually classified into the following categories: Common error codes are common across all mini program's APIs.API-specific error codes are listed in the following table. resultStatusresultCoderesultMessageFORDER_NOT_EXISTSThe order does not exist.FORDER_STATUS_INVALIDThe order status is invalid.UVOID_IN_PROCESSThe void is still under process.FCURRENCY_NOT_SAMEThe currency of a user's payment is not the same as the original payment currency.FVOID_AMOUNT_EXCEEDS_AUTH_LIMITThe total void amount exceeds the limit of the authorized payment amount.FMUTEX_OPERATION_IN_PROCESSINGThere is another payment void, confirm, or capture in processing.FORDER_UNSUPPORTED_OPERATIONThe order is not support void.FREPEAT_REQ_INCONSISTENTRepeated submit, and requests are inconsistent.FPARTNER_NOT_EXISTThe partner does not exist.FUSER_NOT_EXISTSThe user does not exist.FUSER_STATUS_ABNORMALThe user status is abnormal.FPARTNER_STATUS_ABNORMALThe partner status is abnormal.",{"id":2362,"title":1914,"titles":2363,"content":2364,"level":579},"/api-reference/open-apis/payments/void-payment#related-links",[202],"pay (Use product code 51051000101000100008 for escrow)merchantAcceptcancelrefundinquiryPayment html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":213,"title":212,"titles":2366,"content":2367,"level":573},[],"Retrieve authorized user details with an access token.",{"id":2369,"title":115,"titles":2370,"content":2371,"level":579},"/api-reference/open-apis/users/inquiry-user-info#overview",[212],"POST /v1/users/inquiryUserInfo returns user attributes based on scopes granted through my.getAuthCode. Pass the accessToken issued by applyToken; the response includes profile details such as login identifiers, name, avatar, and contact info when authorized. Mini Program calls my.getAuthCode with the desired scopes to request authorization.Wallet app renders the authorization page to the user.User reviews and approves the authorization in the super app.Wallet app service submits the authorization result to the wallet backend.Wallet backend validates the authorization and generates an authCode.Wallet app service returns the authCode to the Mini Program.Mini Program forwards the authCode to the merchant backend.Merchant backend invokes /v1/authorizations/applyToken with the authCode to obtain tokens.Wallet backend returns accessToken (and refresh token) to the merchant backend.Merchant backend calls /v1/users/inquiryUserInfo with the accessToken.Wallet backend responds with user information corresponding to the granted scopes.",{"id":2373,"title":1885,"titles":2374,"content":2375,"level":579},"/api-reference/open-apis/users/inquiry-user-info#endpoint",[212],"MethodPathPOST/v1/users/inquiryUserInfo",{"id":2377,"title":1890,"titles":2378,"content":1892,"level":579},"/api-reference/open-apis/users/inquiry-user-info#api-structure",[212],{"id":2380,"title":1895,"titles":2381,"content":2382,"level":590},"/api-reference/open-apis/users/inquiry-user-info#request",[212,1890],"FieldTypeRequiredDescriptionExampleaccessTokenstringYesAccess token for querying user info (max 128 characters; disallow @, #, ?). Obtain via applyToken.\"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"extendInfostringNoOptional metadata (max 4096 characters; no @, #, ?).{ \"memo\": \"memo\" } {\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"\n}",{"id":2384,"title":1517,"titles":2385,"content":2386,"level":590},"/api-reference/open-apis/users/inquiry-user-info#response",[212,1890],"FieldTypeRequiredDescriptionresultobjectYesOutcome metadata containing status and error codes.userInfoobjectNoUser attributes allowed by the authorized scopes. Returned when result.resultStatus is S. {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  },\n  \"userInfo\": {\n    \"userId\": \"1000001119398804\",\n    \"loginIdInfos\": [\n      {\n        \"loginIdType\": \"MOBILE_PHONE\",\n        \"maskLoginId\": \"964*******01\"\n      }\n    ],\n    \"userName\": {\n      \"fullName\": \"Jack Second Third Sparrow\",\n      \"firstName\": \"Jack\",\n      \"secondName\": \"Second\",\n      \"thirdName\": \"Third\",\n      \"lastName\": \"Sparrow\"\n    },\n    \"avatar\": \"https://example.com/avatar.png\",\n    \"gender\": \"M\",\n    \"birthDate\": \"2020-07-25\",\n    \"nationality\": \"IRQ\",\n    \"contactInfos\": [\n      {\n        \"contactType\": \"MOBILE_PHONE\",\n        \"contactNo\": \"964*******01\"\n      }\n    ],\n    \"extendInfo\": {}\n  }\n}",{"id":2388,"title":1904,"titles":2389,"content":2390,"level":590},"/api-reference/open-apis/users/inquiry-user-info#result-processing-logic",[212,1890],"StatusDescriptionSInquiry succeeded. Use userInfo data per the authorized scopes.UResult unknown (resultCode: UNKNOWN_EXCEPTION). Retry or review Common error codes.FInquiry failed. Inspect resultCode and see Error codes.",{"id":2392,"title":1909,"titles":2393,"content":2394,"level":579},"/api-reference/open-apis/users/inquiry-user-info#error-codes",[212],"Error CodeResult StatusMessageNext StepINVALID_ACCESS_TOKENFAccess token invalid.Obtain a new authorization code via my.getAuthCode, then exchange using applyToken.EXPIRED_ACCESS_TOKENFAccess token expired.Refresh using applyToken with the refreshToken.",{"id":2396,"title":1914,"titles":2397,"content":2398,"level":579},"/api-reference/open-apis/users/inquiry-user-info#related-links",[212],"my.getAuthCodeapplyToken html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"id":218,"title":217,"titles":2400,"content":2401,"level":573},[],"Retrieve authorized user bank card list with an access token.",{"id":2403,"title":115,"titles":2404,"content":2405,"level":579},"/api-reference/open-apis/users/inquiry-user-card-list#overview",[217],"POST /v1/users/inquiryUserCardList returns user bank card list based on scopes granted through my.getAuthCode. Pass the accessToken issued by applyToken; the response includes the list of bank cards associated with the user when authorized. To access user card information, you must request the CARD_LIST scope when calling my.getAuthCode to obtain the authorization code.",{"id":2407,"title":1885,"titles":2408,"content":2409,"level":579},"/api-reference/open-apis/users/inquiry-user-card-list#endpoint",[217],"MethodPathPOST/v1/users/inquiryUserCardList",{"id":2411,"title":1890,"titles":2412,"content":1892,"level":579},"/api-reference/open-apis/users/inquiry-user-card-list#api-structure",[217],{"id":2414,"title":1895,"titles":2415,"content":2416,"level":590},"/api-reference/open-apis/users/inquiry-user-card-list#request",[217,1890],"FieldTypeRequiredDescriptionExampleaccessTokenstringYesAccess token for querying user bank card list (max 128 characters; disallow @, #, ?). Obtain via applyToken.\"281010033AB2F588D14B43238637264FCA5AAF35xxxx\" {\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"\n}",{"id":2418,"title":1517,"titles":2419,"content":2420,"level":590},"/api-reference/open-apis/users/inquiry-user-card-list#response",[217,1890],"FieldTypeRequiredDescriptionresultobjectYesOutcome metadata containing status and error codes.cardListarray\u003CCardInfo>NoUser bank card list queried by the merchant. Must be returned when result.resultStatus is S. Returns empty array [] when user has not bound any bank card.",{"id":2422,"title":2423,"titles":2424,"content":2425,"level":739},"/api-reference/open-apis/users/inquiry-user-card-list#cardinfo","CardInfo",[217,1890,1517],"PropertyTypeRequiredDescriptionaccountNumberstringYesAccount number (max 32 characters).maskedCardNostringYesMasked card number (max 32 characters). {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success\"\n  },\n  \"cardList\": [\n    {\n      \"maskedCardNo\": \"123*****789\",\n      \"accountNumber\": \"123456789\"\n    },\n    {\n      \"maskedCardNo\": \"987*****321\",\n      \"accountNumber\": \"987654321\"\n    }\n  ]\n}",{"id":2427,"title":1904,"titles":2428,"content":2429,"level":590},"/api-reference/open-apis/users/inquiry-user-card-list#result-processing-logic",[217,1890],"StatusDescriptionSInquiry succeeded. Use accessToken to access user information within the corresponding scope.UResult unknown (resultCode: UNKNOWN_EXCEPTION, resultMessage: \"An API calling is failed, which is caused by unknown reasons.\"). Retry or review Common error codes.FInquiry failed. Inspect resultCode and see Error codes.",{"id":2431,"title":1909,"titles":2432,"content":2433,"level":579},"/api-reference/open-apis/users/inquiry-user-card-list#error-codes",[217],"Error CodeResult StatusMessageNext StepINVALID_ACCESS_TOKENFThe access token is not valid.Obtain a new authorization code via my.getAuthCode, then exchange using applyToken.ACCESS_TOKEN_NOT_COVER_THE_SCOPEFThe access token permission scope does not contain specified scope.Check the permission for the access token and try again.",{"id":2435,"title":1914,"titles":2436,"content":2437,"level":579},"/api-reference/open-apis/users/inquiry-user-card-list#related-links",[217],"my.getAuthCodeapplyToken html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":222,"title":221,"titles":2439,"content":2440,"level":573},[],"Retrieve authorized user bank account list with an access token.",{"id":2442,"title":115,"titles":2443,"content":2444,"level":579},"/api-reference/open-apis/users/inquiry-user-account-list#overview",[221],"POST /v1/users/inquiryUserAccountList returns user bank account list based on scopes granted through my.getAuthCode. Pass the accessToken issued by applyToken; the response includes the list of bank accounts associated with the user when authorized. To access user account information, you must request the ACCOUNT_LIST scope when calling my.getAuthCode to obtain the authorization code. The ACCOUNT_LIST scope provides a more privacy-conscious alternative to CARD_LIST by returning only account numbers without any sensitive card information such as masked card numbers.",{"id":2446,"title":2447,"titles":2448,"content":2449,"level":579},"/api-reference/open-apis/users/inquiry-user-account-list#flow","Flow",[221],"User enters Mini-app - The buyer opens the merchant's Mini Program within the Super Qi App.Call my.getAuthCode JSAPI - The Mini Program calls my.getAuthCode with scopes=['ACCOUNT_LIST'] to request user authorization.Display authorization page - Super Qi App displays the authorization consent page to the user.Confirm authorization - The user reviews and confirms the authorization request.Call authorization service - Super Qi App sends the authorization request to Super Qi Backend.Return authCode - Super Qi Backend generates and returns the authorization code.Callback authCode - Super Qi App passes the authorization code back to the Mini Program.Send authCode - The Mini Program sends the authorization code to the Merchant Backend.Apply access token - Merchant Backend exchanges the authorization code for an access token via /v1/authorizations/applyToken.Return accessToken - Super Qi Backend returns the access token to the Merchant Backend.Get user account list - Merchant Backend calls /v1/users/inquiryUserAccountList with the access token.Return user account list - Super Qi Backend returns the user's account list to the Merchant Backend.Return user account list - Merchant Backend passes the account list to the Mini Program.Business logic - The Mini Program processes the account information according to business needs.",{"id":2451,"title":1885,"titles":2452,"content":2453,"level":579},"/api-reference/open-apis/users/inquiry-user-account-list#endpoint",[221],"MethodPathPOST/v1/users/inquiryUserAccountList",{"id":2455,"title":1890,"titles":2456,"content":1892,"level":579},"/api-reference/open-apis/users/inquiry-user-account-list#api-structure",[221],{"id":2458,"title":1895,"titles":2459,"content":2460,"level":590},"/api-reference/open-apis/users/inquiry-user-account-list#request",[221,1890],"FieldTypeRequiredDescriptionExampleaccessTokenstringYesAccess token for querying user bank account list (max 128 characters; disallow @, #, ?). Obtain via applyToken.\"281010033AB2F588D14B43238637264FCA5AAF35xxxx\" {\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"\n}",{"id":2462,"title":1517,"titles":2463,"content":2464,"level":590},"/api-reference/open-apis/users/inquiry-user-account-list#response",[221,1890],"FieldTypeRequiredDescriptionresultobjectYesOutcome metadata containing status and error codes.accountListarray\u003CAccountInfo>NoUser bank account list queried by the merchant. Must be returned when result.resultStatus is S. Returns empty array [] when user has not bound any bank account.",{"id":2466,"title":2467,"titles":2468,"content":2469,"level":739},"/api-reference/open-apis/users/inquiry-user-account-list#accountinfo","AccountInfo",[221,1890,1517],"PropertyTypeRequiredDescriptionaccountNumberstringYesAccount number (max 32 characters). {\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success\"\n  },\n  \"accountList\": [\n    {\n      \"accountNumber\": \"12340001\"\n    },\n    {\n      \"accountNumber\": \"12340002\"\n    },\n    {\n      \"accountNumber\": \"12340003\"\n    }\n  ]\n}",{"id":2471,"title":1904,"titles":2472,"content":2429,"level":590},"/api-reference/open-apis/users/inquiry-user-account-list#result-processing-logic",[221,1890],{"id":2474,"title":1909,"titles":2475,"content":2433,"level":579},"/api-reference/open-apis/users/inquiry-user-account-list#error-codes",[221],{"id":2477,"title":1914,"titles":2478,"content":2479,"level":579},"/api-reference/open-apis/users/inquiry-user-account-list#related-links",[221],"my.getAuthCodeapplyTokeninquiryUserCardList html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":232,"title":231,"titles":2481,"content":2482,"level":573},[],"Send inbox messages to wallet users via access tokens.",{"id":2484,"title":115,"titles":2485,"content":2486,"level":579},"/api-reference/open-apis/messages/sendinbox#overview",[231],"POST /v1/messages/sendInbox enables merchants or Independent Software Vendors (ISV) to send inbox messages to wallet users using access tokens. This API allows you to deliver notifications, updates, and other messages directly to users' wallet inbox. The message content is customizable through templates, allowing you to include dynamic parameters such as titles, content text, and deep links to specific pages within your Mini Program. Ensure the access token has the NOTIFICATION_INBOX scope before attempting to send messages.The requestId is idempotent—submitting the same ID multiple times will only send the message once.Verify the access token is valid and not expired before making the API call. The Mini Program calls the my.getAuthCode JSAPI with specific scopes(NOTIFICATION_INBOX) to request an authorization code.The E-wallet App processes the request and displays the authorization page that needs to be authorized.The user confirms the authorization in the super app.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-wallet backend returns accessToken information to the merchant backend, such as accessToken, refreshToken, etc.The merchant backend calls this API with the accessToken to send inbox message to the user.The E-wallet backend returns the send result, including messageId.",{"id":2488,"title":1885,"titles":2489,"content":2490,"level":579},"/api-reference/open-apis/messages/sendinbox#endpoint",[231],"MethodPathPOST/v1/messages/sendInbox",{"id":2492,"title":1890,"titles":2493,"content":2494,"level":579},"/api-reference/open-apis/messages/sendinbox#api-structure",[231],"A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see: Request headerResponse header OpenAPIs Overview.",{"id":2496,"title":1895,"titles":2497,"content":2498,"level":590},"/api-reference/open-apis/messages/sendinbox#request",[231,1890],"FieldTypeRequiredDescriptionExampleaccessTokenstringYesAccess token used to send inbox messages. Obtain via applyToken with NOTIFICATION_INBOX scope. Max length 128; no @#?.\"20191127190741010007000000777771xxxx\"requestIdstringYesUnique request identifier for idempotency. Resubmitting the same requestId will not send duplicate messages. Max length 128; no @#?.\"20191127190741010007013213123xxxx\"templateCodestringYesTemplate code distinguishing different message templates. Max length 256; no @#?.\"MINI_APP_COMMON_INBOX\"templatesarrayYesArray of content template objects. Each object contains templateParameters with Title, Content, and Url fields.See structure below Template Structure: Each item in the templates array must include: templateParameters.Title (string, required): The inbox message titletemplateParameters.Content (string, required): The inbox message content/bodytemplateParameters.Url (string, required): Deep link URL to navigate within the Mini Program (format: mini://platformapi/startapp?_ariver_appid={appId}) {\n  \"accessToken\": \"20191127190741010007000000777771xxxx\",\n  \"requestId\": \"20191127190741010007013213123xxxx\",\n  \"templateCode\": \"MINI_APP_COMMON_INBOX\",\n  \"templates\": [\n    {\n      \"templateParameters\": {\n        \"Title\": \"mini-inbox-title\",\n        \"Content\": \"hello mini program\",\n        \"Url\": \"mini://platformapi/startapp?_ariver_appid=888888\"\n      }\n    }\n  ]\n}",{"id":2500,"title":1517,"titles":2501,"content":2502,"level":590},"/api-reference/open-apis/messages/sendinbox#response",[231,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesOutcome metadata including status and error codes.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"success\" }messageIdstringConditionalUnique message identifier. Present when message is sent successfully. Max length 258; no @#?.\"20201235900212xxxx\"extendInfostringNoExtended response metadata (max 4096 characters, no @#?).\"This is additional information\" {\n  \"messageId\": \"20201235900212xxxx\",\n  \"extendInfo\": \"\",\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  }\n}",{"id":2504,"title":1904,"titles":2505,"content":2506,"level":590},"/api-reference/open-apis/messages/sendinbox#result-processing-logic",[231,1890],"StatusDescriptionSRequest succeeded. resultCode is SUCCESS and resultMessage is success. The inbox message was sent successfully.ARequest accepted. resultCode is ACCEPT; message processing initiated.UOutcome unknown. resultCode is UNKNOWN_EXCEPTION; retry after checking Common error codes or logs.FRequest failed. Inspect resultCode and cross-reference Error codes.",{"id":2508,"title":1909,"titles":2509,"content":2510,"level":579},"/api-reference/open-apis/messages/sendinbox#error-codes",[231],"Error CodeResult StatusMessageNext StepACCESS_TOKEN_NOT_COVER_THE_SCOPEFAccess token permission scope does not contain specified scope.Ensure the access token includes the NOTIFICATION_INBOX scope.INVALID_ACCESS_TOKENFAccess token is invalid.Refresh the access token via applyToken or re-authorize with my.getAuthCode.",{"id":2512,"title":1914,"titles":2513,"content":2514,"level":579},"/api-reference/open-apis/messages/sendinbox#related-links",[231],"my.getAuthCodeapplyToken html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":237,"title":236,"titles":2516,"content":2517,"level":573},[],"Send push messages to wallet users via access tokens.",{"id":2519,"title":115,"titles":2520,"content":2521,"level":579},"/api-reference/open-apis/messages/sendpush#overview",[236],"POST /v1/messages/sendPush enables merchants or Independent Software Vendors (ISV) to send push messages to wallet users using access tokens. This API allows you to deliver push notifications, alerts, and other time-sensitive messages directly to users' devices. The message content is customizable through templates, allowing you to include dynamic parameters such as titles, content text, and deep links to specific pages within your Mini Program. Ensure the access token has the NOTIFICATION_PUSH scope before attempting to send messages.The requestId is idempotent—submitting the same ID multiple times will only send the message once.Verify the access token is valid and not expired before making the API call. The Mini Program calls the my.getAuthCode JSAPI with specific scopes(NOTIFICATION_PUSH) to request an authorization code.The E-wallet App processes the request and displays the authorization page that needs to be authorized.The user confirms the authorization in the super app.The E-wallet App service calls authorization service to processes the authorization information.The E-wallet backend verifies the authorization information, generates the authCode and returns.The E-wallet App service returns the authCode to the Mini Program.The Mini Program sends the authCode to the merchant backend.The merchant backend calls the applyToken API with authCode to apply the accessToken.The E-wallet backend returns accessToken information to the merchant backend, such as accessToken, refreshToken, etc.The merchant backend calls this API with the accessToken to send push message to the user.The E-wallet backend returns the send result, including messageId.",{"id":2523,"title":1885,"titles":2524,"content":2525,"level":579},"/api-reference/open-apis/messages/sendpush#endpoint",[236],"MethodPathPOST/v1/messages/sendPush",{"id":2527,"title":1890,"titles":2528,"content":2494,"level":579},"/api-reference/open-apis/messages/sendpush#api-structure",[236],{"id":2530,"title":1895,"titles":2531,"content":2532,"level":590},"/api-reference/open-apis/messages/sendpush#request",[236,1890],"FieldTypeRequiredDescriptionExampleaccessTokenstringYesAccess token used to send push messages. Obtain via applyToken with NOTIFICATION_PUSH scope. Max length 128 characters.\"2019112719074101000700000077771xxxx\"requestIdstringYesUnique request identifier for idempotency. Resubmitting the same requestId will not send duplicate messages—if the same requestId is stored, the stored result is returned. Max length 128 characters.\"20191127190741010007013213123xxxx\"templateCodestringYesUnique code to distinguish different content templates. Max length 256 characters.\"MINI_APP_COMMON_PUSH\"templatesarrayYesArray of content template objects for push messages. The URL is generated by the mini program platform. Each object contains templateParameters with Title, Content, and Url fields.See structure below Template Structure: Each item in the templates array must include: templateParameters.Title (string, required): The push message titletemplateParameters.Content (string, required): The push message content/bodytemplateParameters.Url (string, required): Deep link URL to navigate within the Mini Program (format: mini://platformapi/startapp?_ariver_appid={appId}) {\n  \"accessToken\": \"2019112719074101000700000077771xxxx\",\n  \"requestId\": \"20191127190741010007013213123xxxx\",\n  \"templateCode\": \"MINI_APP_COMMON_PUSH\",\n  \"templates\": [\n    {\n      \"templateParameters\": {\n        \"Title\": \"mini-push-title\",\n        \"Content\": \"hello mini program\",\n        \"Url\": \"mini://platformapi/startapp?_ariver_appid=888888\"\n      }\n    }\n  ]\n}",{"id":2534,"title":1517,"titles":2535,"content":2536,"level":590},"/api-reference/open-apis/messages/sendpush#response",[236,1890],"FieldTypeRequiredDescriptionExampleresultobjectYesRequest result containing status and error codes information.{ \"resultCode\": \"SUCCESS\", \"resultStatus\": \"S\", \"resultMessage\": \"success\" }messageIdstringNoUnique message identifier. Present when message is sent successfully. Max length 258 characters.\"20201235900212xxxx\"extendInfostringNoAdditional extensive information. Max length 4096 characters.\"This is additional information\" {\n  \"messageId\": \"20201235900212xxxx\",\n  \"extendInfo\": \"\",\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"success\"\n  }\n}",{"id":2538,"title":1904,"titles":2539,"content":2540,"level":590},"/api-reference/open-apis/messages/sendpush#result-processing-logic",[236,1890],"The result.resultStatus field indicates the result of processing a request as follows: StatusDescriptionSRequest succeeded. Sending push messages via access tokens is successful. resultCode is SUCCESS and resultMessage is success.ARequest accepted. The request is accepted by wallets. resultCode is ACCEPT; resultMessage varies based on different situations.UOutcome unknown. Unknown exception occurred on wallet side. The merchant or ISV may try again. resultCode is UNKNOWN_EXCEPTION and resultMessage is \"An API calling is failed, which is caused by unknown reasons.\"FRequest failed. Sending push messages via access tokens fails. Inspect resultCode and resultMessage which vary based on different situations. Cross-reference Error codes below.",{"id":2542,"title":1909,"titles":2543,"content":2544,"level":579},"/api-reference/open-apis/messages/sendpush#error-codes",[236],"API-specific error codes: are listed in the following table. Error CodeResult StatusMessageNext StepACCESS_TOKEN_NOT_COVER_THE_SCOPEFThe access token permission scope does not contain specified scope.Check the permission for the access token and try again. Ensure the access token includes the NOTIFICATION_PUSH scope.INVALID_ACCESS_TOKENFThe access token is invalid.Restart the OAuth again or refresh the token and try again.PARAM_ILLEGALFIllegal parameters exist. For example, a non-numeric input, or an invalid date.Check the templates content and try again.UNKNOWN_EXCEPTIONUAn API calling is failed, which is caused by unknown reasons.1. Check whether templateCode is MINI_APP_COMMON_PUSH. If it is not MINI_APP_COMMON_PUSH, modify it.2. Check whether the templateCode value in the request parameter meets the document expectations.",{"id":2546,"title":1914,"titles":2547,"content":2514,"level":579},"/api-reference/open-apis/messages/sendpush#related-links",[236],{"id":247,"title":246,"titles":2549,"content":2550,"level":573},[],"Retrieve authorized merchant details with an access token.",{"id":2552,"title":115,"titles":2553,"content":2554,"level":579},"/api-reference/open-apis/merchants/inquiry-merchant-info#overview",[246],"POST /v1/merchants/inquiryMerchantInfo returns merchant attributes based on the accessToken issued by applyToken. The response includes merchant profile details such as merchant ID, business name, and logo when authorized. This API requires Business (Merchant) User Scopes, not Customer User Scopes. When calling my.getAuthCode, use merchant-specific scopes such as MERCHANT_ID, MERCHANT_NAME, or MERCHANT_LOGO. For more details on scope types, see getAuthCode - Scope Reference. Place order in Mini-app – The Buyer initiates an order through the Mini Program.Call my.getDeviceInfo JSAPI – The Mini Program calls the Super Qi App to retrieve device information.Return deviceInfo – The Super Qi App returns the device information back to the Mini Program.Call my.getAutoCode JSAPI with user scopes – If the currentRole is \"customer\", the Mini Program requests an authorization code with user-level scopes.Call my.getAutoCode JSAPI with merchant scopes – If the currentRole is \"business\", the Mini Program requests an authorization code with merchant-level scopes.Display authorization page – The Super Qi App shows an authorization page to the Buyer.Confirm authorization – The Buyer confirms/approves the authorization request.Call authorization service – The Super Qi App calls the Super Qi Backend's authorization service.Return authCode – The Super Qi Backend returns an authorization code.Callback authCode – The Super Qi App sends the authCode back to the Mini Program via callback.Send authCode and userType – The Mini Program sends the authCode and userType to the Merchant Backend.Apply access token with authCode via /v1/authorizations/applyToken – The Merchant Backend exchanges the authCode for an access token by calling the Super Qi Backend.Return accessToken and customerId – The Super Qi Backend returns the accessToken and customerId.Inquiry user info with accessToken via /v1/users/inquiryUserInfo – If currentRole is \"customer\", the Merchant Backend fetches user details using the access token.Return user information – The Super Qi Backend returns the user information.Inquiry merchant info with accessToken via /v1/merchants/inquiryMerchantInfo – If currentRole is \"business\", the Merchant Backend fetches merchant details using the access token.Return merchant information – The Super Qi Backend returns the merchant information.",{"id":2556,"title":1885,"titles":2557,"content":2558,"level":579},"/api-reference/open-apis/merchants/inquiry-merchant-info#endpoint",[246],"MethodPathPOST/v1/merchants/inquiryMerchantInfo",{"id":2560,"title":1890,"titles":2561,"content":1892,"level":579},"/api-reference/open-apis/merchants/inquiry-merchant-info#api-structure",[246],{"id":2563,"title":1895,"titles":2564,"content":2565,"level":590},"/api-reference/open-apis/merchants/inquiry-merchant-info#request",[246,1890],"FieldTypeRequiredDescriptionExampleaccessTokenstringYesAccess token for querying merchant info (max 128 characters; disallow @, #, ?). Obtain via applyToken.\"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"extendInfostringNoOptional metadata (max 4096 characters; no @, #, ?).{ \"memo\": \"memo\" } {\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"\n}",{"id":2567,"title":1517,"titles":2568,"content":2569,"level":590},"/api-reference/open-apis/merchants/inquiry-merchant-info#response",[246,1890],"FieldTypeRequiredDescriptionresultobjectYesOutcome metadata containing status and error codes.merchantInfoobjectNoMerchant attributes allowed by the authorized scopes. Returned when result.resultStatus is S.",{"id":2571,"title":2572,"titles":2573,"content":2574,"level":739},"/api-reference/open-apis/merchants/inquiry-merchant-info#merchantinfo","MerchantInfo",[246,1890,1517],"FieldTypeDescriptionmerchantIdstringThe unique merchant ID in Super Qi.merchantNamestringThe English name of the merchant in Super Qi.merchantNameArabicstringThe Arabic name of the merchant in Super Qi.merchantLogostringThe merchant logo URL.",{"id":2576,"title":1904,"titles":2577,"content":2578,"level":590},"/api-reference/open-apis/merchants/inquiry-merchant-info#result-processing-logic",[246,1890],"StatusDescriptionSThe inquiry is successful. Use the accessToken to access merchant information within the corresponding scope. The corresponding result.resultCode is SUCCESS and the result.resultMessage is Success.UThe status of the inquiry is unknown. The corresponding result.resultCode is UNKNOWN_EXCEPTION and result.resultMessage is \"An API calling is failed, which is caused by unknown reasons.\" For details, see the Common error codes section.FThe inquiry is failed. The corresponding result.resultCode and result.resultMessage are various based on different situations. For details, see the Error codes section.",{"id":2580,"title":1909,"titles":2581,"content":2582,"level":579},"/api-reference/open-apis/merchants/inquiry-merchant-info#error-codes",[246],"Error codes are usually classified into the following categories: Common error codes: are common for all OpenAPIs.API-specific error codes: are listed in the following table. Result StatusResult CodeResult MessageFINVALID_ACCESS_TOKENThe access token is not valid.FEXPIRED_ACCESS_TOKENThe access token is expired.",{"id":2584,"title":2316,"titles":2585,"content":637,"level":579},"/api-reference/open-apis/merchants/inquiry-merchant-info#samples",[246],{"id":2587,"title":1895,"titles":2588,"content":2589,"level":590},"/api-reference/open-apis/merchants/inquiry-merchant-info#request-1",[246,2316],"{\n  \"accessToken\": \"281010033AB2F588D14B43238637264FCA5AAF35xxxx\"\n}",{"id":2591,"title":1517,"titles":2592,"content":2593,"level":590},"/api-reference/open-apis/merchants/inquiry-merchant-info#response-1",[246,2316],"{\n  \"result\": {\n    \"resultCode\": \"SUCCESS\",\n    \"resultStatus\": \"S\",\n    \"resultMessage\": \"Success\"\n  },\n  \"merchantInfo\": {\n    \"merchantId\": \"216629765986934560843\",\n    \"merchantName\": \"KFC\",\n    \"merchantNameArabic\": \"\"\n  }\n}",{"id":2595,"title":1914,"titles":2596,"content":2437,"level":579},"/api-reference/open-apis/merchants/inquiry-merchant-info#related-links",[246],{"id":252,"title":115,"titles":2598,"content":2599,"level":573},[],"Complete guide to Super Qi's JavaScript APIs for Mini Programs.",{"id":2601,"title":115,"titles":2602,"content":2603,"level":579},"/api-reference/jsapi#overview",[115],"The Super Qi framework provides developers with comprehensive JSAPI capabilities to build diversified and convenient services for users. JSAPIs are client-side JavaScript functions that Mini Programs call directly within the application to access device features, user data, and platform services. JSAPIs are called from your Mini Program client (front-end), while Open APIs are called from your merchant backend. Choose the appropriate API type based on where the functionality is needed.",{"id":2605,"title":2606,"titles":2607,"content":2608,"level":579},"/api-reference/jsapi#js-bridge-architecture","JS Bridge Architecture",[115],"Mini Programs launched to different native apps run on different containers, which may support varying JSAPI implementations. To resolve this, Super Qi provides a JavaScript Bridge (JS Bridge) that standardizes JSAPI calls across different platforms.",{"id":2610,"title":2611,"titles":2612,"content":2613,"level":590},"/api-reference/jsapi#how-js-bridge-works","How JS Bridge Works",[115,2606],"JS Bridge acts as a two-way communication channel between JavaScript code in your Mini Program and native code in the host application. This allows: Unified API calls across different native appsPlatform abstraction - developers write once, run everywhereNative feature access - camera, location, payments, etc.Consistent behavior regardless of the host application",{"id":2615,"title":2616,"titles":2617,"content":2618,"level":579},"/api-reference/jsapi#sdk-integration","SDK Integration",[115],"To use Mini Program JSAPIs, you need to integrate the JSBridge SDK.",{"id":2620,"title":2621,"titles":2622,"content":2623,"level":590},"/api-reference/jsapi#import-the-sdk","Import the SDK",[115,2616],"Add the following script tag to your Mini Program's HTML file: \u003Cscript src=\"https://cdn.marmot-cloud.com/npm/hylid-bridge/2.10.0/index.js\">\u003C/script> This SDK provides access to all standard JSAPIs including my.getAuthCode, my.tradePay, my.alert, and more which are found under the \"Essential APIs\" section.",{"id":2625,"title":2626,"titles":2627,"content":2628,"level":579},"/api-reference/jsapi#api-conventions","API Conventions",[115],"Super Qi JSAPIs follow consistent naming and usage patterns to make integration straightforward.",{"id":2630,"title":2631,"titles":2632,"content":2633,"level":590},"/api-reference/jsapi#api-naming-patterns","API Naming Patterns",[115,2626],"JSAPIs use different prefixes based on their purpose: PrefixPurposeExamplemy.*Standard synchronous or callback-based APIsmy.alert(), my.httpRequest()AlipayJSBridge.callSpecial bridge calls for certain featuresAlipayJSBridge.call('qicardSignContract')",{"id":2635,"title":2636,"titles":2637,"content":2638,"level":590},"/api-reference/jsapi#standard-apis","Standard APIs",[115,2626],"All other JSAPI interfaces accept an object as a parameter with the following common properties: PropertyTypeRequiredDescriptionsuccessFunctionNoCallback executed when the API call succeedsfailFunctionNoCallback executed when the API call failscompleteFunctionNoCallback executed after success or failure Additional API-specific properties vary depending on the functionality.",{"id":2640,"title":2641,"titles":2642,"content":2643,"level":590},"/api-reference/jsapi#callback-results","Callback Results",[115,2626],"Callback functions receive a result object as their parameterIf the result contains error or errorMessage fields, the call failedSuccess callbacks receive API-specific data",{"id":2645,"title":2646,"titles":2647,"content":2648,"level":590},"/api-reference/jsapi#promise-support","Promise Support",[115,2626],"All standard APIs return a Promise object, allowing you to use modern async/await syntax or promise chaining. Callback Example: my.httpRequest({\n  url: '/api/data',\n  success(res) {\n    console.log('Success:', res.data);\n  },\n  fail(res) {\n    console.log('Error:', res.error, res.errorMessage);\n  },\n  complete(res) {\n    console.log('Request completed');\n  }\n}); Promise Example: my.httpRequest({\n  url: '/api/data',\n  success(res1) {\n    console.log('Callback result:', res1);\n  }\n}).then((res2) => {\n  // res1 === res2\n  console.log('Promise result:', res2.data);\n}).catch((res) => {\n  console.log('Error:', res.error, res.errorMessage);\n}); Async/Await Example: async function fetchData() {\n  try {\n    const res = await my.httpRequest({ url: '/api/data' });\n    console.log('Data:', res.data);\n  } catch (res) {\n    console.log('Error:', res.error, res.errorMessage);\n  }\n}",{"id":2650,"title":2651,"titles":2652,"content":2653,"level":579},"/api-reference/jsapi#api-interface-definition","API Interface Definition",[115],"Each JSAPI has a TypeScript-style interface definition that describes its parameters and callbacks.",{"id":2655,"title":2656,"titles":2657,"content":2658,"level":590},"/api-reference/jsapi#example-myalert","Example - my.alert",[115,2651],"The my.alert API displays a simple alert dialog. Here's how its interface is defined: interface IAlertOptions {\n  title?: string;          // Alert dialog title\n  content?: string;        // Alert dialog content\n  buttonText?: string;     // Button label text\n  success?: () => void;    // Success callback\n  fail?: () => void;       // Failure callback\n  complete?: () => void;   // Completion callback\n} Usage: my.alert({\n  title: 'Payment Successful',\n  content: 'Your order has been confirmed',\n  buttonText: 'OK',\n  success() {\n    console.log('User closed the alert');\n  }\n});",{"id":2660,"title":2661,"titles":2662,"content":2663,"level":590},"/api-reference/jsapi#common-interface-pattern","Common Interface Pattern",[115,2651],"Most JSAPIs follow this pattern: interface IApiOptions {\n  // API-specific required parameters\n  requiredParam: string;\n\n  // API-specific optional parameters\n  optionalParam?: number;\n\n  // Common callback functions\n  success?: (res: SuccessResult) => void;\n  fail?: (res: ErrorResult) => void;\n  complete?: (res: Result) => void;\n} Properties marked with ? are optional.",{"id":2665,"title":1873,"titles":2666,"content":2667,"level":579},"/api-reference/jsapi#related-documentation",[115],"my.getAuthCode - Authorization APImy.tradePay - Payment API html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":263,"title":262,"titles":2669,"content":2670,"level":573},[],"Request an authorization code that can be exchanged for access tokens and user info.",{"id":2672,"title":115,"titles":2673,"content":2674,"level":579},"/api-reference/jsapi/essential-apis/get-auth-code#overview",[262],"my.getAuthCode prompts the Mini Program user to authorize access and returns an authCode. Merchants exchange this code for access tokens to retrieve user identifiers and profile data. For scope definitions and token exchange, refer to User authorization. To view the end-to-end diagram, see the Authentication flow.",{"id":2676,"title":2677,"titles":2678,"content":2679,"level":579},"/api-reference/jsapi/essential-apis/get-auth-code#request-example","Request Example",[262],"my.getAuthCode({\n  scopes: ['auth_base'],\n  success: (res) => {\n    my.alert({\n      content: res.authCode\n    });\n  },\n  fail: (err) => {\n    console.log(err.authErrorScopes);\n  }\n});",{"id":2681,"title":2682,"titles":2683,"content":2684,"level":579},"/api-reference/jsapi/essential-apis/get-auth-code#parameters","Parameters",[262],"PropertyTypeRequiredDescriptionscopesArray\u003Cstring>YesAuthorization scopes to request. See Scope reference.successFunctionNoCallback executed on success. Receives the payload described in Callback payload.failFunctionNoCallback executed on failure. Receives the payload described in Callback payload.completeFunctionNoCallback executed on completion, regardless of outcome.",{"id":2686,"title":2687,"titles":2688,"content":637,"level":579},"/api-reference/jsapi/essential-apis/get-auth-code#scope-reference","Scope Reference",[262],{"id":2690,"title":2691,"titles":2692,"content":2693,"level":590},"/api-reference/jsapi/essential-apis/get-auth-code#customer-user-scope","Customer User Scope",[262,2687],"ScopeDescriptionSilent authorizationauth_baseObtain the unique user ID.YesUSER_IDObtain the unique user ID.YesUSER_LOGIN_IDObtain the user login ID.YesHASH_LOGIN_IDObtain the hashed user login ID.Yesauth_userObtain the user's basic profile information.NoUSER_NAMEObtain the user's name.NoUSER_AVATARObtain the user's avatar.NoUSER_GENDERObtain the user's gender.NoUSER_BIRTHDAYObtain the user's birthday.NoUSER_NATIONALITYObtain the user's nationality.NoUSER_CONTACTINFOObtain the user's contact information.NoNOTIFICATION_INBOXSend notifications to the user's in-app inbox.NoAGREEMENT_PAYEnable auto-debit payments from the user's balance or card.NoCARD_LISTAccess the user's linked bank card information (high permission scope). Required by inquiryUserCardList.NoACCOUNT_LISTAccess the user's bank account list (account numbers only, without sensitive card information). Required by inquiryUserAccountList.No auth_base supports silent authorization and does not interrupt the user. All other scopes require proactive user consent.",{"id":2695,"title":2696,"titles":2697,"content":2698,"level":590},"/api-reference/jsapi/essential-apis/get-auth-code#business-merchant-user-scope","Business (Merchant) User Scope",[262,2687],"ScopeDescriptionSilent authorizationauth_baseObtain the unique merchant ID.YesMERCHANT_IDObtain the unique merchant ID in Super Qi.YesMERCHANT_NAMEObtain the merchant's business name.NoMERCHANT_LOGOObtain the merchant's logo.NoAGREEMENT_PAYEnable auto-debit payments from the merchant's balance or card.NoNOTIFICATION_PUSHSend push notifications to the merchant.NoNOTIFICATION_INBOXSend notifications to the merchant's in-app inbox.NoNOTIFICATION_WhatsAppSend WhatsApp notifications to the merchant.NoCARD_LISTAccess the merchant's linked bank card information (high permission scope).No Scopes with silent authorization do not require explicit merchant approval. All other scopes require the merchant to grant consent.",{"id":2700,"title":2701,"titles":2702,"content":2703,"level":579},"/api-reference/jsapi/essential-apis/get-auth-code#callback-payload","Callback Payload",[262],"PropertyTypeRequiredDescriptionauthCodestringYesAuthorization code to exchange via applyToken.authErrorScopesRecord\u003Cstring, string>NoMap of scopes that failed with associated error codes.authSuccessScopesstring[]NoList of scopes that were successfully authorized.",{"id":2705,"title":2706,"titles":2707,"content":2708,"level":590},"/api-reference/jsapi/essential-apis/get-auth-code#success-example","Success Example",[262,2701],"{\n  \"authCode\": \"0000000001T1dc0W0tv44B0BD00007826\"\n}",{"id":2710,"title":2711,"titles":2712,"content":1577,"level":590},"/api-reference/jsapi/essential-apis/get-auth-code#failure-example","Failure Example",[262,2701],{"id":2714,"title":1909,"titles":2715,"content":2716,"level":579},"/api-reference/jsapi/essential-apis/get-auth-code#error-codes",[262],"CodeDescription3ERROR_CODE_UNKNOWN_ERROR1000ERROR_CODE_UNKNOWN_ERROR1001ERROR_CODE_USER_CANCEL1002ERROR_CODE_APP_SERVICE_ERROR1003ERROR_CODE_TIMEOUT2001ERRORLCODE_AUTH_PENDING_AGREEMENT html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":268,"title":267,"titles":2718,"content":2719,"level":573},[],"Direct users to authorize and sign a QiCard agreement for recurring payments.",{"id":2721,"title":115,"titles":2722,"content":2723,"level":579},"/api-reference/jsapi/essential-apis/qicard-sign-contract#overview",[267],"The qicardSignContract JSAPI redirects the user to the QiCard authorization page. Invoke it with AlipayJSBridge.call to launch the hosted signing screen. After the user confirms the agreement, the Mini Program receives an authCode that your backend exchanges for an agreement token via applyToken. Ensure the host app runtime is version 1.24.6 or higher. AlipayJSBridge.call('qicardSignContract') participates in the Agreement Payment flow to capture long-term user consent. To view the end-to-end diagram, see the Agreement Payment flow.",{"id":2725,"title":2726,"titles":2727,"content":2728,"level":579},"/api-reference/jsapi/essential-apis/qicard-sign-contract#usage-example","Usage Example",[267],"AlipayJSBridge.call('qicardSignContract', {\n  authUrl: 'https://wallet.example.com/sign?contract=xxxxxxx', // the auth URL returned by the wallet\n  extParams: {}\n}, (res) => {\n  if (!res.error && !res.errorCode && res.authCode) {\n    // handle successful authorization (store authCode, advance UI)\n  } else {\n    // Handle error response (logging, user feedback)\n  }\n});",{"id":2730,"title":2682,"titles":2731,"content":2732,"level":579},"/api-reference/jsapi/essential-apis/qicard-sign-contract#parameters",[267],"PropertyTypeRequiredDescriptionauthUrlstringYesAuthorization URL returned by the wallet to start the signing experience.extParamsRecord\u003Cstring, unknown>NoOptional additional parameters, for example subClientId.callbackFunctionNoSingle callback invoked with the signing result (success or failure). Provides the payloads in Callback payloads.",{"id":2734,"title":2735,"titles":2736,"content":2737,"level":579},"/api-reference/jsapi/essential-apis/qicard-sign-contract#callback-payloads","Callback Payloads",[267],"AlipayJSBridge.call delivers a single response object to your callback. Inspect the returned fields to determine success or failure.",{"id":2739,"title":2740,"titles":2741,"content":2742,"level":590},"/api-reference/jsapi/essential-apis/qicard-sign-contract#success","Success",[267,2735],"PropertyTypeDescriptionauthCodestringAuthorization code used to obtain an agreement token. Maximum length 32 characters. {\n  \"authCode\": \"663A8FA9D83648EE8AA11FF682989DC7\"\n}",{"id":2744,"title":2745,"titles":2746,"content":2747,"level":590},"/api-reference/jsapi/essential-apis/qicard-sign-contract#failure","Failure",[267,2735],"PropertyTypeDescriptionerrorCodestringError code describing why the signing failed.errorMessage / errMessagestringHuman-readable message for the failure (property may vary by runtime version).",{"id":2749,"title":1909,"titles":2750,"content":2751,"level":579},"/api-reference/jsapi/essential-apis/qicard-sign-contract#error-codes",[267],"CodeDescription6001User cancelled the signing process.6002Network exception prevented signing.6003Signing failed due to service error.",{"id":2753,"title":1914,"titles":2754,"content":2755,"level":579},"/api-reference/jsapi/essential-apis/qicard-sign-contract#related-links",[267],"prepareapplyToken html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":272,"title":271,"titles":2757,"content":2758,"level":573},[],"Collect wallet payments by redirecting the user to the hosted wallet cashier.",{"id":2760,"title":115,"titles":2761,"content":2762,"level":579},"/api-reference/jsapi/essential-apis/trade-pay#overview",[271],"my.tradePay is part of the Cashier Payment flow used to collect wallet payments. my.tradePay launches the wallet cashier so the user can confirm and complete a payment. Pass the cashier paymentUrl you obtained from the pay API response — specifically the redirectActionForm.redirectionUrl field. On completion, the API returns a status code indicating whether the payment succeeded, failed, or is still processing.",{"id":2764,"title":2726,"titles":2765,"content":2766,"level":579},"/api-reference/jsapi/essential-apis/trade-pay#usage-example",[271],"my.tradePay({\n  paymentUrl: 'https://wallet.example.com/cashier?orderId=xxxxxxx',\n  success: (res) => {\n    my.alert({\n      content: JSON.stringify(res)\n    });\n  },\n  fail: (err) => {\n    my.alert({\n      content: JSON.stringify(err)\n    });\n  }\n});",{"id":2768,"title":2682,"titles":2769,"content":2770,"level":579},"/api-reference/jsapi/essential-apis/trade-pay#parameters",[271],"PropertyTypeRequiredDescriptionpaymentUrlstringNoThe redirect URL of the cashier page, obtained from the pay response field redirectActionForm.redirectionUrl. See Cashier payment flow for how to obtain it.successFunctionNoCallback executed when the API call succeeds. Provides the payload defined in Callback payload.failFunctionNoCallback executed when the API call fails.completeFunctionNoCallback executed after success or failure. The pay API returns the cashier URL as redirectActionForm.redirectionUrl. Pass that exact value as tradePay's paymentUrl to route the user to the correct cashier.",{"id":2772,"title":2701,"titles":2773,"content":2774,"level":579},"/api-reference/jsapi/essential-apis/trade-pay#callback-payload",[271],"PropertyTypeRequiredDescriptionresultCodestringYesResult code representing the payment outcome. See Result codes.",{"id":2776,"title":2706,"titles":2777,"content":2778,"level":590},"/api-reference/jsapi/essential-apis/trade-pay#success-example",[271,2701],"{\n  \"resultCode\": \"9000\"\n}",{"id":2780,"title":2781,"titles":2782,"content":2783,"level":579},"/api-reference/jsapi/essential-apis/trade-pay#result-codes","Result Codes",[271],"resultCodeDescription9000Payment successful.8000Payment processing; final status pending.4000Payment failed.6001User cancelled the payment.6002Network exception occurred.6004Unknown payment result; retry status query. html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":276,"title":275,"titles":2785,"content":2786,"level":573},[],"Retrieve device information and the current user's role (customer or business) to build apps for different user types.",{"id":2788,"title":115,"titles":2789,"content":2790,"level":579},"/api-reference/jsapi/essential-apis/get-device-info#overview",[275],"my.getDeviceInfo retrieves essential device information and the current user's role in the Super Qi app. This JSAPI plays a critical role in enabling developers to build Miniapps that serve both Customer and Business users effectively. The most important value returned by this API is currentRole, which indicates whether the logged-in user is a: customer - An individual consumer using the Super Qi appbusiness - A merchant/business account using the Super Qi app By checking the currentRole, your Miniapp can dynamically adapt its behavior, UI, and authorization flows to match the user type. For example: When currentRole is \"customer\", call my.getAuthCode with Customer User ScopesWhen currentRole is \"business\", call my.getAuthCode with Business (Merchant) User Scopes This allows you to build a single Miniapp that seamlessly works for both B2C and B2B scenarios.",{"id":2792,"title":2726,"titles":2793,"content":637,"level":579},"/api-reference/jsapi/essential-apis/get-device-info#usage-example",[275],{"id":2795,"title":2796,"titles":2797,"content":2798,"level":590},"/api-reference/jsapi/essential-apis/get-device-info#dsl","DSL",[275,2726],"my.getDeviceInfo({\n  success: (res) => {\n    my.alert({\n      content: res.currentRole,\n    });\n  },\n  fail: (res) => {\n    console.log('getDeviceInfo call failed: ', JSON.stringify(res));\n    my.alert({\n      content: JSON.stringify(res),\n    });\n  },\n});",{"id":2800,"title":2801,"titles":2802,"content":2803,"level":590},"/api-reference/jsapi/essential-apis/get-device-info#h5","H5+",[275,2726],"AlipayJSBridge.call(\n  \"getDeviceInfo\",\n  {},\n  function (data) {\n    console.log(data);\n  }\n);",{"id":2805,"title":2682,"titles":2806,"content":2807,"level":579},"/api-reference/jsapi/essential-apis/get-device-info#parameters",[275],"PropertyTypeRequiredDescriptionsuccessFunctionNoCallback executed when the API call succeeds. Provides the payload defined in Callback payload.failFunctionNoCallback executed when the API call fails.completeFunctionNoCallback executed after success or failure.",{"id":2809,"title":2701,"titles":2810,"content":2811,"level":579},"/api-reference/jsapi/essential-apis/get-device-info#callback-payload",[275],"PropertyTypeDescriptionlanguagestringThe user's preferred language (e.g., \"en-US\").isProdEnvstringIndicates if the app is running in production environment (\"true\" or \"false\").currentRolestringThe role of the current user. Possible values: \"customer\" (individual consumer) or \"business\" (merchant/business account).systemInfostringOperating system information (e.g., \"Android 15\", \"iOS 16\").hardwareInfostringDevice hardware model information (e.g., \"HONOR_PGT-AN00\").loginTimestringTimestamp indicating when the user logged in (in milliseconds).",{"id":2813,"title":2814,"titles":2815,"content":2816,"level":590},"/api-reference/jsapi/essential-apis/get-device-info#success-example-customer-user","Success Example (Customer User)",[275,2701],"{\n  \"language\": \"en-US\",\n  \"isProdEnv\": \"true\",\n  \"currentRole\": \"customer\",\n  \"systemInfo\": \"Android 15\",\n  \"hardwareInfo\": \"HONOR_PGT-AN00\",\n  \"loginTime\": \"360307579\"\n}",{"id":2818,"title":2819,"titles":2820,"content":2821,"level":590},"/api-reference/jsapi/essential-apis/get-device-info#success-example-business-user","Success Example (Business User)",[275,2701],"{\n  \"language\": \"en-US\",\n  \"isProdEnv\": \"true\",\n  \"currentRole\": \"business\",\n  \"systemInfo\": \"Android 15\",\n  \"hardwareInfo\": \"HONOR_PGT-AN00\",\n  \"loginTime\": \"360307579\"\n}",{"id":2823,"title":1914,"titles":2824,"content":2825,"level":579},"/api-reference/jsapi/essential-apis/get-device-info#related-links",[275],"getAuthCode - Scope ReferenceinquiryUserInfo (Customer API)inquiryMerchantInfo (Business API)FAQ: Customer vs Business Scopes html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":281,"title":280,"titles":2827,"content":2828,"level":573},[],"Navigate from your Mini Program to another Mini Program within Super Qi.",{"id":2830,"title":115,"titles":2831,"content":2832,"level":579},"/api-reference/jsapi/essential-apis/navigate-to-miniprogram#overview",[280],"my.navigateToMiniProgram allows your Mini Program to jump to another Mini Program within the Super Qi ecosystem. You can pass data to the target Mini Program.",{"id":2834,"title":2835,"titles":2836,"content":2837,"level":579},"/api-reference/jsapi/essential-apis/navigate-to-miniprogram#sample-code","Sample Code",[280],"my.navigateToMiniProgram({\n  appId: \"xxxx\",\n  extraData: {\n    data1: \"test\",\n  },\n  success: (res) => {\n    console.log(JSON.stringify(res));\n  },\n  fail: (res) => {\n    console.log(JSON.stringify(res));\n  },\n});",{"id":2839,"title":2682,"titles":2840,"content":2841,"level":579},"/api-reference/jsapi/essential-apis/navigate-to-miniprogram#parameters",[280],"PropertyTypeRequiredDescriptionappIdStringYesThe appId of the target Mini Program to jump to.pathStringNoThe path of the target Mini Program to jump to, opens the homepage if it is empty.extraDataObjectNoThe extra data that needs to be passed to the target Mini Program. The target Mini Program can get it in App.onLaunch() or App.onShow().successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":2843,"title":2844,"titles":2845,"content":2846,"level":579},"/api-reference/jsapi/essential-apis/navigate-to-miniprogram#usage-notes","Usage Notes",[280],"The appId is the unique identifier of the target Mini ProgramIf no path is specified, the target Mini Program will open at its homepageData passed via extraData can be accessed in the target Mini Program's lifecycle methods",{"id":2848,"title":1914,"titles":2849,"content":2850,"level":579},"/api-reference/jsapi/essential-apis/navigate-to-miniprogram#related-links",[280],"my.navigateBackMiniProgram html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":286,"title":285,"titles":2852,"content":2853,"level":573},[],"Return to the previous Mini Program after being opened by another Mini Program.",{"id":2855,"title":115,"titles":2856,"content":2857,"level":579},"/api-reference/jsapi/essential-apis/navigate-back-miniprogram#overview",[285],"my.navigateBackMiniProgram allows your Mini Program to return to the previous Mini Program. This API is only used when another Mini Program has jumped to your foregrounded Mini Program, enabling you to navigate back and optionally pass data. This API should only be called when your Mini Program was opened by another Mini Program using my.navigateToMiniProgram. It returns control to the calling Mini Program.",{"id":2859,"title":2835,"titles":2860,"content":2861,"level":579},"/api-reference/jsapi/essential-apis/navigate-back-miniprogram#sample-code",[285],"my.navigateBackMiniProgram({\n  extraData: {\n    \"data1\": \"test\"\n  },\n  success: (res) => {\n    console.log(JSON.stringify(res))\n  },\n  fail: (res) => {\n    console.log(JSON.stringify(res))\n  }\n});",{"id":2863,"title":2682,"titles":2864,"content":2865,"level":579},"/api-reference/jsapi/essential-apis/navigate-back-miniprogram#parameters",[285],"PropertyTypeRequiredDescriptionextraDataObjectNoThe extra data that needs to be returned to the target Mini Program. The target Mini Program can get it in App.onLaunch() or App.onShow().successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":2867,"title":2844,"titles":2868,"content":2869,"level":579},"/api-reference/jsapi/essential-apis/navigate-back-miniprogram#usage-notes",[285],"This API only works when your Mini Program was opened by another Mini ProgramData passed via extraData can be accessed in the previous Mini Program's lifecycle methodsThe user will be returned to the Mini Program that originally navigated to yours",{"id":2871,"title":1914,"titles":2872,"content":2873,"level":579},"/api-reference/jsapi/essential-apis/navigate-back-miniprogram#related-links",[285],"my.navigateToMiniProgram html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":296,"title":295,"titles":2875,"content":2876,"level":573},[],"Customize the navigation bar appearance with title, colors, and images.",{"id":2878,"title":115,"titles":2879,"content":2880,"level":579},"/api-reference/jsapi/ui-apis/setnavigationbar#overview",[295],"my.setNavigationBar allows you to customize the navigation bar (top bar) of your Mini Program by setting the title, background color, border color, or displaying a custom image. This API provides dynamic control over your Mini Program's header appearance.",{"id":2882,"title":2835,"titles":2883,"content":2884,"level":579},"/api-reference/jsapi/ui-apis/setnavigationbar#sample-code",[295],"my.setNavigationBar({\n  title: 'hello',\n  backgroundColor: '#108ee9',\n  success() {\n    my.alert({\n      content: 'Success',\n    });\n  },\n  fail() {\n    my.alert({\n      content: 'Failed',\n    });\n  },\n});",{"id":2886,"title":2682,"titles":2887,"content":2888,"level":579},"/api-reference/jsapi/ui-apis/setnavigationbar#parameters",[295],"PropertyTypeRequiredDescriptiontitleStringNoNavigation bar title.imageStringNoPicture link address, must be https. Use 3x high-definition pictures. If the image is set, the title parameter is inactive. Currently, SVG images are not supported.backgroundColorStringNoNavigation bar background color, supporting hex color value.borderBottomColorStringNoNavigation bar bottom border color, supporting hex color value. If the backgroundColor is set, the borderBottomColor does not take effect. The backgroundColor is used by default.resetBooleanNoWhether the navigation bar is reset to the default color, false by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":2890,"title":2844,"titles":2891,"content":2892,"level":579},"/api-reference/jsapi/ui-apis/setnavigationbar#usage-notes",[295],"Image vs Title: When image is set, the title parameter becomes inactive. Choose one or the other.Image Requirements: Images must be served over HTTPS and should be 3x high-definition for optimal display. SVG format is not supported.Color Format: Use hex color values for backgroundColor and borderBottomColor (e.g., '#108ee9', '#FFFFFF').Border Color Priority: If backgroundColor is set, borderBottomColor will not take effect and the background color will be used for the border.Reset Option: Set reset: true to restore the navigation bar to its default appearance.",{"id":2894,"title":2895,"titles":2896,"content":637,"level":579},"/api-reference/jsapi/ui-apis/setnavigationbar#examples","Examples",[295],{"id":2898,"title":2899,"titles":2900,"content":2901,"level":590},"/api-reference/jsapi/ui-apis/setnavigationbar#set-title-and-background-color","Set Title and Background Color",[295,2895],"my.setNavigationBar({\n  title: 'Payment Confirmation',\n  backgroundColor: '#108ee9'\n});",{"id":2903,"title":2904,"titles":2905,"content":2906,"level":590},"/api-reference/jsapi/ui-apis/setnavigationbar#use-custom-image","Use Custom Image",[295,2895],"my.setNavigationBar({\n  image: 'https://example.com/images/header-3x.png',\n  backgroundColor: '#FFFFFF'\n});",{"id":2908,"title":2909,"titles":2910,"content":2911,"level":590},"/api-reference/jsapi/ui-apis/setnavigationbar#reset-to-default","Reset to Default",[295,2895],"my.setNavigationBar({\n  reset: true\n}); html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"id":301,"title":300,"titles":2913,"content":2914,"level":573},[],"Cascade selection picker for hierarchical data like provinces, cities, and districts.",{"id":2916,"title":115,"titles":2917,"content":2918,"level":579},"/api-reference/jsapi/ui-apis/multi-level-select#overview",[300],"my.multiLevelSelect provides a cascade selection function, mainly used for selecting several levels of associated data, such as province, city, and district. Users can drill down through hierarchical options to make their selection.",{"id":2920,"title":2835,"titles":2921,"content":2922,"level":579},"/api-reference/jsapi/ui-apis/multi-level-select#sample-code",[300],"function openMultiLevelSelect() {\n  my.multiLevelSelect({\n    title: 'Cascade selector',\n    list: [\n      {\n        name: \"City\",\n        subList: [\n          {\n            name: \"District A\",\n            subList: [\n              {\n                name: \"Street A\"\n              },\n              {\n                name: \"Street B\"\n              }\n            ]\n          },\n          {\n            name: \"District B\",\n            subList: [\n              {\n                name: \"Street C\"\n              },\n              {\n                name: \"Street D\"\n              }\n            ]\n          }\n        ]\n      }\n    ],\n    success: (res) => {\n      my.alert({\n        title: JSON.stringify(res)\n      });\n    }\n  });\n}",{"id":2924,"title":2682,"titles":2925,"content":2926,"level":579},"/api-reference/jsapi/ui-apis/multi-level-select#parameters",[300],"The incoming parameter is of the Object type with the following attributes: PropertyTypeRequiredDescriptiontitleStringNoTitle.listJsonArrayYesSelection data list.nameStringYesEntry name.subListJsonArrayNoSub-entry list.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":2928,"title":2929,"titles":2930,"content":2931,"level":579},"/api-reference/jsapi/ui-apis/multi-level-select#success-callback-function","Success Callback Function",[300],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionsuccessBooleanSelection completed or not, returning false for cancellation.resultJsonArraySelection result, such as [{\"name\":\"City\"},{\"name\":\"District A\"},{\"name\":\"Street A\"}].",{"id":2933,"title":2844,"titles":2934,"content":2935,"level":579},"/api-reference/jsapi/ui-apis/multi-level-select#usage-notes",[300],"The list parameter defines the hierarchical structure of selectable itemsEach item can have a subList array containing child itemsUsers can navigate through multiple levels before making a final selectionCanceling the selection returns success: false in the callback",{"id":2937,"title":1914,"titles":2938,"content":2939,"level":579},"/api-reference/jsapi/ui-apis/multi-level-select#related-links",[300],"my.datePicker - Date picker dialog html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":306,"title":305,"titles":2941,"content":2942,"level":573},[],"Display a simple alert dialog with a title, content, and single button.",{"id":2944,"title":115,"titles":2945,"content":2946,"level":579},"/api-reference/jsapi/ui-apis/alert#overview",[305],"my.alert displays an alert box with customizable title, content, and button text. This is a modal dialog that requires user interaction to dismiss.",{"id":2948,"title":2835,"titles":2949,"content":2950,"level":579},"/api-reference/jsapi/ui-apis/alert#sample-code",[305],"my.alert({\n  title: 'Tips',\n  content: 'Your bill for this month has been released',\n  buttonText: 'Show',\n  success: () => {\n    my.alert({\n      title: 'Click \"Show\"',\n    });\n  },\n});",{"id":2952,"title":2682,"titles":2953,"content":2954,"level":579},"/api-reference/jsapi/ui-apis/alert#parameters",[305],"PropertyTypeRequiredDescriptiontitleStringNoTitle of the alert box.contentStringNoContents of the alert box.buttonTextStringNoButton text, which is OK by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":2956,"title":2844,"titles":2957,"content":2958,"level":579},"/api-reference/jsapi/ui-apis/alert#usage-notes",[305],"The alert is a modal dialog - it blocks interaction with the rest of the Mini Program until dismissedDefault button text is \"OK\" if buttonText is not specifiedOnly one button is displayed (use my.confirm for two-button dialogs)The success callback is triggered when the user taps the button",{"id":2960,"title":2895,"titles":2961,"content":637,"level":579},"/api-reference/jsapi/ui-apis/alert#examples",[305],{"id":2963,"title":2964,"titles":2965,"content":2966,"level":590},"/api-reference/jsapi/ui-apis/alert#basic-alert","Basic Alert",[305,2895],"my.alert({\n  title: 'Payment Successful',\n  content: 'Your order has been processed',\n});",{"id":2968,"title":2969,"titles":2970,"content":2971,"level":590},"/api-reference/jsapi/ui-apis/alert#alert-with-custom-button","Alert with Custom Button",[305,2895],"my.alert({\n  title: 'Notification',\n  content: 'You have a new message',\n  buttonText: 'View',\n  success: () => {\n    console.log('User clicked View');\n  },\n});",{"id":2973,"title":1914,"titles":2974,"content":2975,"level":579},"/api-reference/jsapi/ui-apis/alert#related-links",[305],"my.confirm - Confirmation dialog with two buttonsmy.prompt - Prompt dialog with text input html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":310,"title":192,"titles":2977,"content":2978,"level":573},[],"Display a confirmation dialog with two action buttons for user decision.",{"id":2980,"title":115,"titles":2981,"content":2982,"level":579},"/api-reference/jsapi/ui-apis/confirm#overview",[192],"my.confirm displays a confirmation box with two buttons, allowing users to confirm or cancel an action. The success callback receives a result indicating which button was pressed.",{"id":2984,"title":2835,"titles":2985,"content":2986,"level":579},"/api-reference/jsapi/ui-apis/confirm#sample-code",[192],"my.confirm({\n  title: 'Tips',\n  content: 'Do you want to check the courier number: 1234567890?',\n  confirmButtonText: 'Inquire now',\n  cancelButtonText: 'Not needed',\n  success: (result) => {\n    my.alert({\n      title: `${result.confirm}`,\n    });\n  },\n});",{"id":2988,"title":2682,"titles":2989,"content":2990,"level":579},"/api-reference/jsapi/ui-apis/confirm#parameters",[192],"PropertyTypeRequiredDescriptiontitleStringNoTitle of the confirm box.contentStringNoContent of the confirm box.confirmButtonTextStringNoOK button text, which is \"OK\" by default.cancelButtonTextStringNoCancel button text, which is \"Cancel\" by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":2992,"title":2929,"titles":2993,"content":2994,"level":579},"/api-reference/jsapi/ui-apis/confirm#success-callback-function",[192],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionconfirmBooleanClick Confirm to return true; click Cancel to return false.",{"id":2996,"title":2844,"titles":2997,"content":2998,"level":579},"/api-reference/jsapi/ui-apis/confirm#usage-notes",[192],"The confirm dialog is modal - it blocks interaction until the user makes a choiceUse result.confirm to determine which button was pressed:\ntrue = Confirm button clickedfalse = Cancel button clickedDefault button texts are \"OK\" and \"Cancel\" if not customized",{"id":3000,"title":2895,"titles":3001,"content":637,"level":579},"/api-reference/jsapi/ui-apis/confirm#examples",[192],{"id":3003,"title":3004,"titles":3005,"content":3006,"level":590},"/api-reference/jsapi/ui-apis/confirm#basic-confirmation","Basic Confirmation",[192,2895],"my.confirm({\n  title: 'Delete Item',\n  content: 'Are you sure you want to delete this item?',\n  success: (result) => {\n    if (result.confirm) {\n      console.log('User confirmed deletion');\n      // Proceed with deletion\n    } else {\n      console.log('User cancelled');\n    }\n  },\n});",{"id":3008,"title":3009,"titles":3010,"content":3011,"level":590},"/api-reference/jsapi/ui-apis/confirm#custom-button-labels","Custom Button Labels",[192,2895],"my.confirm({\n  title: 'Leave Page',\n  content: 'You have unsaved changes. Do you want to leave?',\n  confirmButtonText: 'Leave',\n  cancelButtonText: 'Stay',\n  success: (result) => {\n    if (result.confirm) {\n      // Navigate away\n    }\n  },\n});",{"id":3013,"title":1914,"titles":3014,"content":3015,"level":579},"/api-reference/jsapi/ui-apis/confirm#related-links",[192],"my.alert - Simple alert dialogmy.prompt - Prompt dialog with text input html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"id":315,"title":314,"titles":3017,"content":3018,"level":573},[],"Display a prompt dialog with text input for collecting user input.",{"id":3020,"title":115,"titles":3021,"content":3022,"level":579},"/api-reference/jsapi/ui-apis/prompt#overview",[314],"my.prompt displays a dialog that prompts the user to enter text. The dialog includes a text input field, confirmation and cancel buttons, and returns the user's input through the success callback.",{"id":3024,"title":2835,"titles":3025,"content":3026,"level":579},"/api-reference/jsapi/ui-apis/prompt#sample-code",[314],"my.prompt({\n  title: 'Title',\n  message: 'Explain the current status and prompt the user solution. It is best not to exceed 3 lines.',\n  placeholder: 'Leave a message to a friend',\n  okButtonText: 'Confirm',\n  cancelButtonText: 'Cancel',\n  success: (result) => {\n    my.alert({\n      title: JSON.stringify(result),\n    });\n  },\n});",{"id":3028,"title":2682,"titles":3029,"content":3030,"level":579},"/api-reference/jsapi/ui-apis/prompt#parameters",[314],"PropertyTypeRequiredDescriptiontitleStringNoTitle of prompt box.messageStringYesText of prompt box, which is \"Enter contents here\" by default.placeholderStringNoPrompt text for the entry box.alignStringNoMessage alignment. Valid values are:• left• center• rightThe default value is center for both iOS and Android.okButtonTextStringNoOK button text, which is OK by default.cancelButtonTextStringNoCancel button text, which is Cancel by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3032,"title":2929,"titles":3033,"content":3034,"level":579},"/api-reference/jsapi/ui-apis/prompt#success-callback-function",[314],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionokBooleanClick OK to return true; click Cancel to return false.inputValueStringWhen OK is true, return the user's entry.",{"id":3036,"title":2844,"titles":3037,"content":3038,"level":579},"/api-reference/jsapi/ui-apis/prompt#usage-notes",[314],"The message parameter is requiredUse placeholder to provide helpful hints about what should be enteredThe align property controls message text alignment (left, center, or right)Check result.ok to determine if the user confirmed or cancelled:\ntrue = OK button clicked, inputValue contains user inputfalse = Cancel button clickedDefault button texts are \"OK\" and \"Cancel\" if not customized",{"id":3040,"title":2895,"titles":3041,"content":637,"level":579},"/api-reference/jsapi/ui-apis/prompt#examples",[314],{"id":3043,"title":3044,"titles":3045,"content":3046,"level":590},"/api-reference/jsapi/ui-apis/prompt#basic-prompt","Basic Prompt",[314,2895],"my.prompt({\n  title: 'Enter Name',\n  message: 'Please enter your full name',\n  placeholder: 'John Doe',\n  success: (result) => {\n    if (result.ok) {\n      console.log('User entered:', result.inputValue);\n    } else {\n      console.log('User cancelled');\n    }\n  },\n});",{"id":3048,"title":3049,"titles":3050,"content":3051,"level":590},"/api-reference/jsapi/ui-apis/prompt#custom-alignment-and-buttons","Custom Alignment and Buttons",[314,2895],"my.prompt({\n  title: 'Feedback',\n  message: 'How can we improve?',\n  placeholder: 'Share your thoughts',\n  align: 'left',\n  okButtonText: 'Submit',\n  cancelButtonText: 'Skip',\n  success: (result) => {\n    if (result.ok && result.inputValue) {\n      // Process feedback\n      console.log('Feedback:', result.inputValue);\n    }\n  },\n});",{"id":3053,"title":3054,"titles":3055,"content":3056,"level":590},"/api-reference/jsapi/ui-apis/prompt#validation-example","Validation Example",[314,2895],"my.prompt({\n  title: 'Enter Email',\n  message: 'Please provide your email address',\n  placeholder: 'email@example.com',\n  success: (result) => {\n    if (result.ok) {\n      const email = result.inputValue;\n      if (email && email.includes('@')) {\n        console.log('Valid email:', email);\n      } else {\n        my.alert({\n          title: 'Invalid Email',\n          content: 'Please enter a valid email address',\n        });\n      }\n    }\n  },\n});",{"id":3058,"title":1914,"titles":3059,"content":3060,"level":579},"/api-reference/jsapi/ui-apis/prompt#related-links",[314],"my.alert - Simple alert dialogmy.confirm - Confirmation dialog html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"id":320,"title":319,"titles":3062,"content":3063,"level":573},[],"Display an action sheet menu with multiple options for user selection.",{"id":3065,"title":115,"titles":3066,"content":3067,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#overview",[319],"my.showActionSheet displays an operation menu with multiple action buttons. Users can select one option, and the selected index is returned through the success callback. This is commonly used for presenting a list of actions or options.",{"id":3069,"title":2835,"titles":3070,"content":637,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#sample-code",[319],{"id":3072,"title":3073,"titles":3074,"content":3075,"level":590},"/api-reference/jsapi/ui-apis/show-action-sheet#html","HTML",[319,2835],"\u003Cdiv class=\"page\">\n  \u003Cdiv class=\"page-description\">Action sheet API\u003C/div>\n  \u003Cdiv class=\"page-section\">\n    \u003Ch3 class=\"page-section-title\">my.showActionSheet\u003C/h3>\n    \u003Cdiv class=\"page-section-demo\">\n      \u003Cbutton type=\"button\" class=\"primary\" onclick=\"showActionSheet()\">Show Action Sheet\u003C/button>\n    \u003C/div>\n  \u003C/div>\n\u003C/div>",{"id":3077,"title":3078,"titles":3079,"content":3080,"level":590},"/api-reference/jsapi/ui-apis/show-action-sheet#javascript","JavaScript",[319,2835],"function showActionSheet() {\n  my.showActionSheet({\n    title: 'ActionSheet',\n    items: ['Menu 1', 'Menu 2', 'Menu3'],\n    cancelButtonText: 'Cancel',\n    success: (res) => {\n      const btn = res.index === -1 ? 'Cancel' : 'No' + res.index + '';\n      my.alert({\n        title: `You clicked ${btn} button`,\n      });\n    },\n  });\n}",{"id":3082,"title":2682,"titles":3083,"content":3084,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#parameters",[319],"PropertyTypeRequiredDescriptiontitleStringNoThe title of the menu.itemsString ArrayYesThe text array of the menu button.cancelButtonTextStringNoText on the cancel button, which is \"Cancel\" by default.Note: This field is invalid for Android and the cancel button will not be displayed.destructiveButtonIndexNumberNoThis field specifies the index number of a specific button. The value starts from 0. Used for buttons to delete or clear data or the ones in similar scenarios. The default color is red.badgesObject ArrayNoFor the array with red option. See badges parameters below for the fields in the array.successFunctionNoThe callback function for a successful API call.failFunctionNoThe callback function for a failed API call.completeFunctionNoThe callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.",{"id":3086,"title":3087,"titles":3088,"content":3089,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#badges-parameters","Badges Parameters",[319],"PropertyTypeDescriptionindexNumberThe index of the option that needs use red marks, starting from 0.typeStringRed mark types. Valid values are:• none: no red mark• point: red mark• num: numerical red mark• text: texts in redtextStringCustomized red mark.• This field is optional when the value of type is none/point/more.• When the value of type is num, but the value of this field has decimals, not greater than 0, or not less than 100, this field is not displayed.",{"id":3091,"title":2844,"titles":3092,"content":3093,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#usage-notes",[319],"The items parameter is required and defines the menu optionsOn Android, the cancel button is not displayedUse destructiveButtonIndex to highlight destructive actions (like delete) in redThe success callback receives res.index:\n-1 = Cancel button clicked0, 1, 2... = Index of the selected menu itemUse badges to add visual indicators (dots, numbers, or text) to specific options",{"id":3095,"title":2895,"titles":3096,"content":637,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#examples",[319],{"id":3098,"title":3099,"titles":3100,"content":3101,"level":590},"/api-reference/jsapi/ui-apis/show-action-sheet#basic-action-sheet","Basic Action Sheet",[319,2895],"my.showActionSheet({\n  title: 'Choose Action',\n  items: ['Edit', 'Share', 'Delete'],\n  success: (res) => {\n    if (res.index === 0) {\n      console.log('Edit selected');\n    } else if (res.index === 1) {\n      console.log('Share selected');\n    } else if (res.index === 2) {\n      console.log('Delete selected');\n    } else if (res.index === -1) {\n      console.log('Cancelled');\n    }\n  },\n});",{"id":3103,"title":3104,"titles":3105,"content":3106,"level":590},"/api-reference/jsapi/ui-apis/show-action-sheet#destructive-action","Destructive Action",[319,2895],"my.showActionSheet({\n  title: 'Manage Item',\n  items: ['Edit', 'Share', 'Delete'],\n  destructiveButtonIndex: 2, // Highlights \"Delete\" in red\n  cancelButtonText: 'Cancel',\n  success: (res) => {\n    if (res.index === 2) {\n      my.confirm({\n        title: 'Confirm Delete',\n        content: 'Are you sure?',\n        success: (confirmRes) => {\n          if (confirmRes.confirm) {\n            // Proceed with deletion\n          }\n        },\n      });\n    }\n  },\n});",{"id":3108,"title":3109,"titles":3110,"content":3111,"level":590},"/api-reference/jsapi/ui-apis/show-action-sheet#with-badges","With Badges",[319,2895],"my.showActionSheet({\n  title: 'Notifications',\n  items: ['Messages', 'Updates', 'Settings'],\n  badges: [\n    { index: 0, type: 'num', text: '5' },\n    { index: 1, type: 'point' },\n  ],\n  success: (res) => {\n    console.log('Selected index:', res.index);\n  },\n});",{"id":3113,"title":1914,"titles":3114,"content":3115,"level":579},"/api-reference/jsapi/ui-apis/show-action-sheet#related-links",[319],"my.alert - Simple alert dialogmy.confirm - Confirmation dialog html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"id":325,"title":324,"titles":3117,"content":3118,"level":573},[],"Display and dismiss a loading indicator dialog.",{"id":3120,"title":115,"titles":3121,"content":3122,"level":579},"/api-reference/jsapi/ui-apis/show-loading#overview",[324],"my.showLoading displays a loading indicator dialog, typically used during asynchronous operations. my.hideLoading dismisses the loading dialog when the operation completes. Always pair my.showLoading with my.hideLoading to ensure the loading indicator is properly dismissed. The loading dialog blocks user interaction until it's hidden.",{"id":3124,"title":3125,"titles":3126,"content":3127,"level":579},"/api-reference/jsapi/ui-apis/show-loading#myshowloading","my.showLoading",[324],"Show the loading dialog.",{"id":3129,"title":2835,"titles":3130,"content":3131,"level":590},"/api-reference/jsapi/ui-apis/show-loading#sample-code",[324,3125],"my.showLoading({\n  content: 'loading...',\n  delay: 1000,\n});",{"id":3133,"title":2682,"titles":3134,"content":3135,"level":590},"/api-reference/jsapi/ui-apis/show-loading#parameters",[324,3125],"PropertyTypeRequiredDescriptioncontentStringNoText contents of loading.delayNumberNoDisplaying delay, in ms, 0 by default. If my.hideLoading was called before this time, it is not displayed.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3137,"title":3138,"titles":3139,"content":3140,"level":579},"/api-reference/jsapi/ui-apis/show-loading#myhideloading","my.hideLoading",[324],"Hide the loading dialog.",{"id":3142,"title":2835,"titles":3143,"content":3144,"level":590},"/api-reference/jsapi/ui-apis/show-loading#sample-code-1",[324,3138],"my.hideLoading(); Example with page context: // Show loading on page load\nwindow.onload = function() {\n  my.showLoading();\n\n  setTimeout(() => {\n    my.hideLoading({\n      page: this, // Prevents switching to other pages when execution\n    });\n  }, 4000);\n}",{"id":3146,"title":2682,"titles":3147,"content":3148,"level":590},"/api-reference/jsapi/ui-apis/show-loading#parameters-1",[324,3138],"PropertyTypeRequiredDescriptionpageObjectNoSpecifically it means the current page instance. In some scenarios, it is required to specify the exact page for hideLoading.",{"id":3150,"title":2844,"titles":3151,"content":3152,"level":579},"/api-reference/jsapi/ui-apis/show-loading#usage-notes",[324],"Delay behavior: If delay is set and my.hideLoading is called before the delay expires, the loading indicator will not be displayed at allPage context: Use the page parameter in my.hideLoading when you need to ensure the loading is dismissed on a specific page instanceModal behavior: The loading dialog blocks user interaction while displayedPairing: Always call my.hideLoading() after my.showLoading() to avoid blocking the UI indefinitely",{"id":3154,"title":3155,"titles":3156,"content":637,"level":579},"/api-reference/jsapi/ui-apis/show-loading#complete-example","Complete Example",[324],{"id":3158,"title":3159,"titles":3160,"content":3161,"level":590},"/api-reference/jsapi/ui-apis/show-loading#basic-loading-flow","Basic Loading Flow",[324,3155],"// Show loading\nmy.showLoading({\n  content: 'Processing...',\n});\n\n// Perform async operation\nsetTimeout(() => {\n  // Hide loading when done\n  my.hideLoading();\n\n  my.alert({\n    title: 'Complete',\n    content: 'Operation finished successfully',\n  });\n}, 2000);",{"id":3163,"title":3164,"titles":3165,"content":3166,"level":590},"/api-reference/jsapi/ui-apis/show-loading#with-delay","With Delay",[324,3155],"my.showLoading({\n  content: 'Loading data...',\n  delay: 500, // Only show if operation takes longer than 500ms\n});\n\n// Fetch data\nfetchData().then(() => {\n  my.hideLoading();\n});",{"id":3168,"title":3169,"titles":3170,"content":3171,"level":590},"/api-reference/jsapi/ui-apis/show-loading#with-page-context","With Page Context",[324,3155],"// Show loading on page load\nwindow.onload = function() {\n  my.showLoading({\n    content: 'Loading...',\n  });\n\n  // Simulate async operation\n  setTimeout(() => {\n    my.hideLoading({\n      page: this, // Ensures hideLoading targets correct page instance\n    });\n  }, 3000);\n}",{"id":3173,"title":3174,"titles":3175,"content":3176,"level":590},"/api-reference/jsapi/ui-apis/show-loading#fetch-data-example","Fetch Data Example",[324,3155],"function loadData() {\n  my.showLoading({\n    content: 'Loading data...',\n  });\n\n  fetch('/api/data')\n    .then(response => response.json())\n    .then(data => {\n      // Update your UI with data\n      updateUI(data);\n      my.hideLoading();\n    })\n    .catch(error => {\n      my.hideLoading();\n      my.alert({\n        title: 'Error',\n        content: 'Failed to load data',\n      });\n    });\n}",{"id":3178,"title":1914,"titles":3179,"content":3180,"level":579},"/api-reference/jsapi/ui-apis/show-loading#related-links",[324],"my.showToast / my.hideToast - Toast notifications html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"id":330,"title":329,"titles":3182,"content":3183,"level":573},[],"Display and dismiss a toast notification with optional icon.",{"id":3185,"title":115,"titles":3186,"content":3187,"level":579},"/api-reference/jsapi/ui-apis/show-toast#overview",[329],"my.showToast displays a toast notification that automatically disappears after a specified duration. Toasts are non-blocking notifications used for brief feedback messages. my.hideToast manually dismisses the toast before its duration expires. Toast notifications are lightweight and non-intrusive, making them ideal for success messages, status updates, and brief feedback that doesn't require user interaction.",{"id":3189,"title":3190,"titles":3191,"content":3192,"level":579},"/api-reference/jsapi/ui-apis/show-toast#myshowtoast","my.showToast",[329],"Show the toast dialog, which disappears with the specified duration.",{"id":3194,"title":2835,"titles":3195,"content":3196,"level":590},"/api-reference/jsapi/ui-apis/show-toast#sample-code",[329,3190],"my.showToast({\n  type: 'success',\n  content: 'Success',\n  duration: 3000,\n  success: () => {\n    my.alert({\n      title: 'toast is missing',\n    });\n  },\n});",{"id":3198,"title":2682,"titles":3199,"content":3200,"level":590},"/api-reference/jsapi/ui-apis/show-toast#parameters",[329,3190],"PropertyTypeRequiredDescriptioncontentStringNoText content.typeStringNoToast type, showing the related icon, none by default. Supporting success/fail/exception/none. If it is exception, content is mandatory.durationNumberNoDisplaying duration, in ms, 2000 by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3202,"title":3203,"titles":3204,"content":3205,"level":579},"/api-reference/jsapi/ui-apis/show-toast#myhidetoast","my.hideToast",[329],"Hide the toast dialog.",{"id":3207,"title":2835,"titles":3208,"content":3209,"level":590},"/api-reference/jsapi/ui-apis/show-toast#sample-code-1",[329,3203],"my.hideToast()",{"id":3211,"title":2682,"titles":3212,"content":3213,"level":590},"/api-reference/jsapi/ui-apis/show-toast#parameters-1",[329,3203],"PropertyTypeRequiredDescriptionsuccessFunctionNoThe callback function for a successful API call.failFunctionNoThe callback function for a failed API call.completeFunctionNoThe callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.",{"id":3215,"title":3216,"titles":3217,"content":3218,"level":579},"/api-reference/jsapi/ui-apis/show-toast#toast-types","Toast Types",[329],"The type parameter controls the icon displayed with the toast: success - Shows a success checkmark iconfail - Shows a failure/error iconexception - Shows an exception icon (requires content to be specified)none - No icon, text only",{"id":3220,"title":2844,"titles":3221,"content":3222,"level":579},"/api-reference/jsapi/ui-apis/show-toast#usage-notes",[329],"Auto-dismiss: Toasts automatically disappear after the duration (default: 2000ms)Manual dismiss: Call my.hideToast() to dismiss a toast before its duration expiresNon-blocking: Unlike loading dialogs, toasts don't block user interactionType requirement: When using type: 'exception', the content parameter is mandatoryBest practices: Keep toast messages brief and use appropriate icons for the message type",{"id":3224,"title":3225,"titles":3226,"content":637,"level":579},"/api-reference/jsapi/ui-apis/show-toast#complete-examples","Complete Examples",[329],{"id":3228,"title":3229,"titles":3230,"content":3231,"level":590},"/api-reference/jsapi/ui-apis/show-toast#success-message","Success Message",[329,3225],"my.showToast({\n  type: 'success',\n  content: 'Saved successfully',\n  duration: 2000,\n});",{"id":3233,"title":3234,"titles":3235,"content":3236,"level":590},"/api-reference/jsapi/ui-apis/show-toast#error-message","Error Message",[329,3225],"my.showToast({\n  type: 'fail',\n  content: 'Failed to save',\n  duration: 3000,\n});",{"id":3238,"title":3239,"titles":3240,"content":3241,"level":590},"/api-reference/jsapi/ui-apis/show-toast#exception-with-manual-dismiss","Exception with Manual Dismiss",[329,3225],"my.showToast({\n  type: 'exception',\n  content: 'Network error occurred',\n  duration: 5000,\n});\n\n// Manually hide after 2 seconds\nsetTimeout(() => {\n  my.hideToast();\n}, 2000);",{"id":3243,"title":3244,"titles":3245,"content":3246,"level":590},"/api-reference/jsapi/ui-apis/show-toast#text-only-toast","Text-Only Toast",[329,3225],"my.showToast({\n  type: 'none',\n  content: 'Processing your request',\n  duration: 2000,\n});",{"id":3248,"title":3249,"titles":3250,"content":3251,"level":590},"/api-reference/jsapi/ui-apis/show-toast#with-success-callback","With Success Callback",[329,3225],"my.showToast({\n  type: 'success',\n  content: 'Operation completed',\n  duration: 2000,\n  success: () => {\n    console.log('Toast displayed');\n    // Navigate or perform next action\n  },\n});",{"id":3253,"title":3254,"titles":3255,"content":3256,"level":590},"/api-reference/jsapi/ui-apis/show-toast#form-submission-example","Form Submission Example",[329,3225],"function submitForm() {\n  my.showLoading({\n    content: 'Submitting...',\n  });\n\n  // Submit form\n  fetch('/api/submit', {\n    method: 'POST',\n    body: JSON.stringify(formData),\n  })\n    .then(response => {\n      my.hideLoading();\n\n      if (response.ok) {\n        my.showToast({\n          type: 'success',\n          content: 'Form submitted successfully',\n          duration: 2000,\n        });\n      } else {\n        my.showToast({\n          type: 'fail',\n          content: 'Submission failed',\n          duration: 3000,\n        });\n      }\n    })\n    .catch(error => {\n      my.hideLoading();\n      my.showToast({\n        type: 'exception',\n        content: 'Network error',\n        duration: 3000,\n      });\n    });\n}",{"id":3258,"title":1914,"titles":3259,"content":3260,"level":579},"/api-reference/jsapi/ui-apis/show-toast#related-links",[329],"my.showLoading / my.hideLoading - Loading indicatormy.alert - Alert dialog html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"id":335,"title":334,"titles":3262,"content":3263,"level":573},[],"Select a phone number from the device's contact directory.",{"id":3265,"title":115,"titles":3266,"content":3267,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#overview",[334],"my.choosePhoneContact allows users to select a phone number from their local system directory. This API opens the device's contact picker and returns the selected contact's information.",{"id":3269,"title":2835,"titles":3270,"content":3271,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#sample-code",[334],"my.choosePhoneContact({\n  success: (res) => {\n    my.alert({\n      content: 'choosePhoneContact response: ' + JSON.stringify(res)\n    });\n  },\n  fail: (res) => {\n    my.alert({\n      content: 'choosePhoneContact response: ' + JSON.stringify(res)\n    });\n  },\n});",{"id":3273,"title":2682,"titles":3274,"content":3275,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#parameters",[334],"PropertyTypeRequiredDescriptionsuccessFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3277,"title":2929,"titles":3278,"content":3279,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#success-callback-function",[334],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionnameStringSelected contact name.mobileStringSelected contact phone.",{"id":3281,"title":3282,"titles":3283,"content":3284,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#error-code","Error Code",[334],"Error CodeDescription10No permission.11The user cancels the operation (or the device does not authorize use of the directory).",{"id":3286,"title":2844,"titles":3287,"content":3288,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#usage-notes",[334],"Requires permission to access the device's contact listUser can cancel the operation at any timeThe API will fail if permission is denied or not granted",{"id":3290,"title":1914,"titles":3291,"content":3292,"level":579},"/api-reference/jsapi/ui-apis/choose-phone-contact#related-links",[334],"my.alert - Alert dialog html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":340,"title":339,"titles":3294,"content":3295,"level":573},[],"Display a date picker dialog for selecting dates and times.",{"id":3297,"title":115,"titles":3298,"content":3299,"level":579},"/api-reference/jsapi/ui-apis/date-picker#overview",[339],"my.datePicker opens a date selection dialog that allows users to pick dates and times in various formats. By default, the current date and time are used if not manually selected.",{"id":3301,"title":2835,"titles":3302,"content":3303,"level":579},"/api-reference/jsapi/ui-apis/date-picker#sample-code",[339],"my.datePicker({\n  format: 'yyyy-MM-dd',\n  currentDate: '2016-10-10',\n  startDate: '2016-10-9',\n  endDate: '2017-10-9',\n  success: (res) => {\n    my.alert({\n      title: 'datePicker response: ' + JSON.stringify(res)\n    });\n  },\n});",{"id":3305,"title":2682,"titles":3306,"content":3307,"level":579},"/api-reference/jsapi/ui-apis/date-picker#parameters",[339],"PropertyTypeRequiredDescriptionformatStringNoThe returned date format.currentDateStringNoThe date and time initially selected. By default, the current time date and time are used.startDateStringNoMinimum date and time.endDateStringNoMaximum date and time.successFunctionYesThe callback function for a successful API call.failFunctionYesThe callback function for a failed API call.completeFunctionYesThe callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.",{"id":3309,"title":3310,"titles":3311,"content":3312,"level":579},"/api-reference/jsapi/ui-apis/date-picker#date-formats","Date Formats",[339],"The returned date formats include: yyyy-MM-dd (default)HH:mmyyyy-MM-dd HH:mmyyyy-MMyyyy",{"id":3314,"title":2929,"titles":3315,"content":3316,"level":579},"/api-reference/jsapi/ui-apis/date-picker#success-callback-function",[339],"PropertyTypeDescriptiondateStringThe selected date.",{"id":3318,"title":3282,"titles":3319,"content":3320,"level":579},"/api-reference/jsapi/ui-apis/date-picker#error-code",[339],"Error CodeDescriptionSolution11The user cancels the operation and no action is required.The user cancelled the operation and no action is required.",{"id":3322,"title":2844,"titles":3323,"content":3324,"level":579},"/api-reference/jsapi/ui-apis/date-picker#usage-notes",[339],"If currentDate, startDate, or endDate are not specified, the current date and time are used by defaultThe format parameter determines the date picker's mode and return formatUsers can cancel the picker, which triggers the fail callback with error code 11",{"id":3326,"title":1914,"titles":3327,"content":3328,"level":579},"/api-reference/jsapi/ui-apis/date-picker#related-links",[339],"my.multiLevelSelect - Multi-level selector html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":350,"title":349,"titles":3330,"content":3331,"level":573},[],"Choose an image from the camera or gallery of a device.",{"id":3333,"title":115,"titles":3334,"content":3335,"level":579},"/api-reference/jsapi/media-apis/choose-image#overview",[349],"my.chooseImage allows users to select an image from their device's camera or photo gallery. The API returns file paths to the selected images.",{"id":3337,"title":2835,"titles":3338,"content":3339,"level":579},"/api-reference/jsapi/media-apis/choose-image#sample-code",[349],"my.chooseImage({\n  success: (res) => {\n    img.src = res.apFilePaths[0];\n  },\n});",{"id":3341,"title":2682,"titles":3342,"content":3343,"level":579},"/api-reference/jsapi/media-apis/choose-image#parameters",[349],"PropertyTypeRequiredDescriptionsizeTypeStringArrayNoOriginal image, compressed image, both by default.sourceTypeString ArrayNoCamera or album, ['camera','album'] by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3345,"title":2929,"titles":3346,"content":3347,"level":579},"/api-reference/jsapi/media-apis/choose-image#success-callback-function",[349],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionapFilePathsString ArrayImage file description.",{"id":3349,"title":3282,"titles":3350,"content":3351,"level":579},"/api-reference/jsapi/media-apis/choose-image#error-code",[349],"ErrorDescription11User cancels operation.",{"id":3353,"title":2844,"titles":3354,"content":3355,"level":579},"/api-reference/jsapi/media-apis/choose-image#usage-notes",[349],"The sizeType parameter controls whether to return original or compressed imagesThe sourceType parameter lets you specify camera, album, or bothUsers can cancel the image selection, triggering error code 11",{"id":3357,"title":1914,"titles":3358,"content":3359,"level":579},"/api-reference/jsapi/media-apis/choose-image#related-links",[349],"my.previewImage - Preview imagesmy.saveImage - Save images html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":355,"title":354,"titles":3361,"content":3362,"level":573},[],"Preview images in full-screen mode with zoom and swipe capabilities.",{"id":3364,"title":115,"titles":3365,"content":3366,"level":579},"/api-reference/jsapi/media-apis/preview-image#overview",[354],"my.previewImage displays images in full-screen preview mode. Users can swipe between images, zoom in/out, and view images from a list of URLs. The Preview image's \"local image path\" is not supported.",{"id":3368,"title":2835,"titles":3369,"content":3370,"level":579},"/api-reference/jsapi/media-apis/preview-image#sample-code",[354],"my.previewImage({\n  current: 2,\n  urls: [\n    'https://img.example.com/example1.jpg',\n    'https://img.example.com/example2.jpg',\n    'https://img.example.com/example3.jpg'\n  ],\n});",{"id":3372,"title":2682,"titles":3373,"content":3374,"level":579},"/api-reference/jsapi/media-apis/preview-image#parameters",[354],"The incoming parameter is of the Object type with the following attributes: | Property | Type | Required | Description |\n| --- | --- | --- |\n| urls | Array | Yes | Http url list of the images to be previewed. |\n| current | Number | No | Index of the current displayed image, 0 by default, indicating the first image in the URLs. |\n| success | Function | No | Callback function upon call success. |\n| fail | Function | No | Callback function upon call failure. |\n| complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure). |",{"id":3376,"title":2844,"titles":3377,"content":3378,"level":579},"/api-reference/jsapi/media-apis/preview-image#usage-notes",[354],"Only HTTP/HTTPS URLs are supported - local image paths are not supportedThe current parameter sets which image is displayed first (zero-indexed)Users can swipe left/right to navigate between imagesPinch to zoom is supported",{"id":3380,"title":1914,"titles":3381,"content":3382,"level":579},"/api-reference/jsapi/media-apis/preview-image#related-links",[354],"my.chooseImage - Choose imagesmy.saveImage - Save images html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":360,"title":359,"titles":3384,"content":3385,"level":573},[],"Save online images to the device camera gallery.",{"id":3387,"title":115,"titles":3388,"content":3389,"level":579},"/api-reference/jsapi/media-apis/save-image#overview",[359],"my.saveImage saves online images from a URL to the device's camera gallery.",{"id":3391,"title":2835,"titles":3392,"content":3393,"level":579},"/api-reference/jsapi/media-apis/save-image#sample-code",[359],"my.saveImage({\n  url: 'https://img.example.com/example.jpg'\n});",{"id":3395,"title":2682,"titles":3396,"content":3397,"level":579},"/api-reference/jsapi/media-apis/save-image#parameters",[359],"PropertyTypeRequiredDescriptionurlStringYesURL of the image to be saved.showActionSheetBooleanNoWhether to show the menu when saving image. By default, it is false.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3399,"title":3282,"titles":3400,"content":3401,"level":579},"/api-reference/jsapi/media-apis/save-image#error-code",[359],"ErrorDescription2Invalid parameter, no url parameter transferred.15Album right not enabled (iOS only).16Insufficient album storage on cellphone (iOS only).17Other errors during picture saving.",{"id":3403,"title":2844,"titles":3404,"content":3405,"level":579},"/api-reference/jsapi/media-apis/save-image#usage-notes",[359],"The url parameter is required and must be a valid image URLSet showActionSheet: true to display a menu when savingThe image is saved directly to the device's photo galleryRequires proper permissions to write to the gallery",{"id":3407,"title":1914,"titles":3408,"content":3409,"level":579},"/api-reference/jsapi/media-apis/save-image#related-links",[359],"my.chooseImage - Choose imagesmy.previewImage - Preview images html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":364,"title":363,"titles":3411,"content":3412,"level":573},[],"Get information about an image including dimensions, path, and orientation.",{"id":3414,"title":115,"titles":3415,"content":3416,"level":579},"/api-reference/jsapi/media-apis/get-image-info#overview",[363],"my.getImageInfo retrieves detailed information about an image, including its width, height, path, orientation, and format.",{"id":3418,"title":2835,"titles":3419,"content":3420,"level":579},"/api-reference/jsapi/media-apis/get-image-info#sample-code",[363],"// Network picture path\nmy.getImageInfo({\n  src: 'https://img.example.com/example.jpg',\n  success: (res) => {\n    console.log(JSON.stringify(res));\n  }\n});\n\n// apFilePath from chooseImage\nmy.chooseImage({\n  success: (res) => {\n    my.getImageInfo({\n      src: res.apFilePaths[0],\n      success: (res) => {\n        console.log(JSON.stringify(res));\n      }\n    });\n  },\n});\n\n// Relative path\nmy.getImageInfo({\n  src: 'image/api.png',\n  success: (res) => {\n    console.log(JSON.stringify(res));\n  }\n});",{"id":3422,"title":2682,"titles":3423,"content":3424,"level":579},"/api-reference/jsapi/media-apis/get-image-info#parameters",[363],"The incoming parameter is of the Object type with the following attributes: PropertyTypeRequiredDescriptionsrcStringNoPicture path, supporting network picture path, apFilePath path and relative path.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3426,"title":2929,"titles":3427,"content":3428,"level":579},"/api-reference/jsapi/media-apis/get-image-info#success-callback-function",[363],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionwidthNumberPicture width (in px).heightNumberPicture height (in px).pathStringLocal path of picture.orientationStringReturn picture orientation. Effective values are listed below.typeStringReturn picture format.",{"id":3430,"title":3431,"titles":3432,"content":3433,"level":579},"/api-reference/jsapi/media-apis/get-image-info#orientation-parameter-description","Orientation Parameter Description",[363],"EnumeratorDescriptionupDefault.down180-Degree rotation.leftRotate by 90 degree counterclockwise.rightRotate by 90 degree clockwise.up-mirroredSame as up except for flipping horizontally.down-mirroredSame as down except for flipping horizontally.left-mirroredSame as left except for flipping vertically.right-mirroredSame as right except for flipping vertically.",{"id":3435,"title":2844,"titles":3436,"content":3437,"level":579},"/api-reference/jsapi/media-apis/get-image-info#usage-notes",[363],"Supports network URLs, apFilePath (from my.chooseImage), and relative pathsReturns comprehensive image metadata including dimensions and orientationUseful for validating image properties before upload or display",{"id":3439,"title":1914,"titles":3440,"content":3441,"level":579},"/api-reference/jsapi/media-apis/get-image-info#related-links",[363],"my.chooseImage - Choose imagesmy.compressImage - Compress images html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":369,"title":368,"titles":3443,"content":3444,"level":573},[],"Compress large images to meet size restrictions for mini programs.",{"id":3446,"title":115,"titles":3447,"content":3448,"level":579},"/api-reference/jsapi/media-apis/compress-image#overview",[368],"my.compressImage compresses large images to fulfill the size restrictions from some mini programs. You can specify the compression quality level based on your needs.",{"id":3450,"title":2835,"titles":3451,"content":3452,"level":579},"/api-reference/jsapi/media-apis/compress-image#sample-code",[368],"my.compressImage({\n  apFilePaths: ['path/to/image1.jpg', 'path/to/image2.jpg'],\n  compressLevel: 2,\n  success: (res) => {\n    console.log('Compressed images:', res.apFilePaths);\n  },\n  fail: (err) => {\n    console.log('Compression failed:', err);\n  }\n});",{"id":3454,"title":2682,"titles":3455,"content":3456,"level":579},"/api-reference/jsapi/media-apis/compress-image#parameters",[368],"PropertyTypeRequiredDescriptionapFilePathsArrayYesAn array of the image paths to be compressed.compressLevelintNoThe image quality after the compress. Valid values are:• 0: Low quality• 1: Medium quality• 2: High quality• 4: The quality depends on the network. When the network is Wi-Fi, the image is compressed to the high-quality image. Otherwise, the image is compressed to the medium-quality image.The default value is 4.successFunctionNoThe callback method that indicates a successful call.failFunctionNoThe callback method that indicates a failed call.completeFunctionNoThe callback method that indicates the call is completed (this will be executed regardless of whether the call succeeds or fails).",{"id":3458,"title":2929,"titles":3459,"content":3460,"level":579},"/api-reference/jsapi/media-apis/compress-image#success-callback-function",[368],"PropertyTypeRequiredDescriptionapFilePathsArrayYesThe local file path of the compressed image.",{"id":3462,"title":3282,"titles":3463,"content":3464,"level":579},"/api-reference/jsapi/media-apis/compress-image#error-code",[368],"Error CodeError MessageDescription2Compress failedFailed to compress all images.Invalid parameterFailed to compress one of all images.",{"id":3466,"title":2844,"titles":3467,"content":3468,"level":579},"/api-reference/jsapi/media-apis/compress-image#usage-notes",[368],"Multiple images can be compressed in a single callThe compressLevel parameter controls the quality-size tradeoffLevel 4 (default) automatically adjusts based on network conditionsReturns the compressed image paths in the success callback",{"id":3470,"title":1914,"titles":3471,"content":3472,"level":579},"/api-reference/jsapi/media-apis/compress-image#related-links",[368],"my.chooseImage - Choose imagesmy.getImageInfo - Get image info html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":374,"title":373,"titles":3474,"content":3475,"level":573},[],"Shoot a video or choose a video from the album.",{"id":3477,"title":115,"titles":3478,"content":3479,"level":579},"/api-reference/jsapi/media-apis/choose-video#overview",[373],"my.chooseVideo allows users to shoot a video with the camera or choose a video from the device album. The API returns information about the selected video including its path, duration, size, and dimensions.",{"id":3481,"title":2835,"titles":3482,"content":3483,"level":579},"/api-reference/jsapi/media-apis/choose-video#sample-code",[373],"my.chooseVideo({\n  sourceType: ['album', 'camera'],\n  maxDuration: 60,\n  camera: 'back',\n  success: (res) => {\n    console.log(res);\n  },\n  fail: (error) => {\n    console.log(error);\n  },\n  complete: () => {\n    console.log('The callback function to be executed whether the request is successful or fail');\n  }\n});",{"id":3485,"title":2682,"titles":3486,"content":3487,"level":579},"/api-reference/jsapi/media-apis/choose-video#parameters",[373],"The incoming parameter is of the Object type with the following properties: PropertyData typeRequiredDescriptionsourceTypeArray\u003CString>NoIndicates the sources of the video.Valid values are:• album: Choose a video from the album on a mobile device.• camera: Shoot a video with the camera on a mobile device.By default, the value is ['album','camera'].compressedBooleanNoSpecifies whether to compress the selected video file. For iOS, the video file is always compressed.By default, the value is true, which means the selected video file is compressed.maxDurationNumberNoIndicates the maximum amount of time to shoot a video, in seconds.By default, the value is 60, which means the maximum amount of time is 60 seconds.cameraStringNoIndicates which camera (front or back camera) is opened when launching the camera app.For some Android devices, this configuration is not supported by the system ROM and thus cannot take effect.Valid values are:• back: The back camera is opened.• front: The front camera is opened.By default, the value is back.successFunctionNoThe callback function to be executed when the request is successful.failFunctionNoThe callback function to be executed when the request is failed.completeFunctionNoThe callback function to be executed when the request is completed (to be executed whether the request is successful or failed).",{"id":3489,"title":2929,"titles":3490,"content":3491,"level":579},"/api-reference/jsapi/media-apis/choose-video#success-callback-function",[373],"The following table provides the properties in the success callback function: PropertyTypeDescriptiontempFilePathStringIndicates the temporary file path of the selected video.durationNumberIndicates the length of the selected video.sizeNumberIndicates the size of the selected video.heightNumberIndicates the height of the selected video.widthNumberIndicates the width of the selected video.",{"id":3493,"title":1909,"titles":3494,"content":3495,"level":579},"/api-reference/jsapi/media-apis/choose-video#error-codes",[373],"The following table provides the possible error codes and messages in the API call: Error codeError messageSolution2Invalid parameters.Check the values in your request and provide correct parameters.3An unknown error occurs.Check whether the calling process is normal. If not resolved, contact our technical support to troubleshoot this issue.11The operation was canceled by the user.Normal user interaction and no further processing is required.12An error occurs in data processing.Call the API again.13The file size exceeds the limit.Check whether you have enough RAM.14No access to camera.Check app permissions for camera.15No access to album.Check app permissions for album.",{"id":3497,"title":2844,"titles":3498,"content":3499,"level":579},"/api-reference/jsapi/media-apis/choose-video#usage-notes",[373],"The sourceType parameter controls whether to use camera, album, or bothFor iOS devices, videos are always compressed regardless of the compressed settingThe camera parameter may not work on some Android devices due to ROM limitationsThe maxDuration parameter only applies when shooting a new video, not when selecting from album",{"id":3501,"title":1914,"titles":3502,"content":3503,"level":579},"/api-reference/jsapi/media-apis/choose-video#related-links",[373],"my.chooseImage - Choose images html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":384,"title":383,"titles":3505,"content":3506,"level":573},[],"Get cached data from local storage by key.",{"id":3508,"title":115,"titles":3509,"content":3510,"level":579},"/api-reference/jsapi/storage-apis/get-storage#overview",[383],"my.getStorage retrieves cached data from local storage. This is an asynchronous interface that supports isolation between embedded webview cache and Mini Program cache. Getting the cache of the specified key of embedded webview will not return the cached data of the same key of the Mini Program.",{"id":3512,"title":2835,"titles":3513,"content":3514,"level":579},"/api-reference/jsapi/storage-apis/get-storage#sample-code",[383],"my.getStorage({\n  key: 'currentCity',\n  success: function(res) {\n    my.alert({content: 'Success' + res.data.cityName});\n  },\n  fail: function(res){\n    my.alert({content: res.errorMessage});\n  }\n});",{"id":3516,"title":2682,"titles":3517,"content":3518,"level":579},"/api-reference/jsapi/storage-apis/get-storage#parameters",[383],"PropertyTypeRequiredDescriptionkeyStringYesCache data key.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3520,"title":2929,"titles":3521,"content":3522,"level":579},"/api-reference/jsapi/storage-apis/get-storage#success-callback-function",[383],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptiondataObject/StringCorresponding content of the key.",{"id":3524,"title":2844,"titles":3525,"content":3526,"level":579},"/api-reference/jsapi/storage-apis/get-storage#usage-notes",[383],"This is an asynchronous interfaceStorage is isolated between embedded webview and Mini ProgramRetrieve data using the same key that was used in my.setStorage",{"id":3528,"title":1914,"titles":3529,"content":3530,"level":579},"/api-reference/jsapi/storage-apis/get-storage#related-links",[383],"my.setStorage - Store datamy.removeStorage - Remove datamy.clearStorage - Clear all data html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":389,"title":388,"titles":3532,"content":3533,"level":573},[],"Store data with a specified key in local cache.",{"id":3535,"title":115,"titles":3536,"content":3537,"level":579},"/api-reference/jsapi/storage-apis/set-storage#overview",[388],"my.setStorage stores data with a specified key in the local cache. This will overwrite the original data using the same key. This is an asynchronous interface that supports the isolation of webview-embedded storage and the Mini Program storage. Specifying key storage data in embedded webview does not overlap the data corresponding to the same key of the Mini Program itself.",{"id":3539,"title":2835,"titles":3540,"content":3541,"level":579},"/api-reference/jsapi/storage-apis/set-storage#sample-code",[388],"my.setStorage({\n  key: 'currentCity',\n  data: {\n    cityName: 'London',\n    adCode: '330100',\n    spell: ' London',\n  },\n  success: function() {\n    my.alert({content: 'Set Success'});\n  }\n});",{"id":3543,"title":2682,"titles":3544,"content":3545,"level":579},"/api-reference/jsapi/storage-apis/set-storage#parameters",[388],"PropertyTypeRequiredDescriptionkeyStringYesCache data key.dataObject/StringYesData to be cached.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3547,"title":2844,"titles":3548,"content":3549,"level":579},"/api-reference/jsapi/storage-apis/set-storage#usage-notes",[388],"When a single data is converted into a string, the string length is maximum 200*1024For the same user, the cache of one Mini Program has an upper limit 10MBThis is an asynchronous interfaceStorage is isolated between embedded webview and Mini ProgramSetting data with an existing key will overwrite the previous value",{"id":3551,"title":1914,"titles":3552,"content":3553,"level":579},"/api-reference/jsapi/storage-apis/set-storage#related-links",[388],"my.getStorage - Get datamy.removeStorage - Remove datamy.clearStorage - Clear all data html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":394,"title":393,"titles":3555,"content":3556,"level":573},[],"Remove cached data by key from local storage.",{"id":3558,"title":115,"titles":3559,"content":3560,"level":579},"/api-reference/jsapi/storage-apis/remove-storage#overview",[393],"my.removeStorage removes cached data from local storage. This is an asynchronous interface. Removing the webview embedded storage data will not remove the storage data of the Mini Program.",{"id":3562,"title":2835,"titles":3563,"content":3564,"level":579},"/api-reference/jsapi/storage-apis/remove-storage#sample-code",[393],"my.removeStorage({\n  key: 'currentCity',\n  success: function(){\n    my.alert({content: 'remove success'});\n  }\n});",{"id":3566,"title":2682,"titles":3567,"content":3518,"level":579},"/api-reference/jsapi/storage-apis/remove-storage#parameters",[393],{"id":3569,"title":2844,"titles":3570,"content":3571,"level":579},"/api-reference/jsapi/storage-apis/remove-storage#usage-notes",[393],"This is an asynchronous interfaceStorage is isolated between embedded webview and Mini ProgramRemoving embedded webview storage does not affect Mini Program storageIf the key does not exist, the operation will still succeed",{"id":3573,"title":1914,"titles":3574,"content":3575,"level":579},"/api-reference/jsapi/storage-apis/remove-storage#related-links",[393],"my.getStorage - Get datamy.setStorage - Store datamy.clearStorage - Clear all data html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":399,"title":398,"titles":3577,"content":3578,"level":573},[],"Clear all local data cache.",{"id":3580,"title":115,"titles":3581,"content":3582,"level":579},"/api-reference/jsapi/storage-apis/clear-storage#overview",[398],"my.clearStorage clears the local data cache. This is an asynchronous interface. Clearing the webview embedded storage data will not clear the storage data of the Mini Program.",{"id":3584,"title":2835,"titles":3585,"content":3586,"level":579},"/api-reference/jsapi/storage-apis/clear-storage#sample-code",[398],"my.clearStorage();",{"id":3588,"title":2844,"titles":3589,"content":3590,"level":579},"/api-reference/jsapi/storage-apis/clear-storage#usage-notes",[398],"This is an asynchronous interfaceStorage is isolated between embedded webview and Mini ProgramClearing embedded webview storage does not affect Mini Program storageThis operation removes all cached data and cannot be undoneUse with caution as it removes all stored key-value pairs",{"id":3592,"title":1914,"titles":3593,"content":3594,"level":579},"/api-reference/jsapi/storage-apis/clear-storage#related-links",[398],"my.getStorage - Get datamy.setStorage - Store datamy.removeStorage - Remove specific data html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":409,"title":408,"titles":3596,"content":3597,"level":573},[],"Save file in a local position.",{"id":3599,"title":115,"titles":3600,"content":3601,"level":579},"/api-reference/jsapi/file-apis/save-file#overview",[408],"my.saveFile saves a file in a local position. The total capacity of local file size is limited to 10 MB.",{"id":3603,"title":2835,"titles":3604,"content":3605,"level":579},"/api-reference/jsapi/file-apis/save-file#sample-code",[408],"my.chooseImage({\n  success: (res) => {\n    my.saveFile({\n      apFilePath: res.apFilePaths[0],\n      success: (res) => {\n        console.log(JSON.stringify(res));\n      },\n    });\n  },\n});",{"id":3607,"title":2682,"titles":3608,"content":3609,"level":579},"/api-reference/jsapi/file-apis/save-file#parameters",[408],"Object type with the following attributes: PropertyTypeRequiredDescriptionapFilePathStringYesFile path.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3611,"title":2929,"titles":3612,"content":3613,"level":579},"/api-reference/jsapi/file-apis/save-file#success-callback-function",[408],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionapFilePathStringFile save path.",{"id":3615,"title":2844,"titles":3616,"content":3617,"level":579},"/api-reference/jsapi/file-apis/save-file#usage-notes",[408],"Total capacity of local file storage is limited to 10 MBThe saved file path is returned in the success callbackUse this API to persist temporary files (like those from my.chooseImage)",{"id":3619,"title":1914,"titles":3620,"content":3621,"level":579},"/api-reference/jsapi/file-apis/save-file#related-links",[408],"my.getSavedFileInfo - Get saved file infomy.getSavedFileList - Get list of saved filesmy.removeSavedFile - Remove saved file html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":414,"title":413,"titles":3623,"content":3624,"level":573},[],"Get file information including size and digest.",{"id":3626,"title":115,"titles":3627,"content":3628,"level":579},"/api-reference/jsapi/file-apis/get-file-info#overview",[413],"my.getFileInfo retrieves information about a file, including its size and an optional digest (hash) for verification.",{"id":3630,"title":2835,"titles":3631,"content":3632,"level":579},"/api-reference/jsapi/file-apis/get-file-info#sample-code",[413],"my.getFileInfo({\n  apFilePath: 'https://resource/apm1953bb093ebd2834530196f50a4413a87.video',\n  digestAlgorithm: 'sha1',\n  success: (res) => {\n    console.log(JSON.stringify(res));\n  }\n});",{"id":3634,"title":2682,"titles":3635,"content":3636,"level":579},"/api-reference/jsapi/file-apis/get-file-info#parameters",[413],"PropertyTypeRequiredDescriptionapFilePathStringYesFile path.digestAlgorithmStringNoDigest algorithm, supporting md5 and sha1, md5 by default.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3638,"title":2929,"titles":3639,"content":3640,"level":579},"/api-reference/jsapi/file-apis/get-file-info#success-callback-function",[413],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionsizeNumberFile size.digestStringDigest result.",{"id":3642,"title":2844,"titles":3643,"content":3644,"level":579},"/api-reference/jsapi/file-apis/get-file-info#usage-notes",[413],"Supports both md5 and sha1 digest algorithmsDefault algorithm is md5 if not specifiedThe digest can be used for file integrity verificationWorks with network URLs and local file paths",{"id":3646,"title":1914,"titles":3647,"content":3648,"level":579},"/api-reference/jsapi/file-apis/get-file-info#related-links",[413],"my.saveFile - Save file locallymy.getSavedFileInfo - Get saved file info html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":419,"title":418,"titles":3650,"content":3651,"level":573},[],"Get information about a saved file.",{"id":3653,"title":115,"titles":3654,"content":3655,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-info#overview",[418],"my.getSavedFileInfo retrieves information about a file that was previously saved using my.saveFile. The saved address is required to use this API.",{"id":3657,"title":2835,"titles":3658,"content":3659,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-info#sample-code",[418],"my.chooseImage({\n  success: (res) => {\n    console.log(res.apFilePaths[0], 1212);\n    my.saveFile({\n      apFilePath: res.apFilePaths[0],\n      success: (result) => {\n        console.log(result, 1212);\n        my.getSavedFileInfo({\n          apFilePath: result.apFilePath,\n          success: (resu) => {\n            console.log(JSON.stringify(resu));\n          }\n        });\n      },\n    });\n  },\n});",{"id":3661,"title":2682,"titles":3662,"content":3609,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-info#parameters",[418],{"id":3664,"title":2929,"titles":3665,"content":3666,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-info#success-callback-function",[418],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionsizeNumberFile size.createTimeNumberTimestamp for the created time.",{"id":3668,"title":2844,"titles":3669,"content":3670,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-info#usage-notes",[418],"The file must be previously saved using my.saveFileUse the apFilePath returned from my.saveFile as the inputReturns file size and creation timestamp",{"id":3672,"title":1914,"titles":3673,"content":3674,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-info#related-links",[418],"my.saveFile - Save file locallymy.getSavedFileList - Get list of saved filesmy.removeSavedFile - Remove saved file html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":424,"title":423,"titles":3676,"content":3677,"level":573},[],"Get information of all saved files.",{"id":3679,"title":115,"titles":3680,"content":3681,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#overview",[423],"my.getSavedFileList retrieves information about all files that have been saved locally using my.saveFile.",{"id":3683,"title":2835,"titles":3684,"content":3685,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#sample-code",[423],"my.getSavedFileList({\n  success: (res) => {\n    console.log(JSON.stringify(res));\n  }\n});",{"id":3687,"title":2682,"titles":3688,"content":3689,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#parameters",[423],"Object type with the following attributes: PropertyTypeRequiredDescriptionsuccessFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3691,"title":2929,"titles":3692,"content":3693,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#success-callback-function",[423],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionfileListListFile list.",{"id":3695,"title":3696,"titles":3697,"content":3698,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#file-object-attribute","File Object Attribute",[423],"Each file object in the list contains: PropertyTypeDescriptionsizeNumberFile size.createTimeNumberCreated time.apFilePathStringFile path.",{"id":3700,"title":2844,"titles":3701,"content":3702,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#usage-notes",[423],"Returns a list of all files saved via my.saveFileEach file object includes size, creation time, and pathUse this API to manage locally saved files",{"id":3704,"title":1914,"titles":3705,"content":3706,"level":579},"/api-reference/jsapi/file-apis/get-saved-file-list#related-links",[423],"my.saveFile - Save file locallymy.getSavedFileInfo - Get specific file infomy.removeSavedFile - Remove saved file html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":429,"title":428,"titles":3708,"content":3709,"level":573},[],"Delete a saved file.",{"id":3711,"title":115,"titles":3712,"content":3713,"level":579},"/api-reference/jsapi/file-apis/remove-saved-file#overview",[428],"my.removeSavedFile deletes a file that was previously saved using my.saveFile.",{"id":3715,"title":2835,"titles":3716,"content":3717,"level":579},"/api-reference/jsapi/file-apis/remove-saved-file#sample-code",[428],"my.getSavedFileList({\n  success: (res) => {\n    my.removeSavedFile({\n      apFilePath: res.fileList[0].apFilePath,\n      success: (res) => {\n        console.log('remove success');\n      }\n    });\n  }\n});",{"id":3719,"title":2682,"titles":3720,"content":3609,"level":579},"/api-reference/jsapi/file-apis/remove-saved-file#parameters",[428],{"id":3722,"title":2844,"titles":3723,"content":3724,"level":579},"/api-reference/jsapi/file-apis/remove-saved-file#usage-notes",[428],"The file must be previously saved using my.saveFileUse the apFilePath from my.getSavedFileList or my.saveFile responseOnce removed, the file cannot be recoveredRemoving a file frees up storage space from the 10 MB limit",{"id":3726,"title":1914,"titles":3727,"content":3728,"level":579},"/api-reference/jsapi/file-apis/remove-saved-file#related-links",[428],"my.saveFile - Save file locallymy.getSavedFileList - Get list of saved filesmy.getSavedFileInfo - Get specific file info html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":434,"title":433,"titles":3730,"content":3731,"level":573},[],"Preview a PDF file within the mini program.",{"id":3733,"title":115,"titles":3734,"content":3735,"level":579},"/api-reference/jsapi/file-apis/open-document#overview",[433],"my.openDocument enables users to preview a PDF file within the mini program. After clicking on the PDF file, the user can preview the file without leaving the mini program. After closing the preview, the user will still be at the current mini program page.",{"id":3737,"title":2835,"titles":3738,"content":3739,"level":579},"/api-reference/jsapi/file-apis/open-document#sample-code",[433],"my.downloadFile({\n  url: 'http://documentExample.com/alipay.pdf',\n  success: ({ apFilePath }) => {\n    my.hideLoading();\n    my.openDocument({\n      filePath: apFilePath,\n      fileType: 'pdf',\n      success: (res) => {\n        console.log('open document success');\n      }\n    });\n  }\n});",{"id":3741,"title":2682,"titles":3742,"content":3743,"level":579},"/api-reference/jsapi/file-apis/open-document#parameters",[433],"Object type: PropertyTypeRequiredDescriptionfilePathStringYesObtain file path via my.downloadFile.fileTypeStringYesFile type.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3745,"title":3746,"titles":3747,"content":3748,"level":579},"/api-reference/jsapi/file-apis/open-document#legal-values-for-filetype","Legal values for fileType",[433],"ValueDescriptionpdfPDF format.",{"id":3750,"title":3751,"titles":3752,"content":3753,"level":579},"/api-reference/jsapi/file-apis/open-document#error-code","Error code",[433],"Error codeDescriptionSolution4011File path is invalid or no permission to access incoming path.Check the incoming file path.4012Preview files do not exist.Make sure files that correspond to file path exist.4013File format is not supported.Currently preview of PDF files is supported.",{"id":3755,"title":2844,"titles":3756,"content":3757,"level":579},"/api-reference/jsapi/file-apis/open-document#usage-notes",[433],"Currently only PDF file format is supportedFile path must be obtained via my.downloadFilePreview opens within the mini program without navigation awayUser returns to the same page after closing preview",{"id":3759,"title":1914,"titles":3760,"content":3761,"level":579},"/api-reference/jsapi/file-apis/open-document#related-links",[433],"my.saveFile - Save file locallymy.getFileInfo - Get file information html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":439,"title":438,"titles":3763,"content":3764,"level":573},[],"Choose a file to upload from the device storage.",{"id":3766,"title":115,"titles":3767,"content":3768,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#overview",[438],"my.chooseFileFromDisk allows users to select a file from their device storage. You can view the details of the file or delete the file you have added. Supported types of mini programs: DSL, H5+",{"id":3770,"title":2835,"titles":3771,"content":637,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#sample-code",[438],{"id":3773,"title":2796,"titles":3774,"content":3775,"level":590},"/api-reference/jsapi/file-apis/choose-file-from-disk#dsl",[438,2835],"my.chooseFileFromDisk({\n  success: (res) => {\n    console.log(res);\n  },\n  fail: (err) => {\n    console.log(err);\n  },\n});",{"id":3777,"title":2801,"titles":3778,"content":3779,"level":590},"/api-reference/jsapi/file-apis/choose-file-from-disk#h5",[438,2835],"AlipayJSBridge.call(\"chooseFileFromDisk\", {}, function (res) {\n  alert(\"AlipayJSBridge chooseFileFromDisk result:\\n\" + JSON.stringify(res));\n});",{"id":3781,"title":2682,"titles":3782,"content":3783,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#parameters",[438],"Object type with the following attributes: PropertyTypeRequiredDescriptionsuccessFunctionNoThe callback function for a successful API call.failFunctionNoThe callback function for a failed API call.completeFunctionNoThe callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.",{"id":3785,"title":2929,"titles":3786,"content":3787,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#success-callback-function",[438],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionapFilePathStringThe temporary local file path.",{"id":3789,"title":3790,"titles":3791,"content":3792,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#failure-callback-function","Failure Callback Function",[438],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionerrorNumberError code.errorMessageStringError message.",{"id":3794,"title":1909,"titles":3795,"content":3796,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#error-codes",[438],"Error codeError messageRemark4The JSAPI call is denied.The mini program that is developed by the merchant/ISV has no right to call the JSAPI.12Errors occur when copying the file.15The user cancels the file selection.16The user denies the permission to read the storage.Android Only.17No permission to read the storage.Android Only.18Choosing large file is not supported. Note: The following list describes the difference between the error code 16 and 17: 16: The user denies the permission to read the storage for the current request.",{"id":3798,"title":3799,"titles":3800,"content":3801,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#file-size-limit","File Size Limit",[438],"If you choose a file that is too large, the mini program or the wallet app cannot run properly. For this reason, the file size is limited to 50 MB. When the file size exceeds 50 MB, the error code of 18 is returned, and the corresponding error message is displayed.",{"id":3803,"title":2844,"titles":3804,"content":3805,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#usage-notes",[438],"This API opens a file picker dialog allowing users to select files from their device storageThe selected file path is returned as a temporary local path (apFilePath)The file size limit is 50 MB - larger files will return error code 18On Android, storage permissions may be required (error codes 16 and 17)Use the returned apFilePath with other file APIs like my.uploadFile or my.openDocument",{"id":3807,"title":1914,"titles":3808,"content":3809,"level":579},"/api-reference/jsapi/file-apis/choose-file-from-disk#related-links",[438],"my.uploadFile - Upload file to servermy.openDocument - Open documentmy.saveFile - Save file locally html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"id":449,"title":448,"titles":3811,"content":3812,"level":573},[],"Get the current geographical location of the user.",{"id":3814,"title":115,"titles":3815,"content":3816,"level":579},"/api-reference/jsapi/location-apis/get-location#overview",[448],"my.getLocation retrieves the current geographical location of the user, including longitude, latitude, and accuracy information.",{"id":3818,"title":2835,"titles":3819,"content":3820,"level":579},"/api-reference/jsapi/location-apis/get-location#sample-code",[448],"my.getLocation({\n  success: (res) => {\n    my.hideLoading();\n    console.log(res);\n    // Update your location data\n    hasLocation = true;\n    location = formatLocation(res.longitude, res.latitude);\n  },\n  fail: () => {\n    my.hideLoading();\n    my.alert({ title: 'location failed' });\n  },\n});",{"id":3822,"title":2682,"titles":3823,"content":3824,"level":579},"/api-reference/jsapi/location-apis/get-location#parameters",[448],"PropertyTypeRequiredDescriptioncacheTimeoutNumberNoLongitude and latitude location cache expiry time in seconds. Default is 30s. Use of cache can speed up location process. Re-location is done upon cache expiry.typeNumberNo0: default, get the longitude and latitude.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3826,"title":2929,"titles":3827,"content":3828,"level":579},"/api-reference/jsapi/location-apis/get-location#success-callback-function",[448],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionlongitudeStringLongitude.latitudeStringLatitude.accuracyStringAccuracy, in m.",{"id":3830,"title":3282,"titles":3831,"content":3832,"level":579},"/api-reference/jsapi/location-apis/get-location#error-code",[448],"ErrorDescriptionSolution11Make sure the location related right has been enabled.Prompt the user to enable location permission.12Network abnormity, try again later.Prompt the user to check the current network.13Location failure, try again later.-14Service location timeout.Prompt the user to try again.",{"id":3834,"title":2844,"titles":3835,"content":3836,"level":579},"/api-reference/jsapi/location-apis/get-location#usage-notes",[448],"Requires location permission to be enabledThe cacheTimeout parameter can improve performance by caching location dataDefault cache expiry is 30 secondsReturns longitude, latitude, and accuracy in metersNetwork connectivity is required for location services",{"id":3838,"title":1914,"titles":3839,"content":3840,"level":579},"/api-reference/jsapi/location-apis/get-location#related-links",[448],"my.chooseLocation - Choose location from mapmy.openLocation - Open location in map html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":454,"title":453,"titles":3842,"content":3843,"level":573},[],"Open the map to choose a location.",{"id":3845,"title":115,"titles":3846,"content":3847,"level":579},"/api-reference/jsapi/location-apis/choose-location#overview",[453],"my.chooseLocation opens a map interface that allows users to choose a specific location. The selected location's details, including longitude, latitude, name, and address, are returned through the success callback.",{"id":3849,"title":2835,"titles":3850,"content":3851,"level":579},"/api-reference/jsapi/location-apis/choose-location#sample-code",[453],"my.chooseLocation({\n  success: (res) => {\n    console.log(res);\n    // Use the selected location data\n    const selectedLocation = {\n      name: res.name,\n      address: res.address,\n      latitude: res.latitude,\n      longitude: res.longitude\n    };\n  },\n  fail: (error) => {\n    my.alert({ title: 'Failed to choose location' });\n  },\n});",{"id":3853,"title":2682,"titles":3854,"content":3275,"level":579},"/api-reference/jsapi/location-apis/choose-location#parameters",[453],{"id":3856,"title":2929,"titles":3857,"content":3858,"level":579},"/api-reference/jsapi/location-apis/choose-location#success-callback-function",[453],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionnameStringName of the selected location.addressStringDetailed address of the selected location.latitudeNumberLatitude of the selected location.longitudeNumberLongitude of the selected location.",{"id":3860,"title":3282,"titles":3861,"content":3862,"level":579},"/api-reference/jsapi/location-apis/choose-location#error-code",[453],"ErrorDescriptionSolution11Location permission not enabled.Prompt the user to enable location permission.12Network abnormity, try again later.Prompt the user to check the current network.13User cancelled the selection.-",{"id":3864,"title":2844,"titles":3865,"content":3866,"level":579},"/api-reference/jsapi/location-apis/choose-location#usage-notes",[453],"Requires location permission to be enabledUsers can search for locations within the map interfaceThe selected location includes both coordinates and address informationUsers can cancel the selection, which will trigger the fail callback",{"id":3868,"title":1914,"titles":3869,"content":3870,"level":579},"/api-reference/jsapi/location-apis/choose-location#related-links",[453],"my.getLocation - Get current locationmy.openLocation - Open location in map html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":459,"title":458,"titles":3872,"content":3873,"level":573},[],"Open a map to display a specific location.",{"id":3875,"title":115,"titles":3876,"content":3877,"level":579},"/api-reference/jsapi/location-apis/open-location#overview",[458],"my.openLocation opens the map application to display a specific location using the provided longitude and latitude coordinates. You can also specify the location name, address, and zoom scale.",{"id":3879,"title":2835,"titles":3880,"content":3881,"level":579},"/api-reference/jsapi/location-apis/open-location#sample-code",[458],"\u003Cscript>\n    function openLocation() {\n        AlipayJSBridge.call('openLocation', {\n            longitude: '44.367331',\n            latitude: '33.313738',\n            name: 'Al Kindi',\n            address: 'Baghdad, Baghdad Governorate',\n            }, function (res) {\n                alert('AlipayJSBridge openLocation result:\\n' + JSON.stringify(res));\n            });\n    }\n\u003C/script>",{"id":3883,"title":2682,"titles":3884,"content":3885,"level":579},"/api-reference/jsapi/location-apis/open-location#parameters",[458],"PropertyTypeRequiredDescriptionlongitudeStringYesLongitude of the location to display.latitudeStringYesLatitude of the location to display.nameStringNoName of the location.addressStringNoDetailed address of the location.scaleNumberNoZoom scale of the map, ranging from 3 to 19. Default is 15.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3887,"title":2929,"titles":3888,"content":3889,"level":579},"/api-reference/jsapi/location-apis/open-location#success-callback-function",[458],"The success callback is executed when the map is successfully opened.",{"id":3891,"title":3282,"titles":3892,"content":3893,"level":579},"/api-reference/jsapi/location-apis/open-location#error-code",[458],"ErrorDescriptionSolution11Invalid coordinates provided.Ensure longitude and latitude are valid values.12Network abnormity, try again later.Prompt the user to check the current network.13Failed to open map application.-",{"id":3895,"title":2844,"titles":3896,"content":3897,"level":579},"/api-reference/jsapi/location-apis/open-location#usage-notes",[458],"Longitude and latitude are required parametersThe scale parameter controls the zoom level (3-19), with higher values showing more detailDefault zoom scale is 15 if not specifiedThe map application will open in a separate viewProviding a name and address helps users identify the location more easily",{"id":3899,"title":1914,"titles":3900,"content":3901,"level":579},"/api-reference/jsapi/location-apis/open-location#related-links",[458],"my.getLocation - Get current locationmy.chooseLocation - Choose location from map html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":469,"title":468,"titles":3903,"content":3904,"level":573},[],"Network request for a Mini Program.",{"id":3906,"title":115,"titles":3907,"content":3908,"level":579},"/api-reference/jsapi/network-apis/request#overview",[468],"my.request initiates a network request from a Mini Program. The API supports GET and POST methods and returns a RequestTask object that can be used to abort the request.",{"id":3910,"title":3911,"titles":3912,"content":3913,"level":579},"/api-reference/jsapi/network-apis/request#notes","Notes",[468],"Configure the domain name whitelist at first under Mini Program > Configuration > Server Domain Whitelist. The Mini Program can only communicate with the domain names in the whitelist during the API calls: my.request (send HTTP request), my.uploadFile (upload file), and my.downloadFile (download file).During the Mini Program development, preview and debugging stages, you can select whether to ignore the httpRequest domain name validity check under Details > Domain name information. If yes, the domain name validity will not be checked in the simulator, preview and debug versions. Before the Mini Program goes online, you must maintain the domain names in the whitelist, otherwise, the domain names cannot be effective in the official release. Important: my.request request header is {'content-type': 'application/json'} by default, instead of {'content-type': 'application/x-www-form-urlencoded'}.",{"id":3915,"title":2835,"titles":3916,"content":3917,"level":579},"/api-reference/jsapi/network-apis/request#sample-code",[468],"my.request({\n  url: 'https://httpbin.org/post',\n  method: 'POST',\n  data: {\n    from: 'Mini Program',\n    production: 'JSAPI',\n  },\n  dataType: 'json',\n  success: function(res) {\n    my.alert({content: 'success'});\n  },\n  fail: function(res) {\n    my.alert({content: 'fail'});\n  },\n  complete: function(res) {\n    my.hideLoading();\n    my.alert({content: 'complete'});\n  }\n});\n\nconst task = my.request({url: 'https://httpbin.org/post'});\ntask.abort();",{"id":3919,"title":2682,"titles":3920,"content":3921,"level":579},"/api-reference/jsapi/network-apis/request#parameters",[468],"PropertyTypeRequiredDescriptionurlStringYesTarget server url.headersObjectNoSet the request HTTP header. The default value is {'content-type': 'application/json'}.methodStringNoThe default value is GET. Both GET and POST are supported.dataObjectNoRequest parameter.timeoutNumberNoTimeout period in ms. The default value is 30000.dataTypeStringNoExpected format of the returned data. The following formats are supported:• json• text• base64The default format is JSON. If an exception occurs, it may not be JSON in the callback.successFunctionNoThe callback function for a successful API call.failFunctionNoThe callback function for a failed API call.completeFunctionNoThe callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.",{"id":3923,"title":3924,"titles":3925,"content":3926,"level":579},"/api-reference/jsapi/network-apis/request#data-parameter-description","Data Parameter Description",[468],"Data transferred to the server is eventually expressed in String. If the type is not String, the data will be converted into String. Conversion rules are: If the method is GET, the data will be converted into query string: encodeURIComponent(k)=encodeURIComponent(v)&encodeURIComponent(k)=encodeURIComponent(v)...If the method is POST and the headers['content-type'] is application/json, the data will be JSON serialized.If the method is POST and the headers['content-type'] is application/x-www-form-urlencoded, the data will be converted into query string: encodeURIComponent(k)=encodeURIComponent(v)&encodeURIComponent(k)=encodeURIComponent(v)...",{"id":3928,"title":2929,"titles":3929,"content":3930,"level":579},"/api-reference/jsapi/network-apis/request#success-callback-function",[468],"The type of the incoming parameter is Object with the following attributes: PropertyTypeDescriptiondataStringResponse data. The format depends on the value of dataType in the request.statusNumberResponse code.headersObjectResponse header.",{"id":3932,"title":3282,"titles":3933,"content":3934,"level":579},"/api-reference/jsapi/network-apis/request#error-code",[468],"ErrorDescription2Incorrect parameter. Check whether the URL is in HTTPS format and all parameters are correct.4Not authorized to call the interface. The error might result from the following:• The server domain is not configured. In this case, configure the domain whitelist under Mini Program > Configuration > Server Domain Whitelist. The mini program can only communicate with the domain names in the whitelist when calling the my.request and my.uploadFile APIs. If the server domain whitelist is updated, the whitelist comes effective only when a new version of the mini program is published.• Errors occur with your account and you cannot login to the mini program editor. In this case, when you debug in the Mini Program studio, select ignore HttpRequest domain name validity check or ignore Webview domain name validity check under Details > Domain name information, and then preview the debugging request. Check whether the HTTP request domain name is incorrect.12Network error.13Timeout.14Decoding failure.19HTTP error.20Request stopped/service end traffic limit. Note: The error code of 14 might be returned in the following cases: When the value of dataType is json, the Mini Program framework firstly perform the JSON.parse operation on the returned results. If the parsing fails, the error code of 14 is returned.When the value of dataType is text and the returned content has a bad format, the error code of 14 is returned. To solve the error, check whether the dataType setting is incorrect firstly.",{"id":3936,"title":3937,"titles":3938,"content":637,"level":579},"/api-reference/jsapi/network-apis/request#return-value","Return Value",[468],{"id":3940,"title":3941,"titles":3942,"content":3943,"level":590},"/api-reference/jsapi/network-apis/request#requesttask","RequestTask",[468,3937],"Network request task object. Method: RequestTask.abort() Note: If Not authorized to call the interface is returned, configure the domain whitelist under Mini Program > Configuration > Server Domain Whitelist in the mini program platform.",{"id":3945,"title":2844,"titles":3946,"content":3947,"level":579},"/api-reference/jsapi/network-apis/request#usage-notes",[468],"Domain whitelist must be configured before making requestsDefault content-type is application/json, not application/x-www-form-urlencodedDefault timeout is 30000ms (30 seconds)The request can be aborted using the returned RequestTask objectBoth GET and POST methods are supported",{"id":3949,"title":1914,"titles":3950,"content":3951,"level":579},"/api-reference/jsapi/network-apis/request#related-links",[468],"my.uploadFile - Upload file (if available)my.downloadFile - Download file html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":474,"title":473,"titles":3953,"content":3954,"level":573},[],"Download a file resource to a local location.",{"id":3956,"title":115,"titles":3957,"content":3958,"level":579},"/api-reference/jsapi/network-apis/download-file#overview",[473],"my.downloadFile downloads a file from a remote server to a local location. The downloaded file path is returned in the success callback and can be used with other APIs like my.previewImage or my.openDocument.",{"id":3960,"title":2835,"titles":3961,"content":3962,"level":579},"/api-reference/jsapi/network-apis/download-file#sample-code",[473],"my.downloadFile({\n  url: 'http://img.example.com/example.jpg',\n  success: ({ apFilePath }) => {\n    my.previewImage({\n      urls: [apFilePath],\n    });\n  },\n  fail: (res) => {\n    my.alert({\n      content: res.errorMessage || res.error,\n    });\n  },\n});",{"id":3964,"title":2682,"titles":3965,"content":3966,"level":579},"/api-reference/jsapi/network-apis/download-file#parameters",[473],"PropertyTypeRequiredDescriptionurlStringYesDownloading file address.headerObjectNoHTTP request Header.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3968,"title":2929,"titles":3969,"content":3970,"level":579},"/api-reference/jsapi/network-apis/download-file#success-callback-function",[473],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionapFilePathStringTemporary file storage location.",{"id":3972,"title":3282,"titles":3973,"content":3974,"level":579},"/api-reference/jsapi/network-apis/download-file#error-code",[473],"ErrorDescription12Downloading failed.13No right.",{"id":3976,"title":2844,"titles":3977,"content":3978,"level":579},"/api-reference/jsapi/network-apis/download-file#usage-notes",[473],"The downloaded file is stored in a temporary locationUse the returned apFilePath with APIs like my.previewImage, my.openDocument, or my.saveFileThe file must be accessible via HTTP/HTTPSCustom headers can be set via the header parameterThe temporary file may be cleaned up by the system, use my.saveFile to persist it",{"id":3980,"title":1914,"titles":3981,"content":3982,"level":579},"/api-reference/jsapi/network-apis/download-file#related-links",[473],"my.request - Network requestmy.saveFile - Save file locallymy.openDocument - Open documentmy.previewImage - Preview image html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":478,"title":477,"titles":3984,"content":3985,"level":573},[],"Upload local resource to the server.",{"id":3987,"title":115,"titles":3988,"content":3989,"level":579},"/api-reference/jsapi/network-apis/upload-file#overview",[477],"my.uploadFile uploads the local resource to the server. Supported types of mini programs: DSL, H5+",{"id":3991,"title":2835,"titles":3992,"content":3993,"level":579},"/api-reference/jsapi/network-apis/upload-file#sample-code",[477],"my.uploadFile({\n  url: \"Please use your own server address\",\n  fileType: \"image\",\n  fileName: \"file\",\n  filePath: \"...\",\n  success: (res) => {\n    my.alert({\n      content: \"Upload success\",\n    });\n  },\n});",{"id":3995,"title":2682,"titles":3996,"content":3997,"level":579},"/api-reference/jsapi/network-apis/upload-file#parameters",[477],"PropertyTypeRequiredDescriptionurlStringYesAddress of the developer server.filePathStringYesLocal location of the file resource to be uploaded.fileNameStringYesFilename, also the corresponding key. The developer uses this key at the server side to get the file binary content.fileTypeStringYesThe file type of the uploaded file.Note: This parameter is only used for backward compatibility with older super app versions. If you have previously set a specific value, no changes are necessary. If not, you can set the value to image for any file type.headerObjectNoThe HTTP request header. You can specify this parameter using any common headers.Note: By default, the Content-Type request header is set to multipart/form-data. Do not change this value, otherwise your request will fail.formDataObjectNoOther additional form data in the HTTP request.timeoutObjectNoThe timeout period of your request in milliseconds. The default value is 60000.hideLoadingBooleanNoWhether to hide a loading icon during the uploading process. Valid values are:• true: Hide a loading icon.• false: Show a loading icon.If not specified, the value defaults to false.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":3999,"title":2929,"titles":4000,"content":4001,"level":579},"/api-reference/jsapi/network-apis/upload-file#success-callback-function",[477],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptiondataStringData returned from the server.statusCodeStringHTTP status code.headerObjectHeader returned from the server.",{"id":4003,"title":3282,"titles":4004,"content":4005,"level":579},"/api-reference/jsapi/network-apis/upload-file#error-code",[477],"ErrorDescription11File nonexistent.12File uploading failed.13No right.",{"id":4007,"title":2844,"titles":4008,"content":4009,"level":579},"/api-reference/jsapi/network-apis/upload-file#usage-notes",[477],"Domain whitelist must be configured before uploading filesThe fileName parameter specifies the form field name that the server will use to access the fileThe default Content-Type is multipart/form-data - do not change this valueUse formData to send additional data along with the fileThe default timeout is 60000ms (60 seconds)Set hideLoading: true to prevent the default loading indicator from appearingThe file path should be obtained from other APIs like my.chooseFileFromDisk or my.chooseImage",{"id":4011,"title":4012,"titles":4013,"content":637,"level":579},"/api-reference/jsapi/network-apis/upload-file#example-usage","Example Usage",[477],{"id":4015,"title":4016,"titles":4017,"content":4018,"level":590},"/api-reference/jsapi/network-apis/upload-file#complete-example-with-error-handling","Complete Example with Error Handling",[477,4012],"my.uploadFile({\n  url: \"https://your-server.com/api/upload\",\n  filePath: filePath, // From my.chooseFileFromDisk\n  fileName: \"file\",\n  fileType: \"PDF\",\n  formData: {\n    userId: \"user-123\",\n    documentType: \"invoice\",\n    timestamp: new Date().toISOString(),\n  },\n  success: (uploadRes) => {\n    console.log(\"Upload successful\");\n    console.log(\"Status Code:\", uploadRes.statusCode);\n    console.log(\"Response Data:\", uploadRes.data);\n\n    my.alert({\n      title: \"Success\",\n      content: \"File uploaded successfully!\",\n    });\n  },\n  fail: (error) => {\n    console.error(\"Upload failed:\", error);\n\n    let errorMessage = \"Upload failed\";\n    if (error.error === 11) {\n      errorMessage = \"File does not exist\";\n    } else if (error.error === 12) {\n      errorMessage = \"File uploading failed\";\n    } else if (error.error === 13) {\n      errorMessage = \"No upload permission\";\n    }\n\n    my.alert({\n      title: \"Upload Error\",\n      content: errorMessage,\n    });\n  },\n  complete: () => {\n    console.log(\"Upload process complete\");\n  },\n});",{"id":4020,"title":1914,"titles":4021,"content":4022,"level":579},"/api-reference/jsapi/network-apis/upload-file#related-links",[477],"my.chooseFileFromDisk - Choose file from devicemy.request - Network requestmy.downloadFile - Download filemy.chooseImage - Choose image html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"id":483,"title":482,"titles":4024,"content":4025,"level":573},[],"Share the current Miniapp using Super Qi.",{"id":4027,"title":115,"titles":4028,"content":4029,"level":579},"/api-reference/jsapi/network-apis/share#overview",[482],"AlipayJSBridge.call(\"qicardShareAppMessage\", ...) shares a Miniapp message. You configure the share content (title/description/path/image) and receive the share result in the success callback. Supported types of mini programs: H5+",{"id":4031,"title":2835,"titles":4032,"content":4033,"level":579},"/api-reference/jsapi/network-apis/share#sample-code",[482],"AlipayJSBridge.call(\"qicardShareAppMessage\", {\n  title: \"Demo Share Title\",\n  desc: \"Shared from Super Qi miniapp. Tap to open!\",\n  path: \"share.html\",\n  success: (res) => {\n    console.log(\"[from mini app], share call succeeded: \", JSON.stringify(res));\n    my.alert({ content: \"success\" + JSON.stringify(res) });\n  },\n  fail: (res) => {\n    console.log(\"[from mini app], share call fail: \", JSON.stringify(res));\n    my.alert({ content: \"fail\" + JSON.stringify(res) });\n  },\n});",{"id":4035,"title":2682,"titles":4036,"content":4037,"level":579},"/api-reference/jsapi/network-apis/share#parameters",[482],"PropertyTypeRequiredDescriptiontitleStringYesshare titledescStringNoshare descpathStringNoshare pathimageUrlStringNoshare imageUrl",{"id":4039,"title":2929,"titles":4040,"content":4041,"level":579},"/api-reference/jsapi/network-apis/share#success-callback-function",[482],"The incoming parameter is an Object with the following attributes: PropertyTypeDescriptionshareResultBooleanThe result that indicates whether if the sharing is successful.",{"id":4043,"title":3790,"titles":4044,"content":4045,"level":579},"/api-reference/jsapi/network-apis/share#failure-callback-function",[482],"The incoming parameter is an Object that contains error information (the exact fields may vary by runtime/version).",{"id":4047,"title":2844,"titles":4048,"content":4049,"level":579},"/api-reference/jsapi/network-apis/share#usage-notes",[482],"title is required; provide enough context so users know what they will open after sharing.path and imageUrl are optional, but recommended to improve click-through.Use this API only in the H5+ runtime where AlipayJSBridge is available. html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":493,"title":492,"titles":4051,"content":4052,"level":573},[],"Get system information.",{"id":4054,"title":115,"titles":4055,"content":4056,"level":579},"/api-reference/jsapi/device-apis/get-system-info#overview",[492],"my.getSystemInfo retrieves the system information of the current device, including model, operating system version, screen resolution, and other device characteristics.",{"id":4058,"title":2835,"titles":4059,"content":4060,"level":579},"/api-reference/jsapi/device-apis/get-system-info#sample-code",[492],"my.getSystemInfo({\n  success: (res) => {\n    console.log(res.model);\n    console.log(res.pixelRatio);\n    console.log(res.windowWidth);\n    console.log(res.windowHeight);\n    console.log(res.language);\n    console.log(res.version);\n    console.log(res.platform);\n  },\n});",{"id":4062,"title":2682,"titles":4063,"content":3275,"level":579},"/api-reference/jsapi/device-apis/get-system-info#parameters",[492],{"id":4065,"title":2929,"titles":4066,"content":4067,"level":579},"/api-reference/jsapi/device-apis/get-system-info#success-callback-function",[492],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionmodelStringDevice model.pixelRatioNumberDevice pixel ratio.windowWidthNumberWindow width in px.windowHeightNumberWindow height in px.languageStringSystem language.versionStringVersion number.storageStringStorage capacity of the device.currentBatteryStringCurrent battery level.systemStringSystem version.platformStringSystem platform.titleBarHeightStringTitle bar height.statusBarHeightStringStatus bar height.screenWidthNumberScreen width in px.screenHeightNumberScreen height in px.brandStringDevice brand.fontSizeSettingNumberUser font size setting.appStringHost app name.safeAreaObjectSafe area information.",{"id":4069,"title":2844,"titles":4070,"content":4071,"level":579},"/api-reference/jsapi/device-apis/get-system-info#usage-notes",[492],"Asynchronously obtains comprehensive device information via the success callbackAll measurements in pixels (px)Returns both window and screen dimensionsUseful for responsive design and device-specific featuresSafe area information helps with notch and gesture bar handling",{"id":4073,"title":1914,"titles":4074,"content":4075,"level":579},"/api-reference/jsapi/device-apis/get-system-info#related-links",[492],"my.getNetworkType - Get network typemy.getBatteryInfo - Get battery information html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":497,"title":496,"titles":4077,"content":4078,"level":573},[],"Get the network type.",{"id":4080,"title":115,"titles":4081,"content":4082,"level":579},"/api-reference/jsapi/device-apis/get-network-type#overview",[496],"my.getNetworkType retrieves the current network type of the device, such as WiFi, 2G, 3G, 4G, or offline status.",{"id":4084,"title":2835,"titles":4085,"content":4086,"level":579},"/api-reference/jsapi/device-apis/get-network-type#sample-code",[496],"my.getNetworkType({\n  success: (res) => {\n    console.log(res.networkAvailable);\n    console.log(res.networkType);\n  },\n});",{"id":4088,"title":2682,"titles":4089,"content":3275,"level":579},"/api-reference/jsapi/device-apis/get-network-type#parameters",[496],{"id":4091,"title":2929,"titles":4092,"content":4093,"level":579},"/api-reference/jsapi/device-apis/get-network-type#success-callback-function",[496],"The incoming parameter is of the Object type with the following attributes: PropertyTypeDescriptionnetworkAvailableBooleanWhether the network is available.networkTypeStringNetwork type values:• WIFI: WiFi network• 2G: 2G network• 3G: 3G network• 4G: 4G network• UNKNOWN: Unknown network• NOTREACHABLE: No network• NONE: None",{"id":4095,"title":2844,"titles":4096,"content":4097,"level":579},"/api-reference/jsapi/device-apis/get-network-type#usage-notes",[496],"Returns current network connectivity statusUseful for optimizing data usage based on connection typeCan detect when device is offlineNetwork type helps determine appropriate content quality and caching strategies",{"id":4099,"title":1914,"titles":4100,"content":4101,"level":579},"/api-reference/jsapi/device-apis/get-network-type#related-links",[496],"my.getSystemInfo - Get system informationmy.request - Network request html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":502,"title":501,"titles":4103,"content":4104,"level":573},[],"Get and set clipboard data.",{"id":4106,"title":115,"titles":4107,"content":4108,"level":579},"/api-reference/jsapi/device-apis/clipboard#overview",[501],"The clipboard APIs allow you to read from and write to the system clipboard, enabling copy and paste functionality within your mini program.",{"id":4110,"title":4111,"titles":4112,"content":4113,"level":579},"/api-reference/jsapi/device-apis/clipboard#mygetclipboard","my.getClipboard",[501],"Retrieves the current content of the clipboard.",{"id":4115,"title":2835,"titles":4116,"content":4117,"level":590},"/api-reference/jsapi/device-apis/clipboard#sample-code",[501,4111],"my.getClipboard({\n  success: (res) => {\n    my.alert({\n      content: res.text\n    });\n  },\n});",{"id":4119,"title":2682,"titles":4120,"content":3275,"level":590},"/api-reference/jsapi/device-apis/clipboard#parameters",[501,4111],{"id":4122,"title":2929,"titles":4123,"content":4124,"level":590},"/api-reference/jsapi/device-apis/clipboard#success-callback-function",[501,4111],"PropertyTypeDescriptiontextStringClipboard content.",{"id":4126,"title":4127,"titles":4128,"content":4129,"level":579},"/api-reference/jsapi/device-apis/clipboard#mysetclipboard","my.setClipboard",[501],"Sets text content to the clipboard.",{"id":4131,"title":2835,"titles":4132,"content":4133,"level":590},"/api-reference/jsapi/device-apis/clipboard#sample-code-1",[501,4127],"my.setClipboard({\n  text: 'copy content',\n  success: () => {\n    my.alert({\n      content: 'Copied successfully'\n    });\n  },\n});",{"id":4135,"title":2682,"titles":4136,"content":4137,"level":590},"/api-reference/jsapi/device-apis/clipboard#parameters-1",[501,4127],"PropertyTypeRequiredDescriptiontextStringYesThe text content to copy to clipboard.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).",{"id":4139,"title":2844,"titles":4140,"content":4141,"level":579},"/api-reference/jsapi/device-apis/clipboard#usage-notes",[501],"my.setClipboard overwrites any existing clipboard contentmy.getClipboard retrieves text content onlyClipboard operations are synchronous from the user's perspectiveUseful for implementing copy-to-clipboard featuresConsider showing user feedback when clipboard operations complete",{"id":4143,"title":1914,"titles":4144,"content":4145,"level":579},"/api-reference/jsapi/device-apis/clipboard#related-links",[501],"my.alert - Show alert dialogmy.showToast - Show toast message html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"id":507,"title":506,"titles":4147,"content":4148,"level":573},[],"Get battery level and charging state of the device.",{"id":4150,"title":115,"titles":4151,"content":4152,"level":579},"/api-reference/jsapi/device-apis/get-battery-info#overview",[506],"my.getBatteryInfo asynchronously obtains the battery level and the charging state of the current device. No input parameters are required.",{"id":4154,"title":2835,"titles":4155,"content":4156,"level":579},"/api-reference/jsapi/device-apis/get-battery-info#sample-code",[506],"my.getBatteryInfo({\n  success: (res) => {\n    my.alert({\n      content: \"Battery: \" + res.level + \"%, Charging: \" + res.isCharging,\n    });\n  },\n  fail: (err) => {\n    my.alert({ content: \"Inquiry failed: \" + JSON.stringify(err) });\n  },\n  complete: () => {\n    console.log(\"Complete callback\");\n  },\n});",{"id":4158,"title":2682,"titles":4159,"content":4160,"level":579},"/api-reference/jsapi/device-apis/get-battery-info#parameters",[506],"PropertyTypeRequiredDescriptionsuccessFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (executed whether the call succeeds or fails).",{"id":4162,"title":2929,"titles":4163,"content":4164,"level":579},"/api-reference/jsapi/device-apis/get-battery-info#success-callback-function",[506],"The incoming parameter is an Object with the following attributes: PropertyTypeDescriptionlevelNumberBattery level of the current device (0–100).isChargingBooleanWhether the device is currently charging.",{"id":4166,"title":1914,"titles":4167,"content":4168,"level":579},"/api-reference/jsapi/device-apis/get-battery-info#related-links",[506],"my.getSystemInfo - Get system informationmy.getNetworkType - Get network type html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":512,"title":511,"titles":4170,"content":4171,"level":573},[],"Get and set screen brightness.",{"id":4173,"title":115,"titles":4174,"content":4175,"level":579},"/api-reference/jsapi/device-apis/screen-brightness#overview",[511],"The screen brightness APIs let you read and set the device screen brightness. Use my.getScreenBrightness to read the current value and my.setScreenBrightness to set it. Brightness is in the range 0–1.",{"id":4177,"title":4178,"titles":4179,"content":4180,"level":579},"/api-reference/jsapi/device-apis/screen-brightness#mygetscreenbrightness","my.getScreenBrightness",[511],"Gets the current screen brightness value.",{"id":4182,"title":2835,"titles":4183,"content":4184,"level":590},"/api-reference/jsapi/device-apis/screen-brightness#sample-code",[511,4178],"my.getScreenBrightness({\n  success: (res) => {\n    my.alert({\n      content: \"Current screen brightness: \" + res.brightness,\n    });\n  },\n});",{"id":4186,"title":2682,"titles":4187,"content":4160,"level":590},"/api-reference/jsapi/device-apis/screen-brightness#parameters",[511,4178],{"id":4189,"title":2929,"titles":4190,"content":4191,"level":590},"/api-reference/jsapi/device-apis/screen-brightness#success-callback-function",[511,4178],"PropertyTypeDescriptionbrightnessNumberCurrent screen brightness, range 0–1.",{"id":4193,"title":4194,"titles":4195,"content":4196,"level":579},"/api-reference/jsapi/device-apis/screen-brightness#mysetscreenbrightness","my.setScreenBrightness",[511],"Sets the screen brightness.",{"id":4198,"title":2835,"titles":4199,"content":4200,"level":590},"/api-reference/jsapi/device-apis/screen-brightness#sample-code-1",[511,4194],"// Set brightness to 0.5 (50%)\nmy.setScreenBrightness({\n  brightness: 0.5,\n  success: () => {\n    my.alert({ content: \"Brightness updated\" });\n  },\n});",{"id":4202,"title":2682,"titles":4203,"content":4204,"level":590},"/api-reference/jsapi/device-apis/screen-brightness#parameters-1",[511,4194],"PropertyTypeRequiredDescriptionbrightnessNumberYesScreen brightness to set, range 0–1.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion (executed whether the call succeeds or fails).",{"id":4206,"title":2844,"titles":4207,"content":4208,"level":579},"/api-reference/jsapi/device-apis/screen-brightness#usage-notes",[511],"Brightness value must be between 0 and 1.Useful for in-app readers or night mode where you want to adjust screen brightness.Getting brightness on load helps restore the user’s previous setting.",{"id":4210,"title":1914,"titles":4211,"content":4212,"level":579},"/api-reference/jsapi/device-apis/screen-brightness#related-links",[511],"my.getSystemInfo - Get system informationmy.vibrate - Device vibration html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"id":517,"title":516,"titles":4214,"content":4215,"level":573},[],"Add a contact to the user's phone via a form or pre-filled data.",{"id":4217,"title":115,"titles":4218,"content":4219,"level":579},"/api-reference/jsapi/device-apis/add-phone-contact#overview",[516],"my.addPhoneContact lets users add a contact to their phone—either by filling a form (create new or add to existing) or by passing contact data from your Mini Program. All contact fields are optional; only the ones you provide are used.",{"id":4221,"title":2835,"titles":4222,"content":637,"level":579},"/api-reference/jsapi/device-apis/add-phone-contact#sample-code",[516],{"id":4224,"title":3073,"titles":4225,"content":4226,"level":590},"/api-reference/jsapi/device-apis/add-phone-contact#html",[516,2835],"\u003Cbutton onclick=\"addContact()\">Add to phone contacts\u003C/button>",{"id":4228,"title":3078,"titles":4229,"content":4230,"level":590},"/api-reference/jsapi/device-apis/add-phone-contact#javascript",[516,2835],"function addContact() {\n  if (!my.canIUse(\"addPhoneContact\")) {\n    my.alert({\n      title: \"Client version too low\",\n      content: \"my.addPhoneContact() requires a higher version.\",\n    });\n    return;\n  }\n\n  my.addPhoneContact({\n    nickName: \"Baking July\",\n    lastName: \"Last\",\n    middleName: \"Middle\",\n    firstName: \"First\",\n    remark: \"This is remarks\",\n    mobilePhoneNumber: \"13000000000\",\n    success: (res) => {\n      my.alert({ content: \"addPhoneContact response: \" + JSON.stringify(res) });\n    },\n    fail: (res) => {\n      my.alert({ content: \"addPhoneContact failed: \" + JSON.stringify(res) });\n    },\n  });\n}",{"id":4232,"title":2682,"titles":4233,"content":4234,"level":579},"/api-reference/jsapi/device-apis/add-phone-contact#parameters",[516],"Object type with the following attributes. All contact fields are optional. PropertyTypeRequiredDescriptionphotoFilePathStringNoLocal file path of avatar.nickNameStringNoNickname.lastNameStringNoSurname.middleNameStringNoMiddle name.firstNameStringNoFirst name.remarkStringNoRemarks.mobilePhoneNumberStringNoCell number.homePhoneNumberStringNoHome phone.workPhoneNumberStringNoWork phone.homeFaxNumberStringNoHome fax.workFaxNumberStringNoWork fax.hostNumberStringNoCompany phone number.addressCountryStringNoCountry in contact address.addressStateStringNoProvince in contact address.addressCityStringNoCity in contact address.addressStreetStringNoStreet in contact address.addressPostalCodeStringNoPostcode in contact address.workAddressCountryStringNoCountry in work address.workAddressStateStringNoProvince in work address.workAddressCityStringNoCity in work address.workAddressStreetStringNoStreet in work address.workAddressPostalCodeStringNoPostcode in work address.homeAddressCountryStringNoCountry in home address.homeAddressStateStringNoProvince in home address.homeAddressCityStringNoCity in home address.homeAddressStreetStringNoStreet in home address.homeAddressPostalCodeStringNoPostcode in home address.organizationStringNoCompany.titleStringNoJob title.emailStringNoEmail.urlStringNoWebsite.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion. Depending on the contact app and device ROM, some fields may not support emoji or kaomoji; in such cases the option is ignored.",{"id":4236,"title":3937,"titles":4237,"content":4238,"level":579},"/api-reference/jsapi/device-apis/add-phone-contact#return-value",[516],"Success: Callback receives an object with success: true. Failure: Callback receives an error object. Common cases: ErrorDescription11User cancelled the operation.2Call failure; detail includes more information.",{"id":4240,"title":1914,"titles":4241,"content":4242,"level":579},"/api-reference/jsapi/device-apis/add-phone-contact#related-links",[516],"my.makePhoneCall - Make a phone callmy.choosePhoneContact - Choose a phone contact html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"id":522,"title":521,"titles":4244,"content":4245,"level":573},[],"Initiate a phone call to the given number.",{"id":4247,"title":115,"titles":4248,"content":4249,"level":579},"/api-reference/jsapi/device-apis/make-phone-call#overview",[521],"my.makePhoneCall opens the device dialer and initiates a call to the specified phone number. The Mini Program Studio simulator does not support this API. Use a real device to debug.",{"id":4251,"title":2835,"titles":4252,"content":4253,"level":579},"/api-reference/jsapi/device-apis/make-phone-call#sample-code",[521],"function makePhoneCall() {\n  my.makePhoneCall({\n    number: \"00000\",\n  });\n}",{"id":4255,"title":2682,"titles":4256,"content":4257,"level":579},"/api-reference/jsapi/device-apis/make-phone-call#parameters",[521],"PropertyTypeRequiredDescriptionnumberStringYesPhone number to call.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion.",{"id":4259,"title":2844,"titles":4260,"content":4261,"level":579},"/api-reference/jsapi/device-apis/make-phone-call#usage-notes",[521],"The system dialer is used; the user can cancel or complete the call there.Simulator may show an \"is not a function\" error; test on a real device.",{"id":4263,"title":1914,"titles":4264,"content":4265,"level":579},"/api-reference/jsapi/device-apis/make-phone-call#related-links",[521],"my.addPhoneContact - Add phone contactmy.choosePhoneContact - Choose a phone contact html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":527,"title":526,"titles":4267,"content":4268,"level":573},[],"Open the scanner to read QR codes or barcodes.",{"id":4270,"title":115,"titles":4271,"content":4272,"level":579},"/api-reference/jsapi/device-apis/scan#overview",[526],"my.scan opens the built-in scanner to read QR codes or barcodes. You can choose scan type (QR or bar) and whether to hide the album entry so the user scans only with the camera.",{"id":4274,"title":2835,"titles":4275,"content":4276,"level":579},"/api-reference/jsapi/device-apis/scan#sample-code",[526],"function scan() {\n  my.scan({\n    type: \"qr\",\n    success: (res) => {\n      my.alert({\n        title: \"Scanned\",\n        content: res.code || res.qrCode || res.barCode,\n      });\n    },\n    fail: (err) => {\n      my.alert({ content: \"Scan failed: \" + JSON.stringify(err) });\n    },\n  });\n}",{"id":4278,"title":2682,"titles":4279,"content":4280,"level":579},"/api-reference/jsapi/device-apis/scan#parameters",[526],"PropertyTypeRequiredDescriptiontypeStringNoScan type (default qr):• qr – QR code• bar – BarcodehideAlbumBooleanNoIf false, user can pick an image from the album to scan. If true, only camera scan is used. Default false.successFunctionNoCallback function upon call success.failFunctionNoCallback function upon call failure.completeFunctionNoCallback function upon call completion.",{"id":4282,"title":2929,"titles":4283,"content":4284,"level":579},"/api-reference/jsapi/device-apis/scan#success-callback-function",[526],"The success callback receives an Object with: PropertyTypeDescriptioncodeStringData returned from scanning (generic).qrCodeStringQR code data returned from scanning.barCodeStringBarcode data returned from scanning.",{"id":4286,"title":1909,"titles":4287,"content":4288,"level":579},"/api-reference/jsapi/device-apis/scan#error-codes",[526],"ErrorDescription10User cancelled.11Operation failure.",{"id":4290,"title":1914,"titles":4291,"content":4292,"level":579},"/api-reference/jsapi/device-apis/scan#related-links",[526],"my.getSystemInfo - Get system informationmy.vibrate - Device vibration html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":532,"title":531,"titles":4294,"content":4295,"level":573},[],"Trigger device vibration.",{"id":4297,"title":115,"titles":4298,"content":4299,"level":579},"/api-reference/jsapi/device-apis/vibrate#overview",[531],"my.vibrate triggers the device vibration. Use it for haptic feedback on button press or to get the user’s attention.",{"id":4301,"title":2835,"titles":4302,"content":4303,"level":579},"/api-reference/jsapi/device-apis/vibrate#sample-code",[531],"function vibrate() {\n  my.vibrate({\n    success: () => {\n      my.alert({ title: \"Vibration on\" });\n    },\n    fail: (err) => {\n      console.log(\"Vibrate failed\", err);\n    },\n  });\n}",{"id":4305,"title":2682,"titles":4306,"content":4160,"level":579},"/api-reference/jsapi/device-apis/vibrate#parameters",[531],{"id":4308,"title":2844,"titles":4309,"content":4310,"level":579},"/api-reference/jsapi/device-apis/vibrate#usage-notes",[531],"No input parameters are required; calling the API triggers a short vibration.Useful for confirming user actions (e.g. long-press, success feedback).",{"id":4312,"title":1914,"titles":4313,"content":4314,"level":579},"/api-reference/jsapi/device-apis/vibrate#related-links",[531],"my.getBatteryInfo - Get battery informationmy.getSystemInfo - Get system information html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":537,"title":536,"titles":4316,"content":4317,"level":573},[],"Error codes shared across all Super Qi Open APIs.",{"id":4319,"title":115,"titles":4320,"content":4321,"level":579},"/api-reference/common-error-codes#overview",[536],"Error codes returned by Open APIs fall into two groups: Common error codes — shared across all Open APIs. They are listed on this page.API-specific error codes — listed in the Error Codes section of each endpoint's own page. When an endpoint references the \"Common error codes\", it refers to the tables below.",{"id":4323,"title":4324,"titles":4325,"content":4326,"level":579},"/api-reference/common-error-codes#authentication-signature","Authentication & Signature",[536],"resultStatusresultCoderesultMessageFKEY_NOT_FOUNDThe key is not found.FCLIENT_INVALIDThe client is invalid.FINVALID_SIGNATUREThe signature is invalid.FINVALID_ACCESS_TOKENThe access token is not valid.FEXPIRED_ACCESS_TOKENThe access token is expired.",{"id":4328,"title":4329,"titles":4330,"content":4331,"level":579},"/api-reference/common-error-codes#request-transport","Request & Transport",[536],"resultStatusresultCoderesultMessageFMETHOD_NOT_SUPPORTEDThe server does not implement the requested HTTP method.FMEDIA_TYPE_NOT_ACCEPTABLEThe server does not implement the media type that can be accepted by the client.FREPEAT_REQ_INCONSISTENTA repeated request is inconsistent with the original request.",{"id":4333,"title":4334,"titles":4335,"content":4336,"level":579},"/api-reference/common-error-codes#partner-merchant","Partner / Merchant",[536],"resultStatusresultCoderesultMessageFPARTNER_NOT_EXISTThe partner does not exist.FPARTNER_STATUS_ABNORMALThe partner status is abnormal.FPARTNER_BALANCE_NOT_ENOUGHThe partner balance is not enough.",{"id":4338,"title":4339,"titles":4340,"content":4341,"level":579},"/api-reference/common-error-codes#system","System",[536],"resultStatusresultCoderesultMessageUUNKNOWN_EXCEPTIONAn API calling failed, which is caused by unknown reasons. Retry idempotently or query the result status — never assume success or failure based on a U response.",{"id":547,"title":546,"titles":4343,"content":4344,"level":573},[],"Complete guide to creating and integrating deep links in Super Qi Deep links allow you to directly navigate users to specific content within the Super Qi app. This guide covers the deep link format specification and how to integrate them into your systems.",{"id":4346,"title":4347,"titles":4348,"content":4349,"level":579},"/utilities/deep-links#deep-link-format","Deep Link Format",[546],"The deep link general structure is as follows: qicardwallet://qicard/deeplink.htm?action=\u003Caction-name>&\u003Caction parameters>",{"id":4351,"title":4352,"titles":4353,"content":4354,"level":590},"/utilities/deep-links#h5-deeplink-format","H5+ Deeplink Format",[546,4347],"For opening H5+ Miniapps and passing data to them, use the following structure: qicardwallet://qicard/deeplink.htm?action=miniapp&miniappId=[0]&_griver_appended_url_part=[1] Fields explanationUse the Miniapp ID, obtained from the Miniapps console.This part consists of the URL path, query string and fragment",{"id":4356,"title":4357,"titles":4358,"content":4359,"level":579},"/utilities/deep-links#integration-usage","Integration & Usage",[546],"As this is a URI and not a URL (What's the difference?), we can't share it with users directly. However, we can use another approach where we direct the user to the Deep Link URI from a custom web page.",{"id":4361,"title":4362,"titles":4363,"content":4364,"level":590},"/utilities/deep-links#sample-javascript-code","Sample JavaScript Code",[546,4357],"The whole idea is to redirect the user visiting our web page to the Deep Link URI using this simple snippet: const url = `qicardwallet://qicard/deeplink.htm?action=miniapp&miniappId=${appID}&_griver_appended_url_part=${pathAndQuery}`\n\nwindow.onload = () => {\n  window.location.replace(url);\n}",{"id":4366,"title":4367,"titles":4368,"content":4369,"level":590},"/utilities/deep-links#advanced-handling","Advanced Handling",[546,4357],"We always strive for better user experience. Since the link would be publicly accessible, we can take a couple of extra steps to enhance the user's interaction with our system.",{"id":4371,"title":4372,"titles":4373,"content":4374,"level":739},"/utilities/deep-links#users-with-super-qi-not-installed","Users With Super Qi Not Installed",[546,4357,4367],"If the user does not have Super Qi installed, then the window.location.replace will not work, so we can introduce a delay to redirect the user to the store page for their respective platform: const url = `qicardwallet://qicard/deeplink.htm?action=miniapp&miniappId=${appID}&_griver_appended_url_part=${pathAndQuery}`\n\nconst config = {\n    timeout: 5 * 1000,\n    appStoreUrl: \"https://apps.apple.com/app/id1450079855\",\n    playStoreUrl: \"https://play.google.com/store/apps/details?id=iq.qicard.qipay.prod\"\n}\n\nwindow.onload = () => {\n    window.location.replace(url);\n\n    setTimeout(() => {\n        if (/android/i.test(navigator.userAgent)) {\n            window.location.replace(config.playStoreUrl);\n        } else if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {\n            window.location.replace(config.appStoreUrl);\n        }\n    }, config.timeout);\n} If a user is opening the page from PC, we can redirect them to a page with a QR code they can scan to take them to the first page",{"id":4376,"title":4377,"titles":4378,"content":4379,"level":579},"/utilities/deep-links#ready-implementation","Ready Implementation",[546],"You can use our own standard implementation for supporting deep links:\nhttps://deeplink.qi.iq",{"id":4381,"title":2726,"titles":4382,"content":4383,"level":590},"/utilities/deep-links#usage-example",[546,4377],"https://deeplink.qi.iq/[0]/[1] Your Miniapp ID obtained from the Miniapps consoleYour path and query params",{"id":4385,"title":4386,"titles":4387,"content":4388,"level":590},"/utilities/deep-links#working-examples","Working Examples",[546,4377],"If you have the UAT build of Super Qi, try the following link on your pc and phone:https://deeplink.qi.iq/3488010192546203/ If you're running the store version of Super Qi then open this link:https://deeplink.qi.iq/3488020185653655/ The trailing forward slash (/) is mandatory html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"id":552,"title":551,"titles":4390,"content":4391,"level":573},[],"Using Super Qi documentation with AI tools like ChatGPT and Claude This documentation is optimized for use with AI tools and Large Language Models (LLMs). You can use our documentation as context for AI assistants to help with your Super Qi Miniapp development.",{"id":4393,"title":4394,"titles":4395,"content":4396,"level":579},"/utilities/ai-integration#available-ai-optimized-files","Available AI-Optimized Files",[551],"We provide two static text files that contain the complete documentation in an AI-friendly format: /llms.txt - Condensed version of the documentation/llms-full.txt - Full comprehensive documentation with complete details",{"id":4398,"title":4399,"titles":4400,"content":637,"level":579},"/utilities/ai-integration#how-to-use","How to Use",[551],{"id":4402,"title":4403,"titles":4404,"content":4405,"level":590},"/utilities/ai-integration#with-chatgpt-claude-or-other-ai-chats","With ChatGPT, Claude, or Other AI Chats",[551,4399],"Copy the documentation URL for your environment:Condensed version: https://superqi-dev-docs.pages.dev/llms.txtFull version: https://superqi-dev-docs.pages.dev/llms-full.txtIn your AI chat, say:Please read https://superqi-dev-docs.pages.dev/llms.txt and help me with Super Qi Miniapp development\nThe AI will fetch the documentation and use it to answer your questions",{"id":4407,"title":4408,"titles":4409,"content":4410,"level":590},"/utilities/ai-integration#model-context-protocol-mcp-to-be-implemented","Model Context Protocol (MCP) - To Be Implemented",[551,4399],"An MCP (Model Context Protocol) server for Super Qi documentation is currently in development and will be deployed soon. This will provide a more seamless integration experience, allowing AI assistants to directly access and query the documentation through the MCP protocol. Note that MCP requires a server component, while the current documentation solution is plain and simple, using only frontend static files.",{"id":4412,"title":4413,"titles":4414,"content":4415,"level":590},"/utilities/ai-integration#example-queries","Example Queries",[551,4399],"Once the AI has loaded the documentation, you can ask questions like: \"How do I implement cashier payment in my Miniapp?\"\"What's the difference between UAT and production credentials?\"\"Show me how to use the authentication flow\"\"Help me set up deep links for my Miniapp\"\"What APIs are available for payment integration?\"\"How do I handle user authentication tokens?\"",{"id":4417,"title":4418,"titles":4419,"content":637,"level":579},"/utilities/ai-integration#use-cases","Use Cases",[551],{"id":4421,"title":4422,"titles":4423,"content":4424,"level":590},"/utilities/ai-integration#quick-problem-solving","Quick Problem Solving",[551,4418],"Ask the AI to help debug issues or explain specific concepts from the documentation without manually searching through multiple pages.",{"id":4426,"title":1833,"titles":4427,"content":4428,"level":590},"/utilities/ai-integration#code-examples",[551,4418],"Request code snippets and implementation examples based on the API reference and guides in the documentation.",{"id":4430,"title":4431,"titles":4432,"content":4433,"level":590},"/utilities/ai-integration#learning-onboarding","Learning & Onboarding",[551,4418],"New team members can use AI to get instant answers while learning the Super Qi platform, making onboarding faster. While AI can be incredibly helpful, always verify critical implementation details against the official documentation, especially for security-sensitive features like authentication and payments.",{"id":557,"title":556,"titles":4435,"content":4436,"level":573},[],"Complete guide to validating Super Qi webhook and API response signatures for secure payment integration",{"id":4438,"title":115,"titles":4439,"content":4440,"level":573},"/utilities/signature-validation#overview",[],"Super Qi uses RSA256 digital signatures to sign all webhook notifications and API responses. Validating these signatures is critical to ensure that: The request actually came from Super Qi (authentication)The data has not been tampered with (integrity)Your application processes only legitimate payment notifications Always validate signatures before processing webhook data. Skipping signature validation exposes your application to security risks including fraudulent payment notifications and data manipulation.",{"id":4442,"title":4443,"titles":4444,"content":637,"level":579},"/utilities/signature-validation#when-to-validate-signatures","When to Validate Signatures",[115],{"id":4446,"title":4447,"titles":4448,"content":4449,"level":590},"/utilities/signature-validation#webhooks-incoming-from-super-qi","Webhooks (Incoming from Super Qi)",[115,4443],"Always validate signatures for webhook notifications including: Payment notificationsRefund notificationsOrder status updatesAny asynchronous callbacks from Super Qi",{"id":4451,"title":4452,"titles":4453,"content":4454,"level":590},"/utilities/signature-validation#webhook-source-ip-addresses","Webhook Source IP Addresses",[115,4443],"If your infrastructure requires IP whitelisting, webhook calls from Super Qi will originate from the following IP addresses: 8.209.108.8047.254.141.23847.254.132.7 Ensure these IPs are whitelisted in your firewall or security group settings to receive webhook notifications.",{"id":4456,"title":4457,"titles":4458,"content":4459,"level":579},"/utilities/signature-validation#signature-format","Signature Format",[115],"Super Qi sends signatures in the Signature HTTP header with this format: Signature: algorithm=RSA256, keyVersion=2, signature=\u003Cbase64_encoded_signature> Components: algorithm - Always RSA256 (SHA256withRSA)keyVersion - Version number of the public key to usesignature - Base64-encoded RSA signature The keyVersion indicates which Super Qi public key to use for verification. Make sure you're using the correct public key version that matches the signatures you receive.",{"id":4461,"title":4462,"titles":4463,"content":637,"level":579},"/utilities/signature-validation#validation-process","Validation Process",[115],{"id":4465,"title":4466,"titles":4467,"content":4468,"level":590},"/utilities/signature-validation#step-1-extract-required-headers","Step 1: Extract Required Headers",[115,4462],"Extract these headers from the webhook request: clientID := request.Header.Get(\"Client-Id\")\nrequestTime := request.Header.Get(\"Request-Time\")\nsignatureHeader := request.Header.Get(\"Signature\")",{"id":4470,"title":4471,"titles":4472,"content":4473,"level":590},"/utilities/signature-validation#step-2-read-the-request-body","Step 2: Read the Request Body",[115,4462],"bodyBytes, err := io.ReadAll(request.Body)\nif err != nil {\n    return err\n}\nbodyString := string(bodyBytes) Important: Read the raw body bytes exactly as received. Do not parse, format, or modify the JSON before validation.",{"id":4475,"title":4476,"titles":4477,"content":4478,"level":590},"/utilities/signature-validation#step-3-construct-content-to-be-validated","Step 3: Construct Content to be Validated",[115,4462],"Build the content string that was signed by Super Qi: Format: \u003CHTTP_METHOD> \u003CHTTP_URI>\n\u003CClient-Id>.\u003CRequest-Time>.\u003CHTTP_BODY> Example: httpMethod := \"POST\"\npath := \"/api/payment/webhook\"\n\nsignContent := fmt.Sprintf(\"%s %s\\n%s.%s.%s\",\n    httpMethod,\n    path,\n    clientID,\n    requestTime,\n    bodyString,\n) Result: POST /api/payment/webhook\n\u003CClient-Id>.\u003CRequest-Time>.\u003CJSON_BODY>",{"id":4480,"title":4481,"titles":4482,"content":4483,"level":590},"/utilities/signature-validation#step-4-parse-the-signature-header","Step 4: Parse the Signature Header",[115,4462],"Extract the base64-encoded signature from the header: func parseSignature(signatureHeader string) (string, error) {\n    parts := strings.Split(signatureHeader, \",\")\n    for _, part := range parts {\n        part = strings.TrimSpace(part)\n        if strings.HasPrefix(part, \"signature=\") {\n            return strings.TrimPrefix(part, \"signature=\"), nil\n        }\n    }\n    return \"\", errors.New(\"signature not found in header\")\n}\n\nsignatureBase64, err := parseSignature(signatureHeader)\nif err != nil {\n    return err\n}",{"id":4485,"title":4486,"titles":4487,"content":4488,"level":590},"/utilities/signature-validation#step-5-decode-the-signature","Step 5: Decode the Signature",[115,4462],"signature, err := base64.StdEncoding.DecodeString(signatureBase64)\nif err != nil {\n    return fmt.Errorf(\"failed to decode signature: %v\", err)\n}",{"id":4490,"title":4491,"titles":4492,"content":4493,"level":590},"/utilities/signature-validation#step-6-verify-the-signature","Step 6: Verify the Signature",[115,4462],"Use the Super Qi public key to verify: import (\n    \"crypto\"\n    \"crypto/rsa\"\n    \"crypto/sha256\"\n)\n\n// Hash the sign content\nhash := sha256.Sum256([]byte(signContent))\n\n// Verify using Super Qi's public key\nerr = rsa.VerifyPKCS1v15(publicKey, crypto.SHA256, hash[:], signature)\nif err != nil {\n    return fmt.Errorf(\"signature verification failed: %v\", err)\n}\n\n// Signature is valid!",{"id":4495,"title":3155,"titles":4496,"content":4497,"level":579},"/utilities/signature-validation#complete-example",[115],"Here's a complete Go implementation: package webhook\n\nimport (\n    \"crypto\"\n    \"crypto/rsa\"\n    \"crypto/sha256\"\n    \"crypto/x509\"\n    \"encoding/base64\"\n    \"encoding/pem\"\n    \"errors\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n    \"strings\"\n)\n\ntype SignatureValidator struct {\n    publicKey *rsa.PublicKey\n}\n\nfunc NewSignatureValidator(publicKeyPath string) (*SignatureValidator, error) {\n    publicKey, err := loadPublicKey(publicKeyPath)\n    if err != nil {\n        return nil, err\n    }\n    return &SignatureValidator{publicKey: publicKey}, nil\n}\n\nfunc loadPublicKey(path string) (*rsa.PublicKey, error) {\n    pemData, err := os.ReadFile(path)\n    if err != nil {\n        return nil, err\n    }\n\n    block, _ := pem.Decode(pemData)\n    if block == nil {\n        return nil, errors.New(\"failed to parse PEM block\")\n    }\n\n    pub, err := x509.ParsePKIXPublicKey(block.Bytes)\n    if err != nil {\n        return nil, err\n    }\n\n    rsaPub, ok := pub.(*rsa.PublicKey)\n    if !ok {\n        return nil, errors.New(\"not an RSA public key\")\n    }\n\n    return rsaPub, nil\n}\n\nfunc (v *SignatureValidator) ValidateWebhook(\n    r *http.Request,\n    path string,\n) error {\n    // Extract headers\n    clientID := r.Header.Get(\"Client-Id\")\n    requestTime := r.Header.Get(\"Request-Time\")\n    signatureHeader := r.Header.Get(\"Signature\")\n\n    if clientID == \"\" || requestTime == \"\" || signatureHeader == \"\" {\n        return errors.New(\"missing required headers\")\n    }\n\n    // Read body\n    bodyBytes, err := io.ReadAll(r.Body)\n    if err != nil {\n        return err\n    }\n\n    // Construct sign content\n    signContent := fmt.Sprintf(\"POST %s\\n%s.%s.%s\",\n        path,\n        clientID,\n        requestTime,\n        string(bodyBytes),\n    )\n\n    // Parse signature\n    signatureBase64, err := parseSignatureHeader(signatureHeader)\n    if err != nil {\n        return err\n    }\n\n    // Decode signature\n    signature, err := base64.StdEncoding.DecodeString(signatureBase64)\n    if err != nil {\n        return fmt.Errorf(\"failed to decode signature: %v\", err)\n    }\n\n    // Hash sign content\n    hash := sha256.Sum256([]byte(signContent))\n\n    // Verify signature\n    err = rsa.VerifyPKCS1v15(v.publicKey, crypto.SHA256, hash[:], signature)\n    if err != nil {\n        return fmt.Errorf(\"signature verification failed: %v\", err)\n    }\n\n    return nil\n}\n\nfunc parseSignatureHeader(header string) (string, error) {\n    parts := strings.Split(header, \",\")\n    for _, part := range parts {\n        part = strings.TrimSpace(part)\n        if strings.HasPrefix(part, \"signature=\") {\n            return strings.TrimPrefix(part, \"signature=\"), nil\n        }\n    }\n    return \"\", errors.New(\"signature not found in header\")\n} Usage: func handleWebhook(w http.ResponseWriter, r *http.Request) {\n    validator, err := NewSignatureValidator(\"path/to/superqi_public_key.pem\")\n    if err != nil {\n        http.Error(w, \"Server configuration error\", 500)\n        return\n    }\n\n    err = validator.ValidateWebhook(r, \"/api/payment/webhook\")\n    if err != nil {\n        log.Printf(\"Invalid signature: %v\", err)\n        http.Error(w, \"Invalid signature\", 401)\n        return\n    }\n\n    // Signature is valid - safe to process webhook\n    // ... process payment notification\n}",{"id":4499,"title":4500,"titles":4501,"content":637,"level":579},"/utilities/signature-validation#public-key-management","Public Key Management",[115],{"id":4503,"title":4504,"titles":4505,"content":4506,"level":590},"/utilities/signature-validation#obtaining-the-public-key","Obtaining the Public Key",[115,4500],"Use the RSA public key that matches your environment for signature verification (PEM format). Make sure you use the UAT key when validating signatures from the UAT environment and the Production key when validating signatures from production.",{"id":4508,"title":4509,"titles":4510,"content":4511,"level":739},"/utilities/signature-validation#uat-public-key","UAT Public Key",[115,4500,4504],"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA249W/txwtMNVMw2jv5uN\nu06atBtlvOon+EYopcBV1WzSKXsllq8k+5GEKaRw2n2A2Ix7IalDLfxf5cbPLLnC\nIdqyPEfeoQBN2xBL2m0cjFFoPL0JJIHHHvJs75MVR8bpUFuipGOxK+a4316mMlRv\neX4F+YmpCJFXoHgJzJrQlglRNO/HZYQVaP3JRZg4KNSg1o2esxgaCImhCt8owegw\nou9GgYlEYpQjlQYSAgGill36nIMEoUqUqVYUA0o4sOLYPb2hepUROED8Zuc0mW/q\noGVQBihuZInhM2UOiuuw/tP/cpmNbMR9SeCbEDUt9HHd60KpXciNim96tz1zIZQv\njQIDAQAB\n-----END PUBLIC KEY-----",{"id":4513,"title":4514,"titles":4515,"content":4516,"level":739},"/utilities/signature-validation#production-public-key","Production Public Key",[115,4500,4504],"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvTCsasBhpdL0juG1mql4\n8efGDM//c/GBcVs/weV0BQKQ6fdBYbgLZ0uR+OSsd4krEw3CltsQKUjE5B3VSjD1\nxB2aYNe2uF7xIdqPlYlYGnXiQUTuXtOuNQMc9myFGZlhPPVJwotySOFRgjgv79ua\nNLYaqlDYvUHyGaJACOfFAq9z2cn/KYysJPZQXikMToT2WaRzvmT1xjYDodd2jdq7\nSDBNRZrp8loM25z4Q/MbcHxFYTssWU7i+DsIgUAsK7T832QXMLtYm45pa4UVPduP\nRG02LDRQfzQkyXkrIe/DyjSwBL+AjFTgWiecrmknCdTSiMyUd1CYmYyRfEuKFv0e\nCQIDAQAB\n-----END PUBLIC KEY----- If you encounter any issues with signature validation, please contact the Super Qi MiniApp team.",{"id":4518,"title":4519,"titles":4520,"content":637,"level":579},"/utilities/signature-validation#common-issues-troubleshooting","Common Issues & Troubleshooting",[115],{"id":4522,"title":4523,"titles":4524,"content":4525,"level":590},"/utilities/signature-validation#issue-signature-verification-failed-cryptorsa-verification-error","Issue: \"signature verification failed: crypto/rsa: verification error\"",[115,4519],"Possible Causes: Wrong public key - Ensure you're using the correct key for the keyVersionIncorrect path - The HTTP path in sign content must match exactly (e.g., /api/payment/webhook)Modified body - Don't parse or reformat JSON before validationWrong timestamp header - Use Request-Time for webhooks, not Response-Time Debug Steps: // Log the exact sign content\nlog.Printf(\"Sign Content:\\n%s\", signContent)\n\n// Verify it matches this format:\n// POST /api/payment/webhook\n// \u003CClient-Id>.\u003CRequest-Time>.\u003CJSON_BODY>",{"id":4527,"title":4528,"titles":4529,"content":4530,"level":590},"/utilities/signature-validation#issue-signature-not-found-in-header","Issue: \"signature not found in header\"",[115,4519],"The signature header has spaces after commas. Make sure to trim spaces: part = strings.TrimSpace(part)  // Important!\nif strings.HasPrefix(part, \"signature=\") {\n    return strings.TrimPrefix(part, \"signature=\")\n}",{"id":4532,"title":4533,"titles":4534,"content":4535,"level":590},"/utilities/signature-validation#issue-failed-to-parse-pem-block","Issue: \"failed to parse PEM block\"",[115,4519],"Possible Causes: Public key file is corrupted or incompleteWrong file format (not PEM)Extra spaces or characters in the key file Verification: # Check if it's a valid public key\nopenssl rsa -pubin -in superqi_public_key.pem -text -noout",{"id":4537,"title":4538,"titles":4539,"content":4540,"level":590},"/utilities/signature-validation#issue-different-signatures-for-same-content","Issue: Different signatures for same content",[115,4519],"This is normal. RSA signatures include random padding (PKCS#1 v1.5), so the same content will produce different signatures each time. This doesn't affect verification.",{"id":4542,"title":4543,"titles":4544,"content":4545,"level":579},"/utilities/signature-validation#summary","Summary",[115],"Signature validation is essential for secure Super Qi integration: Extract Client-Id, Request-Time, Signature headersConstruct sign content: POST \u003Cpath>\\n\u003CClient-Id>.\u003CRequest-Time>.\u003CBody>Parse the base64 signature from the Signature headerVerify using RSA SHA256 with Super Qi's public keyProcess webhook only if signature is valid html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"id":561,"title":560,"titles":4547,"content":4548,"level":573},[],"Frequently asked questions about Super Qi Miniapp development.",{"id":4550,"title":4551,"titles":4552,"content":4553,"level":579},"/faq#before-you-ask","Before You Ask",[560],"We highly recommend reviewing this FAQ before reaching out to the Miniapps team. Many common questions have already been answered here, which means you can get the information you need right away without waiting for a response. Taking a few minutes to browse through these frequently asked questions might save you time and help you resolve issues more quickly. If you don't find what you're looking for, we're always here to help!",{"id":4555,"title":4556,"titles":4557,"content":4558,"level":579},"/faq#frequently-asked-questions","Frequently Asked Questions",[560],"UAT (User Acceptance Testing) credentials are used for testing your Miniapp in a sandbox environment. They allow you to test all features without affecting real users or processing real transactions. Production credentials are used for your live Miniapp and process real transactions with actual money. Always test thoroughly with UAT credentials before moving to production.The documentation you're reading and the Miniapp system as a whole are specifically designed for building Miniapps within Super Qi. This is a different system from the standard Qi Payment Gateway integration.Miniapps use an internal payment system that is built into the Super Qi platform. If you're looking to integrate directly with the Qi Payment Gateway (outside of the Miniapp context), that is managed by a separate team with different documentation and integration procedures.To get in touch with the Payment Gateway team and obtain the necessary contact information and documentation for standard payment integration, please contact your account manager. They will provide you with the appropriate team contacts and resources for your integration needs.The security review process typically takes anywhere from a few days to a couple of weeks, depending on the complexity of your Miniapp and the current review queue. The security team will thoroughly test your Miniapp's functionality, security, and compliance with Super Qi guidelines. You'll be contacted if they have any questions or concerns during the review.Yes! You can create new versions of your Miniapp at any time. Simply create a new version in the Super Qi Console with your updated code, test it thoroughly with UAT credentials, then submit it for release following the same process.If you've committed credentials to Git, immediately rotate your credentials by contacting the Miniapps team. Remove the credentials from your repository history using tools like git filter-branch or BFG Repo-Cleaner. Never reuse exposed credentials, even if you delete them from your repository.There are many factors in UAT that can cause \"Operation Failed\" errors. First, make sure you have the following configured correctly: you're using the latest UAT version of the Super Qi app, your environment is set to UAT (not Production), and you're logged into one of the KYC accounts we provided for you. If you're developing and testing your Miniapp and still getting \"Operation Failed\", please ensure your phone and machine are on the same network, and verify that the Miniapp version you're testing is configured for UAT (not Production) since you're testing in the UAT environment. If problem still persists, then please contact the Miniapp team.No, you can use the same credentials since you are the same merchantCashier payment (CASHIER_PAYMENT) is a one-time payment where users authorize each transaction individually by scanning a QR code or payment link. Agreement payment (AGREEMENT_PAYMENT) is a recurring payment setup where users grant permission once, and your Miniapp can charge them in the future without additional authorization. Agreement payments are ideal for subscriptions and recurring billing, while cashier payments are better for one-time purchases. Keep in mind that the agreement payment requires a special scopeSuper Qi supports two distinct user types, each with their own set of authorization scopes:Customer User Scopes are used when your Miniapp needs to access information about individual end-users (consumers). These scopes allow you to retrieve personal information such as user ID, name, avatar, contact information, and preferences. Use Customer scopes when building Miniapps for regular consumers, such as shopping apps, food delivery services, or entertainment platforms. Examples include: USER_ID, USER_NAME, USER_AVATAR, USER_CONTACTINFO, and auth_base.Business (Merchant) User Scopes are used when your Miniapp needs to access information about business users or merchants on the platform to make purchases. These scopes are designed for B2B scenarios where one merchant needs to interact with another merchant and buy their products or related reasons. They allow you to retrieve business-specific information like merchant ID, business name, and merchant logo. Use Business scopes when building Miniapps that facilitate business-to-business transactions. Examples include: MERCHANT_ID, MERCHANT_NAME, MERCHANT_LOGO, and auth_base (for merchants).Important: You must use the appropriate scope type based on your target audience. Attempting to use Customer scopes to retrieve Business user data (or vice versa) will fail. For a complete list of available scopes, see the getAuthCode Scope Reference.All monetary values in payment APIs must be expressed in fils, which is the smallest currency unit of IQD (Iraqi Dinar). Since 1 IQD = 1000 fils, you need to multiply your IQD amount by 1000. For example, 150 IQD should be sent as 150000 fils. This applies to all payment-related API endpoints including pay, inquiry, and refund operations.",{"id":4560,"title":4561,"titles":4562,"content":4563,"level":579},"/faq#still-need-help","Still Need Help?",[560],"If you couldn't find the answer to your question in this FAQ, don't hesitate to reach out to our Miniapps team. We're here to help you succeed with your Miniapp development. Contact: Hani Salih\nMiniapps Software Engineer\nEmail: hani.salih@qi.iq When contacting us, please include as much detail as possible about your issue:What you're trying to accomplishWhat you've already triedAny error messages you're seeingYour Super Qi / UAT versionYour Miniapp nameThis helps us provide you with faster and more accurate support.",{"id":566,"title":565,"titles":4565,"content":4566,"level":573},[],"Stay up to date with the latest changes and improvements to the Super Qi Miniapps Documentation",{"id":4568,"title":115,"body":4569,"description":2599,"extension":5936,"links":5937,"meta":5938,"navigation":5939,"path":252,"seo":5940,"stem":253,"__hash__":5941},"docs/2.api-reference/4.jsapi/1.index.md",{"type":4570,"value":4571,"toc":5916},"minimark",[4572,4576,4585,4599,4602,4609,4615,4619,4622,4650,4653,4655,4658,4661,4706,4722,4725,4727,4730,4733,4789,4792,4799,4869,4875,4878,4897,4900,4907,4912,5124,5129,5332,5337,5501,5504,5506,5512,5518,5638,5643,5746,5749,5752,5887,5896,5899,5912],[4573,4574,115],"h2",{"id":4575},"overview",[4577,4578,4579,4580,4584],"p",{},"The Super Qi framework provides developers with comprehensive JSAPI capabilities to build diversified and convenient services for users. JSAPIs are ",[4581,4582,4583],"strong",{},"client-side JavaScript functions"," that Mini Programs call directly within the application to access device features, user data, and platform services.",[4586,4587,4588],"warning",{},[4577,4589,4590,4591,4594,4595,4598],{},"JSAPIs are called from your ",[4581,4592,4593],{},"Mini Program client"," (front-end), while Open APIs are called from your ",[4581,4596,4597],{},"merchant backend",". Choose the appropriate API type based on where the functionality is needed.",[4573,4600,2606],{"id":4601},"js-bridge-architecture",[4577,4603,4604,4605,4608],{},"Mini Programs launched to different native apps run on different containers, which may support varying JSAPI implementations. To resolve this, Super Qi provides a ",[4581,4606,4607],{},"JavaScript Bridge (JS Bridge)"," that standardizes JSAPI calls across different platforms.",[4577,4610,4611],{},[4612,4613],"img",{"alt":2606,"src":4614},"/api-reference/js-bridge.jpeg",[4616,4617,2611],"h3",{"id":4618},"how-js-bridge-works",[4577,4620,4621],{},"JS Bridge acts as a two-way communication channel between JavaScript code in your Mini Program and native code in the host application. This allows:",[4623,4624,4625,4632,4638,4644],"ul",{},[4626,4627,4628,4631],"li",{},[4581,4629,4630],{},"Unified API calls"," across different native apps",[4626,4633,4634,4637],{},[4581,4635,4636],{},"Platform abstraction"," - developers write once, run everywhere",[4626,4639,4640,4643],{},[4581,4641,4642],{},"Native feature access"," - camera, location, payments, etc.",[4626,4645,4646,4649],{},[4581,4647,4648],{},"Consistent behavior"," regardless of the host application",[4573,4651,2616],{"id":4652},"sdk-integration",[4577,4654,2618],{},[4616,4656,2621],{"id":4657},"import-the-sdk",[4577,4659,4660],{},"Add the following script tag to your Mini Program's HTML file:",[4662,4663,4667],"pre",{"className":4664,"code":4665,"language":4666,"meta":637,"style":637},"language-html shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript src=\"https://cdn.marmot-cloud.com/npm/hylid-bridge/2.10.0/index.js\">\u003C/script>\n","html",[4668,4669,4670],"code",{"__ignoreMap":637},[4671,4672,4674,4678,4682,4686,4689,4692,4696,4698,4701,4703],"span",{"class":4673,"line":573},"line",[4671,4675,4677],{"class":4676},"sMK4o","\u003C",[4671,4679,4681],{"class":4680},"swJcz","script",[4671,4683,4685],{"class":4684},"spNyl"," src",[4671,4687,4688],{"class":4676},"=",[4671,4690,4691],{"class":4676},"\"",[4671,4693,4695],{"class":4694},"sfazB","https://cdn.marmot-cloud.com/npm/hylid-bridge/2.10.0/index.js",[4671,4697,4691],{"class":4676},[4671,4699,4700],{"class":4676},">\u003C/",[4671,4702,4681],{"class":4680},[4671,4704,4705],{"class":4676},">\n",[4586,4707,4708],{},[4577,4709,4710,4711,4714,4715,4714,4718,4721],{},"This SDK provides access to all standard JSAPIs including ",[4668,4712,4713],{},"my.getAuthCode",", ",[4668,4716,4717],{},"my.tradePay",[4668,4719,4720],{},"my.alert",", and more which are found under the \"Essential APIs\" section.",[4573,4723,2626],{"id":4724},"api-conventions",[4577,4726,2628],{},[4616,4728,2631],{"id":4729},"api-naming-patterns",[4577,4731,4732],{},"JSAPIs use different prefixes based on their purpose:",[4734,4735,4736,4752],"table",{},[4737,4738,4739],"thead",{},[4740,4741,4742,4746,4749],"tr",{},[4743,4744,4745],"th",{},"Prefix",[4743,4747,4748],{},"Purpose",[4743,4750,4751],{},"Example",[4753,4754,4755,4774],"tbody",{},[4740,4756,4757,4763,4766],{},[4758,4759,4760],"td",{},[4668,4761,4762],{},"my.*",[4758,4764,4765],{},"Standard synchronous or callback-based APIs",[4758,4767,4768,4714,4771],{},[4668,4769,4770],{},"my.alert()",[4668,4772,4773],{},"my.httpRequest()",[4740,4775,4776,4781,4784],{},[4758,4777,4778],{},[4668,4779,4780],{},"AlipayJSBridge.call",[4758,4782,4783],{},"Special bridge calls for certain features",[4758,4785,4786],{},[4668,4787,4788],{},"AlipayJSBridge.call('qicardSignContract')",[4616,4790,2636],{"id":4791},"standard-apis",[4577,4793,4794,4795,4798],{},"All other JSAPI interfaces accept an ",[4581,4796,4797],{},"object as a parameter"," with the following common properties:",[4734,4800,4801,4817],{},[4737,4802,4803],{},[4740,4804,4805,4808,4811,4814],{},[4743,4806,4807],{},"Property",[4743,4809,4810],{},"Type",[4743,4812,4813],{},"Required",[4743,4815,4816],{},"Description",[4753,4818,4819,4837,4853],{},[4740,4820,4821,4826,4831,4834],{},[4758,4822,4823],{},[4668,4824,4825],{},"success",[4758,4827,4828],{},[4668,4829,4830],{},"Function",[4758,4832,4833],{},"No",[4758,4835,4836],{},"Callback executed when the API call succeeds",[4740,4838,4839,4844,4848,4850],{},[4758,4840,4841],{},[4668,4842,4843],{},"fail",[4758,4845,4846],{},[4668,4847,4830],{},[4758,4849,4833],{},[4758,4851,4852],{},"Callback executed when the API call fails",[4740,4854,4855,4860,4864,4866],{},[4758,4856,4857],{},[4668,4858,4859],{},"complete",[4758,4861,4862],{},[4668,4863,4830],{},[4758,4865,4833],{},[4758,4867,4868],{},"Callback executed after success or failure",[4577,4870,4871,4874],{},[4581,4872,4873],{},"Additional API-specific properties"," vary depending on the functionality.",[4616,4876,2641],{"id":4877},"callback-results",[4623,4879,4880,4883,4894],{},[4626,4881,4882],{},"Callback functions receive a result object as their parameter",[4626,4884,4885,4886,4889,4890,4893],{},"If the result contains ",[4668,4887,4888],{},"error"," or ",[4668,4891,4892],{},"errorMessage"," fields, the call failed",[4626,4895,4896],{},"Success callbacks receive API-specific data",[4616,4898,2646],{"id":4899},"promise-support",[4577,4901,4902,4903,4906],{},"All standard APIs return a ",[4581,4904,4905],{},"Promise object",", allowing you to use modern async/await syntax or promise chaining.",[4577,4908,4909],{},[4581,4910,4911],{},"Callback Example:",[4662,4913,4917],{"className":4914,"code":4915,"language":4916,"meta":637,"style":637},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","my.httpRequest({\n  url: '/api/data',\n  success(res) {\n    console.log('Success:', res.data);\n  },\n  fail(res) {\n    console.log('Error:', res.error, res.errorMessage);\n  },\n  complete(res) {\n    console.log('Request completed');\n  }\n});\n","javascript",[4668,4918,4919,4938,4958,4975,5010,5015,5029,5067,5072,5086,5108,5114],{"__ignoreMap":637},[4671,4920,4921,4925,4928,4932,4935],{"class":4673,"line":573},[4671,4922,4924],{"class":4923},"sTEyZ","my",[4671,4926,4927],{"class":4676},".",[4671,4929,4931],{"class":4930},"s2Zo4","httpRequest",[4671,4933,4934],{"class":4923},"(",[4671,4936,4937],{"class":4676},"{\n",[4671,4939,4940,4943,4946,4949,4952,4955],{"class":4673,"line":579},[4671,4941,4942],{"class":4680},"  url",[4671,4944,4945],{"class":4676},":",[4671,4947,4948],{"class":4676}," '",[4671,4950,4951],{"class":4694},"/api/data",[4671,4953,4954],{"class":4676},"'",[4671,4956,4957],{"class":4676},",\n",[4671,4959,4960,4963,4965,4969,4972],{"class":4673,"line":590},[4671,4961,4962],{"class":4680},"  success",[4671,4964,4934],{"class":4676},[4671,4966,4968],{"class":4967},"sHdIc","res",[4671,4970,4971],{"class":4676},")",[4671,4973,4974],{"class":4676}," {\n",[4671,4976,4977,4980,4982,4985,4987,4989,4992,4994,4997,5000,5002,5005,5007],{"class":4673,"line":739},[4671,4978,4979],{"class":4923},"    console",[4671,4981,4927],{"class":4676},[4671,4983,4984],{"class":4930},"log",[4671,4986,4934],{"class":4680},[4671,4988,4954],{"class":4676},[4671,4990,4991],{"class":4694},"Success:",[4671,4993,4954],{"class":4676},[4671,4995,4996],{"class":4676},",",[4671,4998,4999],{"class":4923}," res",[4671,5001,4927],{"class":4676},[4671,5003,5004],{"class":4923},"data",[4671,5006,4971],{"class":4680},[4671,5008,5009],{"class":4676},";\n",[4671,5011,5012],{"class":4673,"line":753},[4671,5013,5014],{"class":4676},"  },\n",[4671,5016,5018,5021,5023,5025,5027],{"class":4673,"line":5017},6,[4671,5019,5020],{"class":4680},"  fail",[4671,5022,4934],{"class":4676},[4671,5024,4968],{"class":4967},[4671,5026,4971],{"class":4676},[4671,5028,4974],{"class":4676},[4671,5030,5032,5034,5036,5038,5040,5042,5045,5047,5049,5051,5053,5055,5057,5059,5061,5063,5065],{"class":4673,"line":5031},7,[4671,5033,4979],{"class":4923},[4671,5035,4927],{"class":4676},[4671,5037,4984],{"class":4930},[4671,5039,4934],{"class":4680},[4671,5041,4954],{"class":4676},[4671,5043,5044],{"class":4694},"Error:",[4671,5046,4954],{"class":4676},[4671,5048,4996],{"class":4676},[4671,5050,4999],{"class":4923},[4671,5052,4927],{"class":4676},[4671,5054,4888],{"class":4923},[4671,5056,4996],{"class":4676},[4671,5058,4999],{"class":4923},[4671,5060,4927],{"class":4676},[4671,5062,4892],{"class":4923},[4671,5064,4971],{"class":4680},[4671,5066,5009],{"class":4676},[4671,5068,5070],{"class":4673,"line":5069},8,[4671,5071,5014],{"class":4676},[4671,5073,5075,5078,5080,5082,5084],{"class":4673,"line":5074},9,[4671,5076,5077],{"class":4680},"  complete",[4671,5079,4934],{"class":4676},[4671,5081,4968],{"class":4967},[4671,5083,4971],{"class":4676},[4671,5085,4974],{"class":4676},[4671,5087,5089,5091,5093,5095,5097,5099,5102,5104,5106],{"class":4673,"line":5088},10,[4671,5090,4979],{"class":4923},[4671,5092,4927],{"class":4676},[4671,5094,4984],{"class":4930},[4671,5096,4934],{"class":4680},[4671,5098,4954],{"class":4676},[4671,5100,5101],{"class":4694},"Request completed",[4671,5103,4954],{"class":4676},[4671,5105,4971],{"class":4680},[4671,5107,5009],{"class":4676},[4671,5109,5111],{"class":4673,"line":5110},11,[4671,5112,5113],{"class":4676},"  }\n",[4671,5115,5117,5120,5122],{"class":4673,"line":5116},12,[4671,5118,5119],{"class":4676},"}",[4671,5121,4971],{"class":4923},[4671,5123,5009],{"class":4676},[4577,5125,5126],{},[4581,5127,5128],{},"Promise Example:",[4662,5130,5132],{"className":4914,"code":5131,"language":4916,"meta":637,"style":637},"my.httpRequest({\n  url: '/api/data',\n  success(res1) {\n    console.log('Callback result:', res1);\n  }\n}).then((res2) => {\n  // res1 === res2\n  console.log('Promise result:', res2.data);\n}).catch((res) => {\n  console.log('Error:', res.error, res.errorMessage);\n});\n",[4668,5133,5134,5146,5160,5173,5199,5203,5228,5234,5265,5288,5324],{"__ignoreMap":637},[4671,5135,5136,5138,5140,5142,5144],{"class":4673,"line":573},[4671,5137,4924],{"class":4923},[4671,5139,4927],{"class":4676},[4671,5141,4931],{"class":4930},[4671,5143,4934],{"class":4923},[4671,5145,4937],{"class":4676},[4671,5147,5148,5150,5152,5154,5156,5158],{"class":4673,"line":579},[4671,5149,4942],{"class":4680},[4671,5151,4945],{"class":4676},[4671,5153,4948],{"class":4676},[4671,5155,4951],{"class":4694},[4671,5157,4954],{"class":4676},[4671,5159,4957],{"class":4676},[4671,5161,5162,5164,5166,5169,5171],{"class":4673,"line":590},[4671,5163,4962],{"class":4680},[4671,5165,4934],{"class":4676},[4671,5167,5168],{"class":4967},"res1",[4671,5170,4971],{"class":4676},[4671,5172,4974],{"class":4676},[4671,5174,5175,5177,5179,5181,5183,5185,5188,5190,5192,5195,5197],{"class":4673,"line":739},[4671,5176,4979],{"class":4923},[4671,5178,4927],{"class":4676},[4671,5180,4984],{"class":4930},[4671,5182,4934],{"class":4680},[4671,5184,4954],{"class":4676},[4671,5186,5187],{"class":4694},"Callback result:",[4671,5189,4954],{"class":4676},[4671,5191,4996],{"class":4676},[4671,5193,5194],{"class":4923}," res1",[4671,5196,4971],{"class":4680},[4671,5198,5009],{"class":4676},[4671,5200,5201],{"class":4673,"line":753},[4671,5202,5113],{"class":4676},[4671,5204,5205,5207,5209,5211,5214,5216,5218,5221,5223,5226],{"class":4673,"line":5017},[4671,5206,5119],{"class":4676},[4671,5208,4971],{"class":4923},[4671,5210,4927],{"class":4676},[4671,5212,5213],{"class":4930},"then",[4671,5215,4934],{"class":4923},[4671,5217,4934],{"class":4676},[4671,5219,5220],{"class":4967},"res2",[4671,5222,4971],{"class":4676},[4671,5224,5225],{"class":4684}," =>",[4671,5227,4974],{"class":4676},[4671,5229,5230],{"class":4673,"line":5031},[4671,5231,5233],{"class":5232},"sHwdD","  // res1 === res2\n",[4671,5235,5236,5239,5241,5243,5245,5247,5250,5252,5254,5257,5259,5261,5263],{"class":4673,"line":5069},[4671,5237,5238],{"class":4923},"  console",[4671,5240,4927],{"class":4676},[4671,5242,4984],{"class":4930},[4671,5244,4934],{"class":4680},[4671,5246,4954],{"class":4676},[4671,5248,5249],{"class":4694},"Promise result:",[4671,5251,4954],{"class":4676},[4671,5253,4996],{"class":4676},[4671,5255,5256],{"class":4923}," res2",[4671,5258,4927],{"class":4676},[4671,5260,5004],{"class":4923},[4671,5262,4971],{"class":4680},[4671,5264,5009],{"class":4676},[4671,5266,5267,5269,5271,5273,5276,5278,5280,5282,5284,5286],{"class":4673,"line":5074},[4671,5268,5119],{"class":4676},[4671,5270,4971],{"class":4923},[4671,5272,4927],{"class":4676},[4671,5274,5275],{"class":4930},"catch",[4671,5277,4934],{"class":4923},[4671,5279,4934],{"class":4676},[4671,5281,4968],{"class":4967},[4671,5283,4971],{"class":4676},[4671,5285,5225],{"class":4684},[4671,5287,4974],{"class":4676},[4671,5289,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,5320,5322],{"class":4673,"line":5088},[4671,5291,5238],{"class":4923},[4671,5293,4927],{"class":4676},[4671,5295,4984],{"class":4930},[4671,5297,4934],{"class":4680},[4671,5299,4954],{"class":4676},[4671,5301,5044],{"class":4694},[4671,5303,4954],{"class":4676},[4671,5305,4996],{"class":4676},[4671,5307,4999],{"class":4923},[4671,5309,4927],{"class":4676},[4671,5311,4888],{"class":4923},[4671,5313,4996],{"class":4676},[4671,5315,4999],{"class":4923},[4671,5317,4927],{"class":4676},[4671,5319,4892],{"class":4923},[4671,5321,4971],{"class":4680},[4671,5323,5009],{"class":4676},[4671,5325,5326,5328,5330],{"class":4673,"line":5110},[4671,5327,5119],{"class":4676},[4671,5329,4971],{"class":4923},[4671,5331,5009],{"class":4676},[4577,5333,5334],{},[4581,5335,5336],{},"Async/Await Example:",[4662,5338,5340],{"className":4914,"code":5339,"language":4916,"meta":637,"style":637},"async function fetchData() {\n  try {\n    const res = await my.httpRequest({ url: '/api/data' });\n    console.log('Data:', res.data);\n  } catch (res) {\n    console.log('Error:', res.error, res.errorMessage);\n  }\n}\n",[4668,5341,5342,5358,5366,5409,5438,5456,5492,5496],{"__ignoreMap":637},[4671,5343,5344,5347,5350,5353,5356],{"class":4673,"line":573},[4671,5345,5346],{"class":4684},"async",[4671,5348,5349],{"class":4684}," function",[4671,5351,5352],{"class":4930}," fetchData",[4671,5354,5355],{"class":4676},"()",[4671,5357,4974],{"class":4676},[4671,5359,5360,5364],{"class":4673,"line":579},[4671,5361,5363],{"class":5362},"s7zQu","  try",[4671,5365,4974],{"class":4676},[4671,5367,5368,5371,5373,5376,5379,5382,5384,5386,5388,5391,5394,5396,5398,5400,5402,5405,5407],{"class":4673,"line":590},[4671,5369,5370],{"class":4684},"    const",[4671,5372,4999],{"class":4923},[4671,5374,5375],{"class":4676}," =",[4671,5377,5378],{"class":5362}," await",[4671,5380,5381],{"class":4923}," my",[4671,5383,4927],{"class":4676},[4671,5385,4931],{"class":4930},[4671,5387,4934],{"class":4680},[4671,5389,5390],{"class":4676},"{",[4671,5392,5393],{"class":4680}," url",[4671,5395,4945],{"class":4676},[4671,5397,4948],{"class":4676},[4671,5399,4951],{"class":4694},[4671,5401,4954],{"class":4676},[4671,5403,5404],{"class":4676}," }",[4671,5406,4971],{"class":4680},[4671,5408,5009],{"class":4676},[4671,5410,5411,5413,5415,5417,5419,5421,5424,5426,5428,5430,5432,5434,5436],{"class":4673,"line":739},[4671,5412,4979],{"class":4923},[4671,5414,4927],{"class":4676},[4671,5416,4984],{"class":4930},[4671,5418,4934],{"class":4680},[4671,5420,4954],{"class":4676},[4671,5422,5423],{"class":4694},"Data:",[4671,5425,4954],{"class":4676},[4671,5427,4996],{"class":4676},[4671,5429,4999],{"class":4923},[4671,5431,4927],{"class":4676},[4671,5433,5004],{"class":4923},[4671,5435,4971],{"class":4680},[4671,5437,5009],{"class":4676},[4671,5439,5440,5443,5446,5449,5451,5454],{"class":4673,"line":753},[4671,5441,5442],{"class":4676},"  }",[4671,5444,5445],{"class":5362}," catch",[4671,5447,5448],{"class":4680}," (",[4671,5450,4968],{"class":4923},[4671,5452,5453],{"class":4680},") ",[4671,5455,4937],{"class":4676},[4671,5457,5458,5460,5462,5464,5466,5468,5470,5472,5474,5476,5478,5480,5482,5484,5486,5488,5490],{"class":4673,"line":5017},[4671,5459,4979],{"class":4923},[4671,5461,4927],{"class":4676},[4671,5463,4984],{"class":4930},[4671,5465,4934],{"class":4680},[4671,5467,4954],{"class":4676},[4671,5469,5044],{"class":4694},[4671,5471,4954],{"class":4676},[4671,5473,4996],{"class":4676},[4671,5475,4999],{"class":4923},[4671,5477,4927],{"class":4676},[4671,5479,4888],{"class":4923},[4671,5481,4996],{"class":4676},[4671,5483,4999],{"class":4923},[4671,5485,4927],{"class":4676},[4671,5487,4892],{"class":4923},[4671,5489,4971],{"class":4680},[4671,5491,5009],{"class":4676},[4671,5493,5494],{"class":4673,"line":5031},[4671,5495,5113],{"class":4676},[4671,5497,5498],{"class":4673,"line":5069},[4671,5499,5500],{"class":4676},"}\n",[4573,5502,2651],{"id":5503},"api-interface-definition",[4577,5505,2653],{},[4616,5507,5509,5510],{"id":5508},"example-myalert","Example - ",[4668,5511,4720],{},[4577,5513,5514,5515,5517],{},"The ",[4668,5516,4720],{}," API displays a simple alert dialog. Here's how its interface is defined:",[4662,5519,5523],{"className":5520,"code":5521,"language":5522,"meta":637,"style":637},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","interface IAlertOptions {\n  title?: string;          // Alert dialog title\n  content?: string;        // Alert dialog content\n  buttonText?: string;     // Button label text\n  success?: () => void;    // Success callback\n  fail?: () => void;       // Failure callback\n  complete?: () => void;   // Completion callback\n}\n","typescript",[4668,5524,5525,5536,5553,5567,5581,5600,5617,5634],{"__ignoreMap":637},[4671,5526,5527,5530,5534],{"class":4673,"line":573},[4671,5528,5529],{"class":4684},"interface",[4671,5531,5533],{"class":5532},"sBMFI"," IAlertOptions",[4671,5535,4974],{"class":4676},[4671,5537,5538,5541,5544,5547,5550],{"class":4673,"line":579},[4671,5539,5540],{"class":4680},"  title",[4671,5542,5543],{"class":4676},"?:",[4671,5545,5546],{"class":5532}," string",[4671,5548,5549],{"class":4676},";",[4671,5551,5552],{"class":5232},"          // Alert dialog title\n",[4671,5554,5555,5558,5560,5562,5564],{"class":4673,"line":590},[4671,5556,5557],{"class":4680},"  content",[4671,5559,5543],{"class":4676},[4671,5561,5546],{"class":5532},[4671,5563,5549],{"class":4676},[4671,5565,5566],{"class":5232},"        // Alert dialog content\n",[4671,5568,5569,5572,5574,5576,5578],{"class":4673,"line":739},[4671,5570,5571],{"class":4680},"  buttonText",[4671,5573,5543],{"class":4676},[4671,5575,5546],{"class":5532},[4671,5577,5549],{"class":4676},[4671,5579,5580],{"class":5232},"     // Button label text\n",[4671,5582,5583,5585,5587,5590,5592,5595,5597],{"class":4673,"line":753},[4671,5584,4962],{"class":4680},[4671,5586,5543],{"class":4676},[4671,5588,5589],{"class":4676}," ()",[4671,5591,5225],{"class":4684},[4671,5593,5594],{"class":5532}," void",[4671,5596,5549],{"class":4676},[4671,5598,5599],{"class":5232},"    // Success callback\n",[4671,5601,5602,5604,5606,5608,5610,5612,5614],{"class":4673,"line":5017},[4671,5603,5020],{"class":4680},[4671,5605,5543],{"class":4676},[4671,5607,5589],{"class":4676},[4671,5609,5225],{"class":4684},[4671,5611,5594],{"class":5532},[4671,5613,5549],{"class":4676},[4671,5615,5616],{"class":5232},"       // Failure callback\n",[4671,5618,5619,5621,5623,5625,5627,5629,5631],{"class":4673,"line":5031},[4671,5620,5077],{"class":4680},[4671,5622,5543],{"class":4676},[4671,5624,5589],{"class":4676},[4671,5626,5225],{"class":4684},[4671,5628,5594],{"class":5532},[4671,5630,5549],{"class":4676},[4671,5632,5633],{"class":5232},"   // Completion callback\n",[4671,5635,5636],{"class":4673,"line":5069},[4671,5637,5500],{"class":4676},[4577,5639,5640],{},[4581,5641,5642],{},"Usage:",[4662,5644,5646],{"className":4914,"code":5645,"language":4916,"meta":637,"style":637},"my.alert({\n  title: 'Payment Successful',\n  content: 'Your order has been confirmed',\n  buttonText: 'OK',\n  success() {\n    console.log('User closed the alert');\n  }\n});\n",[4668,5647,5648,5660,5675,5690,5705,5713,5734,5738],{"__ignoreMap":637},[4671,5649,5650,5652,5654,5656,5658],{"class":4673,"line":573},[4671,5651,4924],{"class":4923},[4671,5653,4927],{"class":4676},[4671,5655,305],{"class":4930},[4671,5657,4934],{"class":4923},[4671,5659,4937],{"class":4676},[4671,5661,5662,5664,5666,5668,5671,5673],{"class":4673,"line":579},[4671,5663,5540],{"class":4680},[4671,5665,4945],{"class":4676},[4671,5667,4948],{"class":4676},[4671,5669,5670],{"class":4694},"Payment Successful",[4671,5672,4954],{"class":4676},[4671,5674,4957],{"class":4676},[4671,5676,5677,5679,5681,5683,5686,5688],{"class":4673,"line":590},[4671,5678,5557],{"class":4680},[4671,5680,4945],{"class":4676},[4671,5682,4948],{"class":4676},[4671,5684,5685],{"class":4694},"Your order has been confirmed",[4671,5687,4954],{"class":4676},[4671,5689,4957],{"class":4676},[4671,5691,5692,5694,5696,5698,5701,5703],{"class":4673,"line":739},[4671,5693,5571],{"class":4680},[4671,5695,4945],{"class":4676},[4671,5697,4948],{"class":4676},[4671,5699,5700],{"class":4694},"OK",[4671,5702,4954],{"class":4676},[4671,5704,4957],{"class":4676},[4671,5706,5707,5709,5711],{"class":4673,"line":753},[4671,5708,4962],{"class":4680},[4671,5710,5355],{"class":4676},[4671,5712,4974],{"class":4676},[4671,5714,5715,5717,5719,5721,5723,5725,5728,5730,5732],{"class":4673,"line":5017},[4671,5716,4979],{"class":4923},[4671,5718,4927],{"class":4676},[4671,5720,4984],{"class":4930},[4671,5722,4934],{"class":4680},[4671,5724,4954],{"class":4676},[4671,5726,5727],{"class":4694},"User closed the alert",[4671,5729,4954],{"class":4676},[4671,5731,4971],{"class":4680},[4671,5733,5009],{"class":4676},[4671,5735,5736],{"class":4673,"line":5031},[4671,5737,5113],{"class":4676},[4671,5739,5740,5742,5744],{"class":4673,"line":5069},[4671,5741,5119],{"class":4676},[4671,5743,4971],{"class":4923},[4671,5745,5009],{"class":4676},[4616,5747,2661],{"id":5748},"common-interface-pattern",[4577,5750,5751],{},"Most JSAPIs follow this pattern:",[4662,5753,5755],{"className":5520,"code":5754,"language":5522,"meta":637,"style":637},"interface IApiOptions {\n  // API-specific required parameters\n  requiredParam: string;\n\n  // API-specific optional parameters\n  optionalParam?: number;\n\n  // Common callback functions\n  success?: (res: SuccessResult) => void;\n  fail?: (res: ErrorResult) => void;\n  complete?: (res: Result) => void;\n}\n",[4668,5756,5757,5766,5771,5782,5788,5793,5805,5809,5814,5837,5860,5883],{"__ignoreMap":637},[4671,5758,5759,5761,5764],{"class":4673,"line":573},[4671,5760,5529],{"class":4684},[4671,5762,5763],{"class":5532}," IApiOptions",[4671,5765,4974],{"class":4676},[4671,5767,5768],{"class":4673,"line":579},[4671,5769,5770],{"class":5232},"  // API-specific required parameters\n",[4671,5772,5773,5776,5778,5780],{"class":4673,"line":590},[4671,5774,5775],{"class":4680},"  requiredParam",[4671,5777,4945],{"class":4676},[4671,5779,5546],{"class":5532},[4671,5781,5009],{"class":4676},[4671,5783,5784],{"class":4673,"line":739},[4671,5785,5787],{"emptyLinePlaceholder":5786},true,"\n",[4671,5789,5790],{"class":4673,"line":753},[4671,5791,5792],{"class":5232},"  // API-specific optional parameters\n",[4671,5794,5795,5798,5800,5803],{"class":4673,"line":5017},[4671,5796,5797],{"class":4680},"  optionalParam",[4671,5799,5543],{"class":4676},[4671,5801,5802],{"class":5532}," number",[4671,5804,5009],{"class":4676},[4671,5806,5807],{"class":4673,"line":5031},[4671,5808,5787],{"emptyLinePlaceholder":5786},[4671,5810,5811],{"class":4673,"line":5069},[4671,5812,5813],{"class":5232},"  // Common callback functions\n",[4671,5815,5816,5818,5820,5822,5824,5826,5829,5831,5833,5835],{"class":4673,"line":5074},[4671,5817,4962],{"class":4680},[4671,5819,5543],{"class":4676},[4671,5821,5448],{"class":4676},[4671,5823,4968],{"class":4967},[4671,5825,4945],{"class":4676},[4671,5827,5828],{"class":5532}," SuccessResult",[4671,5830,4971],{"class":4676},[4671,5832,5225],{"class":4684},[4671,5834,5594],{"class":5532},[4671,5836,5009],{"class":4676},[4671,5838,5839,5841,5843,5845,5847,5849,5852,5854,5856,5858],{"class":4673,"line":5088},[4671,5840,5020],{"class":4680},[4671,5842,5543],{"class":4676},[4671,5844,5448],{"class":4676},[4671,5846,4968],{"class":4967},[4671,5848,4945],{"class":4676},[4671,5850,5851],{"class":5532}," ErrorResult",[4671,5853,4971],{"class":4676},[4671,5855,5225],{"class":4684},[4671,5857,5594],{"class":5532},[4671,5859,5009],{"class":4676},[4671,5861,5862,5864,5866,5868,5870,5872,5875,5877,5879,5881],{"class":4673,"line":5110},[4671,5863,5077],{"class":4680},[4671,5865,5543],{"class":4676},[4671,5867,5448],{"class":4676},[4671,5869,4968],{"class":4967},[4671,5871,4945],{"class":4676},[4671,5873,5874],{"class":5532}," Result",[4671,5876,4971],{"class":4676},[4671,5878,5225],{"class":4684},[4671,5880,5594],{"class":5532},[4671,5882,5009],{"class":4676},[4671,5884,5885],{"class":4673,"line":5116},[4671,5886,5500],{"class":4676},[4577,5888,5889],{},[4581,5890,5891,5892,5895],{},"Properties marked with ",[4668,5893,5894],{},"?"," are optional.",[4573,5897,1873],{"id":5898},"related-documentation",[4623,5900,5901,5907],{},[4626,5902,5903,5906],{},[5904,5905,4713],"a",{"href":263}," - Authorization API",[4626,5908,5909,5911],{},[5904,5910,4717],{"href":272}," - Payment API",[5913,5914,5915],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":637,"searchDepth":590,"depth":590,"links":5917},[5918,5919,5922,5925,5931,5935],{"id":4575,"depth":579,"text":115},{"id":4601,"depth":579,"text":2606,"children":5920},[5921],{"id":4618,"depth":590,"text":2611},{"id":4652,"depth":579,"text":2616,"children":5923},[5924],{"id":4657,"depth":590,"text":2621},{"id":4724,"depth":579,"text":2626,"children":5926},[5927,5928,5929,5930],{"id":4729,"depth":590,"text":2631},{"id":4791,"depth":590,"text":2636},{"id":4877,"depth":590,"text":2641},{"id":4899,"depth":590,"text":2646},{"id":5503,"depth":579,"text":2651,"children":5932},[5933,5934],{"id":5508,"depth":590,"text":2656},{"id":5748,"depth":590,"text":2661},{"id":5898,"depth":579,"text":1873},"md",null,{},{"icon":116},{"title":115,"description":2599},"NMQYZn9cNK5jPCFMy5oDbQG4l03F2KpDvb5bc0gQPVg",[5943,5944],{"title":246,"path":247,"stem":248,"description":2550,"icon":249,"children":-1},{"title":262,"path":263,"stem":264,"description":2670,"icon":265,"children":-1},1783249892844]