javascriptpaymentpayment-processingmerchant-accounteasypaisa

EasyPaisa MA Transaction Error: Incomplete merchant information


I am trying to initiate an MA transaction using easy paisa api. The response error I get after executing the following code is as follows.

'RESPOSNE: '{"orderId": "XYZ123", "responseCode": "0017", "responseDesc": "Incomplete merchant information", "storeId": "xxxxx"}

The response code "0017" is not even mentioned in the documentation. This is my code

const otcTransaction = async () => {
    try {
      let url = `https://easypaystg.easypaisa.com.pk/easypay-service/rest/v4/initiate-ma-transaction`
      let body = {
        emailAddress: 'example@gmail.com',
        mobileAccountNo: '03xxxxxxxxx',
        orderId: 'XYZ123',
        storeId: XXXXX,
        transactionAmount: 10.0,
        transactionType: 'MA',
      }
      const response = await axios.post(
        url,
        body,
        {
          headers: {
            'Credentials': 'base64(username:password)'  
     },
        })
      console.log('RESPOSNE: ', response.data)
    } catch (error) {
      console.log(error.message)
    }
  }

Let me know if anyone has worked on EasyPaisa MA Transaction Thanks in advance!


Solution

  • I got in contact with the easypaisa team and i found out that the code i have written is fine. What needed to be done was that since i was in development and using development credentials i could only use the test phone number provided to me by easypaisa. (PS keep in mind in test mode we can only make a transaction of Rs 10.0)