5

I have encountered a problem with Paypal recurring payments. CreateRecurringPaymentsProfile() returns ID of created profile (ProfileID). At the same time, I receive the following confirmation on IPN url:

payment_cycle - Daily
txn_type - recurring_payment_profile_ 
created
last_name - User
next_payment_date - 03:00:00 Oct 06, 2011 PDT
residence_country - US
initial_payment_amount - 0.00
currency_code - USD
time_created - 23:21:02 Oct 05, 2011 PDT
verify_sign - ...
period_type -  Regular
payer_status - verified
test_ipn - 1
tax - 0.00
payer_email - ...
first_name - Test
receiver_email - ...
payer_id - ...
product_type - 1
shipping - 0.00
amount_per_cycle - 20.00
profile_status - Active
charset - windows-1252
notify_version - 3.4
amount - 20.00
outstanding_balance - 0.00
---------->recurring_payment_id - I-6EFKVB5FXRGH
product_name - Ultimate Account
ipn_track_id - ...

Obviously, ProfileID and recurring_payment_id are equal. After this, a confirmation about the payment is received:

mc_gross - 20.00
outstanding_balance - 0.00
period_type -  Regular
next_payment_date - 03:00:00 Oct 07, 2011 PDT
protection_eligibility - Ineligible
payment_cycle - Daily
tax - 0.00
payer_id - WR942TMLKNKZE
payment_date - 04:38:37 Oct 06, 2011 PDT
payment_status - Completed
product_name - Ultimate Account
charset - windows-1252
---------->recurring_payment_id - I-5S42CVRD6HPC
first_name - Test
mc_fee - 0.88
notify_version - 3.4
amount_per_cycle - 20.00
payer_status - verified
currency_code - USD
business - ...
verify_sign - ...
payer_email - ...
initial_payment_amount - 0.00
profile_status - Active
amount - 20.00
txn_id - 2XB154738E303273C
payment_type - instant
last_name - User
receiver_email - ...
payment_fee - 0.88
receiver_id - ...
txn_type - recurring_payment
mc_currency - USD
residence_country - US
test_ipn - 1
transaction_subject -
payment_gross - 20.00
shipping - 0.00
product_type - 1
time_created - 03:32:45 Sep 29, 2011 PDT
ipn_track_id - ...

These 3 values: ProfileID in return of CreateRecurringPaymentsProfile(); recurring_payment_id in recurring_payment_profile_created; recurring_payment_id in recurring_payment - should be the same. (as it seems that there's no other way to properly identify the payment for this specific subscription) Also, recurring_payment (on IPN) is being sent by Paypal multiple times and every time recurring_payment_id is different.

Should I use recurring_payment_id to identify the payment for specific subscription or there's another properly way to identify it?

John Conde
  • 217,595
  • 99
  • 455
  • 496
Tsybulsky Serg
  • 149
  • 1
  • 4
  • 10

1 Answers1

8

Profile ID = recurring_payment_id. If recurring_payment_id is different, we're talking about a different ProfileID (in other words: a different recurring payment profile).

Robert
  • 19,326
  • 3
  • 58
  • 59
  • Thanks, but this is exactly the issue I talk about. I have cleaned all previous transactions/profiles and with only one profile (in paypal's sandbox) - I still get different ProfileID and recurring_payment_id. – Tsybulsky Serg Oct 10 '11 at 14:47
  • I know this is an old thread but I was just asking myself the same question so I have just tested it and I get the same ID twice. I also have cleaned all profiles before trying. The CreateRecurringPaymentsProfile API call returns me with [PROFILEID] => I-L9VFD2G8KW5L and the IPN message of txn_type "recurring_payment_profile_created" shows "recurring_payment_id":"I-L9VFD2G8KW5L" and so does the "recurring_payment" IPN so I think you should be fine with what is in the IPN message. Maybe this was an issue with older API versions. – MrUpsidown Jun 28 '13 at 11:04
  • Was also dealing with the same issue so I thought I'd add: Chances are the reason you were getting different values for different recurring_payment_id's is because you set up multiple subscriptions in your sandbox. Every separate recurring payment you start in the sandbox is going to carry a different recurring_payment_id (and ProfileID), so just make sure you're keeping that in mind :) – jball037 May 05 '14 at 19:10