-2

I have few questions regarding PayPal subscriptions and IPN.

According to this answer, when using PayPal recurring payments (subscriptions), PayPal sends two types of notifications when a subscription is made:

a) An IPN with txn_type of subscr_signup is sent once

b) An IPN with txt_type of subscr_payment is a recurring IPN that is sent every time a subscription payment is made.

So I have the following questions

  1. Is the custom field sent for every subscr_payment made? And does it have the same value always?

  2. What is subscr_id? Is it subscriber ID or subscription ID? I am assuming it is the subscriber ID, and therefore, I am also assuming that it will be the same per subscriber if he/she has more than one subscription in the site (assuming the site offers more than one item available for subscription). Is my assumption correct?

  3. Is txt_id different for every new transaction? In other words, when two consecutive payments are made for the same subscription, are they going to have different txt_id's?

  4. What is the id field in subscr_payment?

  5. Is there a field that is sent with the subscr_payment message which allows us to identify which subscription is being renewed? I am thinking this is a subscription ID that will have the same value for all payments made to that subscription. Again, the reason I ask is my site is offering more than one subscription per user. And I need a way to identify which subscription is being renewed when an IPN message is sent.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Greeso
  • 7,544
  • 9
  • 51
  • 77

1 Answers1

1

1) No, it will not be included in the payment IPNs.

2) It's basically the same thing. Their documentation calls it a "subscriber ID" but it's treated as a subscription profile ID.

3) You must mean txn_id..?? Yes, each individual payment for a profile would have its own txn_id. I'm a little confused how you would two consecutive payments, though..?? It would be per week, per month, or whatever the profile is setup as.

4) Need a sample of what you're referring to here.

5) Again, this would be the subscr_id.

Drew Angell
  • 25,968
  • 5
  • 32
  • 51
  • Thanks for your response. I am basing my question on this answer http://stackoverflow.com/questions/1364360/testing-paypal-subscription-ipn#2314140 and therefore, the following follow up questions to your answer (each question will be a separate comment) – Greeso Oct 03 '16 at 13:31
  • For question (1): So how do I detect `custom`? With which message type? In the link I provided, it is stated it is sent back with **subscr_payment**, and the documentation of PayPal is not too clear about it. – Greeso Oct 03 '16 at 13:31
  • For question (4): Again, the answer here http://stackoverflow.com/questions/1364360/testing-paypal-subscription-ipn#2314140 shows there is an `id` field, but could not find anything about it on Paypal, so I asked about it in this question. – Greeso Oct 03 '16 at 13:32
  • For question (3): By consecutive payments I mean the following. Assume monthly subscription, and the first payment is July 1, and the second payment is August 1, and the third payment is September 1. So, those are consecutive payments. You are right the question was not clear. What I mean, would July, August, and September have different `txn_id` values? – Greeso Oct 03 '16 at 13:34
  • For question (2) and (5): So if I offer two different products on my site, and a user can subscribe to both of them seperately, then there will be two seperate `subscr_id` values, one for each subscription eventhough those subscriptions are made by the same user, right? And moreover, accordingly, whenever a new IPN notification is received, when `txn_type` is set to **subscr_payment**, the I should check the value of `subscr_id` to verify if it is a payment to a new subscription, or a payment to an existing subscription, right? – Greeso Oct 03 '16 at 13:40