3

I have written multiple audit reports for my saas apps over the last few years. Most of the logic uses the PayPal API to get the full transaction list (using TransactionSearch) and then for each transaction, get the details (using GetTransactionDetails).

The intent is to line up my database records of recurring payments received with the latest PayPal data to make sure I didn't miss an IPN or anything.

This worked fine up until about a month ago.

Lately, the subscription ID is missing from most transactions.

In the past, subscription ID was contained in the "SUBSCRIPTIONID" NVP field. This is no longer there for all transactions, and I don't see any other fields returned that contain a subscription ID. All other fields seem to be there though, so I know my calls are working. It's just the NVP response is missing the subscription ID. I have also verified that the subscription ID is included with the IPN sent for the same transactions.

My code is using an older API version (108.0). Now in theory, PayPal won't ever change how an API works, so I'm baffled as to why results are no longer what they were with the same codebase a month ago.

I tried the latest API version (124.0), and it provides subscription ID's for more transactions than 108, but also not all of them.

I'm totally stumped here. Does anyone have any clues?

I don't want to ask PayPal support, because it will take 3 weeks to get no help at all :-)

  • I sent this question to paypal support, will try to remember to post an answer here if I hear back. – Bemmu Mar 28 '16 at 19:56
  • Here is one workaround I'm investigating. If you have a list of profileids in your own database, you could do a TransactionSearch for each and pass the PROFILEID argument in the search. Then that would give you a list of all the payments for that PROFILEID, which would allow you to correlate them with transaction IDs. – Bemmu Mar 29 '16 at 05:11
  • I logged this with PayPal support at the same time as asking here. As expected, there is no definitive answer, but I see that my ticket is in "Pending Fix" status, which is hopeful. – Andreas Huttenrauch Mar 29 '16 at 15:52

3 Answers3

2

Had the same issue for a month as well just stopped working randomly was going to try the latest version but if your say its the same then think the best course of action is file a bug report with paypal.

The only valid work around I found is to save the created api call which will return the email and subscription id.

Then use the information from get transaction id (email) to search the subscription id from the original database (created). Messy but works for now until they fix this issue.

FOLLOW UP

I am using this method to just keep making the api call until the subscription id is made as we know it does work every 1 in 5 tries.

try {
    /* Original call */
    $transDetailsResponse = $paypalService->GetTransactionDetails($request);
} catch (Exception $ex) {
    include_once("../Error.php");
    exit;
}
// If its not got sub id we start a while loop
    if ($transDetailsResponse->PaymentTransactionDetails->PaymentItemInfo->Subscription->SubscriptionID == "")
        {
    // Run while loop until its found
        while ($transDetailsResponse->PaymentTransactionDetails->PaymentItemInfo->Subscription->SubscriptionID=="")
            {

            try {

            $transDetailsResponse = $paypalService->GetTransactionDetails($request);
            } catch (Exception $ex) {
            include_once("../Error.php");
            exit;
            }   

        }
Clive Atkins
  • 545
  • 4
  • 21
  • What if one email has multiple subscriptions? When you get a payment, how would you know which subscription it is a payment for? – Bemmu Mar 28 '16 at 19:10
  • You would have to use the timestamp to match the pair up. I got a less messy way I have added code above. – Clive Atkins Mar 29 '16 at 14:06
  • 1
    This has got to be one of the most insane workarounds ever :D – Bemmu Mar 29 '16 at 18:16
  • 1
    Looks like it has completely stopped returning these ids now the work around above looks to be useless unless you want to end up in a never ending loop. – Clive Atkins Apr 08 '16 at 21:12
  • I don't understand how there isn't more outrage about this. Shouldn't a ton of subscription businesses be broken at this point? – Bemmu Apr 10 '16 at 06:25
  • Here's what I'm doing. When someone creates a subscription, first I receive the instant payment notification subscr_signup, which gives the subscription ID. Then, periodically I do a TransactionSearch with PROFILEID search parameter set to that ID, so I'll know that those transactions are related to that subscription. – Bemmu Apr 10 '16 at 07:10
  • I think the reason that there's such a lack of outrage is that we've become used to crap from PayPal. Contacting their support team just adds to the frustration. I would love to drop them altogether, but about 5% of my customers have issues using their credit cards with our Stripe account, and therefore opt for PayPal. When the cost of managing PayPal exceeds the income, I will drop them in a heartbeat. I LOVE Stripe. – Andreas Huttenrauch Apr 23 '16 at 00:44
  • appears to be fixed now – Clive Atkins May 11 '16 at 21:48
  • Today encountered another GetTransactionDetails call which returned no SUBSCRIPTIONID field despite it showing up accessing PayPal site manually ("Recurring Payment ID shows up in Transaction Details for the transaction on paypal.com"). – Bemmu Aug 08 '17 at 00:12
0

I'm afraid I don't have an answer but I can't see any way for me to participate in this discussion, since I don't have enough reputation to make comments.

I have been having this same problem for a couple of weeks now. (In fact, I can tell that the problems first started with a change on 2016-03-07). https://stackoverflow.com/questions/36647177/paypal-api-has-stopped-sending-profile-ids-any-way-to-match-payments-up-to-a-s

I have noticed today that we have started receiving SUBSCRIPTIONIDs again. However the TRANSACTIONTYPE has changed to 'recurring_payment' instead of 'subscrpayment'.

Have also found that we are receiving transaction details from other sellers entirely mashed up with our transaction details -- product NAME lines that are absolutely nothing at all to do with our business. Completely broken and potentially a security problem.

I've opened several tickets with paypal-techsupport.com to describe these issues but I have not heard back from them yet.

Community
  • 1
  • 1
Tristan
  • 1
  • 3
0

PayPal support has finally responded with this:

The products teams are reporting that this issue should be resolved. Please let us know if you are still seeing instances of this issue.