How can we enable Easypaisa API integration on a Shopify platform?

Topic summary

Easypaisa (Telenor Microfinance Bank) is seeking guidance on integrating their Open APIs and JavaScript methods into Shopify-hosted websites as part of their mini apps program.

Technical Details Provided:

  • Sample API endpoint: POST /v1/users/inquireUserInfo
  • Purpose: Retrieve user information after OAuth authorization
  • Flow: Merchant calls API with authCode → Easypaisa returns user data
  • Includes JavaScript callback methods and HTML invocation examples

Key Challenge:
Partners using Shopify are encountering integration issues. The team needs specific guidance on enabling API integration within Shopify’s platform constraints.

Current Status:
A second partner (SparkupDigital) has confirmed they face the same integration challenge and are also seeking assistance. The discussion remains open with no solution provided yet.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

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.

Sample

Query user information via an authCode. The authCode is generated via OAuth after authorization is successful.

  1. Merchant calls this interface with authCode (Step 1)
  2. easypaisa server returns user information the to merchant based on the authCode (Step 2).

Request sample

{
      "authCode": "281010033AB2F588D14B43238637264FCA5AAF35xxxx",
}

Copy

Response sample

{
 "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": "{}"
  }
}

mp.getAuthCode

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.

Sample Code

To invoke mp.getUserAuthCode method in HTML

var scopes=[USER_MSISDN,"USER_MSISDN"]
<a onClick="mp.getUserAuthCode(scopes)">Click</a>

Copy

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_77 ,

We want to integrate the same Easypaisa Mini App with our Shopify store so please respond to that. We are clueless in this. Thanks