As far as I know, there is now way of getting this from Pesapal via thei APIs.

Please see: http://developer.pesapal.com/how-to-integrate/api-reference

The closes you can get is thei "QueryPaymentDetails" method which only returns 
How I got around this in the past:

Notice that Pesapal returns "pesapal_merchant_reference"  which was generated by your system and fed into Pesapal initially.

What I always do is to store the transaction details and then use this variable to query my own details once I get the IPN from Pesapal.

Unless someone from Pesapal corrects me, I believe you will never (as of right now) get back the MPESA reference or the reason for failure, if any.

One time I was parsing the excel file that you can get from Pesapal's dashboard to get a bit more information (the confirmation code / MPESA reference) - but I no longer think this is a good idea!



On Wed, Oct 5, 2016 at 8:56 AM, Ken Muturi via skunkworks <skunkworks@lists.my.co.ke> wrote:
Watching ......

On Sat, Oct 1, 2016 at 11:08 AM, Ndungi Kyalo via skunkworks <skunkworks@lists.my.co.ke> wrote:
Greetings Skunkers,

For those who know the Pesapal API inside out, is there a way to query :

1. the exact amount paid by a customer
2. the MPESA transaction/confirmation code
3. the reason for a FAILED status (for the purpose of informing the customer on the next appropriate steps to take to resolve the failure)

Currently I am only able to get status (COMPLETED|PENDING|FAILED|INVALID) and payment method. I think the other details (#1,#2,#3 above) are important to improve the customer's interaction with a system.

Anyone has this info?

--
Ndungi Kyalo

_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke


_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke