Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi Team,
As part of our mini apps program at easypaisa (Telenor Microfinance Bank), we have extended our Open APIs and JS methods (Javascripts) for our partners to integrate and become part of our easypaisa platform.
We are facing issue with some of our partners that have hosted their websites on shopify. We need your support to guide us how we can enable our APIs integration on shopify platform.
I am pasting below 1 of our APIs and JS method for your review.
POST /v1/users/inquireUserInfo
The inquireUserInfo API is used for the merchant to get the user related information after obtaining user authorization.
Query user information via an authCode. The authCode is generated via OAuth after authorization is successful.
{
"authCode": "281010033AB2F588D14B43238637264FCA5AAF35xxxx",
}
{
"result": {
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"success"
},
"userInfo": {
"openId": "1000001119398804xxxx",
"unionId": "123440001119398804xxxx",
"userMsisdn": "931116874199xxx",
"userName": "jack",
"avatar": "http://example.com/avatar.htm?avatarId=FBF16F91-28FB-47EC-B9BE-27B285C23CD3xxxx",
"userAddress": "XX city X street",
"userCnic": "145125123452142234",
"extendInfo": "{}"
}
}
Call the API to obtain the user consent. The wallet app will prompt a consent pop-up to ask user to grant rights to user scopes such as nickname, gender. birthdays and etc. The consent of user is represented by an authorization code (authCode) returned by the API. The authorization code can be later used to inquire user information.
To invoke mp.getUserAuthCode method in HTML
var scopes=[USER_MSISDN,"USER_MSISDN"] <a onClick="mp.getUserAuthCode(scopes)">Click</a>
To receive the callback in javascript
function getUserAuthCodeResult(jsonResult){ var result=JSON.parse(jsonResult); alert('status:'+result.status); alert('authCode:'+result.authCode); alert('granted scopes:'+result.grantedScopes); }
Hello @Shopify,
We want to integrate the same Easypaisa Mini App with our Shopify store so please respond to that. We are clueless in this. Thanks
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025