By Daniel Du
Are you selling web services on Autodesk Exchange? As described in previous blog post, to sell web services on Autodesk Exchange, publishers need to setup an IPN notification listener to handle the IPN notification when users buy and pay for the service. In previous blog post, we introduced how Autodesk exchange IPN listener works and how to create an IPN listener for one-time payment, now Autodesk Exchange supports monthly recurring subscription, it is time to move on. To support subscription term based payment, publisher must have PayPal account with Merchant, if you do not have one, please refer to PayPal to get one. When you publish a web service and specify the price, a new option is added, now you can sell your web services as subscription. To enable monthly subscription, you can select “monthly recurring subscription” as price type, and update your IPN listener to support term based subscription.
As we described, publisher will get IPN notification when user pays for the web service. For web services with subscription term based payment, when users firstly subscribe and pay for the web service, publisher will get two IPN notifications, one is for sign up of subscription, which contains the recurring period information. Here is an example:
Please pay attention to the parameters in bold, you will notice that it is a subscription signup notification, the subscription data and the period is one day.
Another one is payment notification, an example as below:
From this notification, you can see it is a subscr_payment, and the payment is completed.
You can refer to https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/ to find the complete document about meaning of different parameters.
A reminder, please do not assume the order you receive the notification is subscription sign up followed by payment. Actually the order of these two IPN notification may be different due to internet latency.