What is the return_url and the result_url


#1

New to paynow here. What is the return_url and the result_url?


#2

returnurl-The URL on the merchant website the customer will be returned to after the transaction has been processed. It is recommended this URL contains enough information for the merchant site to identify the transaction.

resulturl-The URL on the merchant website Paynow will post transaction results to. It is recommended this URL contains enough information for the merchant site to identify the transaction.

source : Initiate a transaction · Paynow Developer Hub


#3

Ok so if you have no experience integrating a payment gateway it appears to be a difficult matter trust me.

Return url is the url that is redirected to after the payment has been made successfully.

I guess you know already whats result url then.

It is nothing but the path to which the transactions “results” are posted to.


#4

So is it mandatory to use them then? I’m sorry I’m new. I thought the process was

  1. send payment and get poll URL
  2. use the pollurl to get transaction status

The docs don’t explain how to use those urls


#5

I’ll explain from my understanding

Return Url

  • The url is set when initializing the Paynow class

  • After payment user is redirected to this url

Result Url

  • The url is set when initializing the Paynow class

  • This url points to an endpoint on your server where Paynow will post the results of the transaction.

Poll Url

  • This is created after initiating a payment
  • This URL in most if not all SDKs is taken as an argument in the check_transaction_status methods

#6

i understand this now


#7

Hi, when I initiated the payment using ecocash payment method then I get the following response:
{
“data”: {
“status”: “ok”,
“success”: true,
“hasRedirect”: false,
“pollUrl”: “https://www.paynow.co.zw/Interface/CheckPayment/?guid=5645f3ec-1173-42ad-b66a-d75c1f2f88cb”,
“instructions”: “This is a test transaction. Test Case: Success”
},
“message”: “Payment success”,
“statusCode”: 200
}

But I get hasRedirect:false for this case everytime. I have even define the result URL and return URL in my code.
Can anyone help please?


#8

Hey Tanya
You want to redirect your users ?
Can you share a high overview of what your user journey looks?
If you use Express checkout(Ecoash method) there is no need to redirect your user to Paynow. Paynow will send a POST to your server updating you of change in status


#9

Yes I got that, but if the user pay via Visa card or mastercard, then what is the process for that?


#10

I suggest you re-direct them to Paynow as instructed here Initiate a transaction · Paynow Developer Hub. Express checkout is also a possible
route but be aware you need to comply to PCI DSS requirements.


#11

ok thanks @Harvey
I will try


#12

paynow is redirecting browser to my result url after customer cancel payment
is that how it supposed to do