Definition and use cases
Occasionally, the information concerning the success of the payment does not reach all parties or remains otherwise unclear. For example, this may be due to an interruption in data communications during the payment or the customer closing the web browser in the middle of the payment process. The most common scenario is that the customer receives confirmation that the payment is successful, but the same information doesn’t reach the merchant. Due to this, the customer never receives the ordered product although the amount is still captured from the customer's account. In order to avoid these scenarios, we recommend you to implement the Callback function as part of the payment process, especially if you have implemented direct bank payments.
The Callback is an alternative to the pull nature of the Query call to verify the status of the transaction. When using Callback, Netaxept will query the respective payment method service provider for an update of the payment status and based on that send automatically information to the Callback URL set by the merchant when the status of the transaction changes to authorised, captured, credited or annulled. Netaxept queries the new status until the timeout value set by the merchant is reached. In addition, Netaxept will also perform one last try 24 hours after the timeout. If the transaction doesn't change its status within the set time frame, Netaxept will consider the transaction as abandoned or completed and stop looking for updates on the transaction in question.
Implementation of Callback
To be able to use Callback the merchant needs to set the Callback URL and timeout value in Netaxept Admin's Options tab. The Callback URL must start with "https" and we recommend using a signed SSL certificate during the communication. If your Callback URL is protected by a username and password, these need to be added to the Options tab as well. Read more about the Callback settings in Netaxept Admin User Guide
The merchant's server must reply to Netaxept's Callback message with "HTTP 200", otherwise Netaxept will retry to send the same Callback message numerous times to the merchant-defined Callback URL. Callback message sent by Netaxept will only include the unique transaction ID for the transaction as a JSON format in the request body. Based on this, you need to send the Query call to Netaxept in order to find out the new status and more detailed information about the transaction.
Example of a Callback URL sent by Netaxept
If you need to open your firewall for the Callback messages from Netaxept, the following are the applicable outgoing IP addresses:
- Production: 18.104.22.168
- Test: 22.214.171.124