The merchant site can poll for a current transaction status to Paynow at any point, but it should only be done in the following two scenarios:
- The merchant site receives an important status update from Paynow and wants to poll Paynow to confirm the status.
- The merchant site is going to delete old or unpaid transactions, before doing this the merchant site should poll Paynow and confirm the transaction status before deleting it from their system.
To poll for a transaction status the merchant site should perform an empty HTTP POST to the pollurl sent by Paynow in transaction initiation or status update. Paynow will reply with a string formatted as an HTTP POST, i.e. each field separated by a & and Key Value pairs separated by an = and all Values URL Encoded, with the same fields as if it were posting a result to the merchant site.
An example of the result from Paynow is shown below:
Using Merchant Trace
When making use of Express Checkout functionality on Paynow, the merchant should supply a merchanttrace field value in their request message (up to 32 characters in length, unique per merchant)
The merchant trace reference is stored against the transaction and will allow the merchant to query the status of a transaction in the event that they were unable to receive the pollurl in the response from Paynow e.g. network interruption or timeout.
A trace query can be made by request in the form of an HTTP POST to the URL:
The HTTP POST should include the following fields:
|id||Integer||Integration ID shown to the merchant in the “3rd Party Site or Link Profile” area of “Receive Payment Links” section of “Sell or Receive” on Paynow.|
|merchanttrace||String||The original merchanttrace that was specified when the merchant initiated the transaction being traced.|
|status||String||Should be set to “Message”.|
|hash||String||Details of Hash generation are provided in the Generating Hash section.|
If the trace successfully locates a transaction, Paynow will reply with a standard Status Update message showing the status of the transaction
Transaction Not Found
If a transaction is not found during a trace, the status NotFound will be returned. For example:
If there was an error during a trace operation, the error details will be returned. For example:
N.B. A trace error does not necessarily mean that the transaction was not found