Skip to main content
knowledgecenter.avangate.com

Instant Payment Notification (IPN)

Overview

Use webhooks to be notified automatically and in real-time about events in your Avangate account.

What is IPN?

Instant Payment Notification (IPN) works as a message service generating automatic order/transaction notifications for your Avangate account. Use the notifications to process order data into your own management systems by synchronizing it with Avangate account events.

Webhook asynchronicity

Avangate’s webhooks (IPN and LCN) operate asynchronously.

How can I use IPN?

Use IPN to automate back-end functions, including but not limited to:

  • Creating end user accounts
  • Providing access to acquired services
  • Fulfilling purchases
  • Tracking orders and customers
  • Engaging customers

How does IPN work?

  1. Create one or multiple IPN listener pages on your website. Avangate sends IPNs to publicly accessible servers.
  2. Configure the IPN settings of your Avangate account to point to the URL of your default/preferred listener page.
  3. Set up additional Notification URLs if you require more listener pages, such as in testing scenarios in which you don’t want to use your default IPN listener. 
  4. Avangate sends order notifications to the endpoints you defined when shoppers acquire products/services from your online store. Avangate packages the payment information and sends it using secure (HTTPS) POST, according to your IPN settings.
  5. Avangate uses a HMAC_MD5 signature to validate the HTTPS POST.  Calculate the signature using data sent and your Avangate account’s secret key, following the instructions included in this article.
  6. Your custom IPN listener scripts consume the notifications and process the info received.
  7. Configure your IPN listener to output a read receipt confirmation in the listener page after receiving a valid IPN message.  This article includes guidance on how to generate the confirmation.
  8. In the absence of a confirmation from your IPN listener, Avangate continues to send notifications according to the failure retry process until you provide a valid response.
  9. In the eventuality that Avangate fails to send IPNs or doesn’t receive a confirmation from your IPN listener, it displays an error in your Control Panel, on the Dashboard.

Default IPN URL setup

  1. Login into your Avangate account.
  2. Navigate to IPN settings under System settings.
  3. Enter the URL corresponding to your default IPN listener in the IPN URL field.
  4. Check the Allow concurrent requests (faster notifications) option. If checked, Avangate sends multiple notifications concurrently to your IPN URL. Note: This may cause concurrency problems, but will greatly improve the notification time.
  5. Save your settings.
  6. Avangate checks the validity of the URL in terms of access to ensure that notifications reach your IPN listener without issues.

Additional IPN URLs

Navigate to IPN settings under System settings, select the Notification URLs tab and click New URL configuration.

Debug IPN

To view or debug IPN notifications during the integration phase, place TEST orders.

Alternatively, search for specific orders in the "Orders & Reports" area. When you access the order details page you get the option to resend notifications. Opt to reissue the IPN for debug and Avangate re-generates and re-sends the IPN, but also displays a copy of the content sent in the control panel.

Secure your IPN script

For security reasons, Avangate recommends that you restrict access to the IPN script.