Paynow application programming interface


#1

How do I capture success and failed transaction from the return url ?


#2

Hi Velile

Please note that Paynow sends a post to your resultUrl with the transaction result. You can then update your db with the appropriate status.

On returnUrl you can check the Payment status from your db which was saved after you received the post from Paynow to your resultUrl

Reference: https://developers.paynow.co.zw/docs/status_update.html


#3

Hello, Elphas thanks for the feedback

My developer says for us to intergrate Paynow API to our system, we need to develop our own API first before we can intergrate with PAYNOW, how far true is this?.
Thanks


#4

Hi Velile

What technology are you using for your system?

Paynow has various SDKs that can be used to integrate. A list of these are available on the link below


#5

Hi Elphas.

He is using PHP and JS, so now he is saying to intergrate Paynow to our system we need our own API to do so, as a layman we are stuck, because we were facing challenges of relying on the buyer to click RETURN TO MERCHANT WEBSITE for us to capture the information after the transaction is successful or failure…That clearly left a fatal flaw we then said why can’t Paynow after the transaction has been completed return to our site automatically so that our system captures everything from the customer’s journey after payment than to rely on the customer to click return to merchant website. That’s when he said we need to develop our own API for it return to our website automatically after purchase etc…Paynow SDKs are they not enough to do what I just described above?

Thanks


#6

Hi Velile

When you initiate a Payment to Paynow you pass returnUrl and a resultUrl as part of your request to initiate a transaction. When a customer is done with payment Paynow automatically redirects the user to your website(returnUrl) and sends the Payment update to website on the resultUrl. In short what you are looking for is possible with Paynow.

You just need to setup the page to which the customer will be taken to (returnUrl). and also setup the URL to which paynow will send an update (resultUrl)

Reference: https://developers.paynow.co.zw/docs/status_update.html

Here is a general overview of how Paynow works

1. You Send a Request to Paynow​

  • You send a request to Paynow to initiate a transaction.
  • The request contains payment information like amount and validation details.

2. Paynow Responds:

  • Upon receiving the request, if the details are correct, Paynow responds with status=ok, hash=generated_hash,browserurl, pollurll

3. You process the response

  • You need to verify the hash using the method as shown below, Once you verify the hash, you need to store the pollurl and then redirect your user to browserurl , where they will attempt to make payment.

4. On Paynow secure payment page

  • The user completes the payment on Paynow’s secure website.
  • Once they have paid or cancelled, they are redirected to your site’s returnurl you sent on the initiate transaction body.
  • Paynow sends a payment status details to your site’s resulturl which is an endpoint you set in your server that waits for a status from Paynow.

5. On Result URL (Your server):

  • You receive data from Paynow as shown on status Update Page.
  • Validate the hash and store/ update the data in your database.
  • You also use pollurl to verify the data before updating your database.

6. On Return URL (Your server)

  • User is taken to this url after they have completed the transaction on Paynow.
  • On this page you have to check for Payment status show relevant information to the user.

#7

Hi, Elphas
Thank you so much… Much appreciated. You are a star.

Regards.