IPN and LCN URL Settings
Overview
Set the IPN and LCN settings in your Merchant Control Panel and assign a single specific webhook to a single URL by using the NOTIFICATION_URL parameter. If you add a second, third, or fourth endpoint in the IPN or LCN tab, 2Checkout can send Instant Payment Notifications (IPN) and License Change Notifications (LCN) to alternative URLs, not just the defaults.
Availability
Available for all 2Checkout accounts using the Default Flows cart. Not available to 2Checkout accounts using only the ConvertPlus shopping cart.
How it works
The 2Checkout system sends out notifications (IPNs and LCNs) to the URLs that you can configure in the URL areas under:
- IPN settings (https://secure.2checkout.com/cpanel/ipn_settings.php)
- LCN settings (https://secure.2checkout.com/cpanel/lcn_settings.php)
- Both IPN and LCN (https://secure.2checkout.com/cpanel/webhooks_api.php)
You can prioritize sending to a specific endpoint URL using the NOTIFICATION_URL parameter, as described below under the 'How do I get 2Checkout to send IPNs and LCNs to URLs other than the default links set?' section. However, if you set a default URL in the Notification URLs section, then the notification is sent to that particular URL, as well as any other URL set in the IPN/LCN dedicated tab unless specified otherwise when using the parameter.
Requirements
Enter valid URLs for both IPN and LCN when editing URL configurations.
Default IPN and LCN URLs
IPN
- Navigate to IPN settings (https://secure.2checkout.com/cpanel/ipn_settings.php).
- Enter the default URL where the 2Checkout system will send out Instant Payment Notifications (IPNs).
- Changes to the IPN URL in the IPN settings area reflect under the default URL notification configuration for your account, if only one value is entered and edited. For multiple values, only the first one is taken into account.
LCN
- Navigate to LCN settings (https://secure.2checkout.com/cpanel/lcn_settings.php).
- Enter the default URL where the 2Checkout system will send out License Change Notifications (LCNs).
- Changes to the LCN URL in the LCN settings area reflect under the default URL notification configuration for your account, if only one value is entered and edited. For multiple values, only the first one is taken into account.
Default URL configuration
- Navigate to the Integrations → Webhooks and API section (https://secure.2checkout.com/cpanel/webhooks_api.php).
- Edit the Default URL configuration.
- Enter URLs for both IPN (mandatory) and LCN notifications (mandatory) and Save.
- The settings automatically reflect under the IPN URL in the IPN settings area and the LCN URL in the LCN settings area. Note that this will not edit the current value, but add one new entry. Removing this value from a total of 4 in the dedicated IPN/LCN section will not replace the default one in the general section, it will only leave a blank.
- Changes to the default URL notification configuration for your account reflect under the IPN URL in the IPN settings area and the LCN URL in the LCN settings area.
- Click Reset to revert a URL configuration to the last saved state.
Custom IPN and LCN URLs
- Navigate to the Integrations → Webhooks and API section (https://secure.2checkout.com/cpanel/webhooks_api.php) in your Merchant Control Panel.
- Scroll down to the Notification URLs section and click on the Add additional URL button to gain access to the parameter value field.
- Enter a parameter value. You will use this parameter in buy-links for new purchases, manual subscription renewals, and upgrades, controlling the URLs used by the 2Checkout system to send IPN and LCN notifications. Read below for instructions.
- Enter URLs for both IPN (mandatory) and LCN notifications (mandatory) and click Save.
- The settings reflect under the IPN URL in the IPN settings area and the LCN URL in the LCN settings area.
- Changes to the default URL notification configuration for your account reflect under the IPN URL in the IPN settings area and the LCN URL in the LCN settings area.
- Click Reset to revert a URL configuration to the last saved state.
How do I get 2Checkout to send IPNs and LCNs to URLs other than the default links set?
You can use the multiple URL functionality and send IPN and LCN notifications to several URLs. Once you set multiple URLs for receiving IPN or LCN notifications, you will receive the same keys/parameters on all endpoints without having the possibility to customize them based on the defined endpoints. However, if the URL from the general section is not declared under the IPN/LCN tabs as well, the notification will still be sent if the parameter is used. You can set up eight (8) URLs for both your IPN and LCN notifications.
To set multiple URLs, you need to use the:
- Parameter value specified for each new URL configuration. The parameter value can be found in the Parameter Value field by navigating to Integrations → Webhooks and API section, scrolling down to the Notification URLs section, selecting the Configuration parameter, and clicking on the Edit button.
- And the NOTIFICATION_URL parameter in buy-links (for new purchases, manual subscription renewals, and upgrades).
For example, let's assume that you created a URL configuration with the following settings:
Parameter value: |
MYTESTNOTIFICATIONS |
IPN URL: |
|
LCN URL: |
And that you're using this buy-link:
https://secure.2checkout.com/order/checkout.php?PRODS=1234567&QTY=1&CART=1&CARD=2
You need to insert NOTIFICATION_URL=MYTESTNOTIFICATIONS into the buy-link:
https://secure.2checkout.com/order/checkout.php?PRODS=1234567&QTY=1&CART=1&CARD=2&NOTIFICATION_URL=MYTESTNOTIFICATIONS
IPN and LCN HASH
Default URLs for IPN and LCN
IPN HASH = HMAC_SHA signature calculated from IPN_PID[0], IPN_PNAME[0], IPN_DATE and DATE and the Secret key for your account for notifications sent to the default URL parameters configured for your account.
LCN HASH = HMAC_SHA signature calculated using the secret key for your account and the values received for LICENSE_CODE, EXPIRATION_DATE, DATE and the Secret key for your account for notifications sent to the default URL parameters configured for your account.
Custom IPN and LCN configurations
IPN HASH = HMAC_SHA signature calculated from IPN_PID[0], IPN_PNAME[0], IPN_DATE and DATE and the system-generated secret keys when custom URL configurations are used.
LCN HASH = HMAC_SHA signature calculated using the values received for LICENSE_CODE, EXPIRATION_DATE, DATE and the system-generated secret keys when custom URL configurations are used.
FAQs
1. Where can I find the secret key?
For custom IPN and LCN URL:
1. Navigate to the Integrations → Webhooks and API section (https://secure.2checkout.com/cpanel/webhooks_api.php).
2. Click on the Add IPN URL or on the Add LCN URL buttons, or the Edit button of one of the existing URL configurations.
3. The system-generated secret key valid for each URL configuration respectively is available in the IPN/LCN secret key field.
2. What notifications are sent to the URLs set through the NOTIFICATION_URL parameter and for what triggers?
The IPN and LCN notifications for the initial purchase, as well as for the subsequent renewals of the subscriptions generated for this order and for any future upgrades will be sent to the IPN and URL parameters
Trigger |
IPN |
LCN |
Non-default URLs set using NOTIFICATION_URL |
---|---|---|---|
New purchase/order of a subscription |
YES |
YES |
YES |
Manual renewal of the subscription |
YES |
YES |
YES |
Automatic subscription renewal |
YES |
YES |
YES |
Subscription upgrade |
YES |
YES |
YES |
3. What is the default value of NOTIFICATION_URL?
Include NOTIFICATION_URL=DEFAULT (case sensitive) to send IPN and LCN notifications to the default URLs you configure.
4. Is the value of the parameter saved on each order and subscription?
The IPN value is mentioned in the order history, but at the subscription level, neither the IPN nor the LCN is visible, unless you use the subscription reference number in the reporting section to identify the LCN.
5. What happens with future notifications if I used the NOTIFICATION_URL parameter?
All future LCN and IPN notifications for future renewals and upgrades of current subscriptions for which a NOTIFICATION_URL value was used will be sent to the URLs configured for that value.
6. What happens if I change the value for a parameter used?
All future LCN and IPN notifications for renewals and upgrades of current subscriptions for which a NOTIFICATION_URL value was used will be sent to the default URLs configured for your account. What happens if I change the custom URLs for a configuration?
All future LCN and IPN notifications for renewals and upgrades of current subscriptions for which a NOTIFICATION_URL value was used will be sent to the new URLs configured.
7. Can I use multiple endpoints for the NOTIFICATION_URL parameter and send IPNs and LCNs to more than one URL each?
You can use multiple endpoints in the specific LCN/IPN section, but you cannot add multiple endpoints in the general section. The NOTIFICATION_URL parameter offers the option to use specific endpoints for specific buy-links, but does not “add” to the default ones. You can set up eight (8) URLs for both your IPN and LCN notifications.
8. Is this parameter available for network cross-selling orders through the 2Checkout system?
No, the parameter will only work for your account.
9. Does this parameter work for partner and API orders?
This functionality is not supported for the time being.