{"id":11104,"date":"2025-01-21T05:28:56","date_gmt":"2025-01-21T05:28:56","guid":{"rendered":"https:\/\/www.trustedhosting.in\/blog\/?p=11104"},"modified":"2025-01-21T05:28:56","modified_gmt":"2025-01-21T05:28:56","slug":"troubleshoot-paypal-invoice-not-found","status":"publish","type":"post","link":"https:\/\/www.webystrata.com\/blog\/troubleshoot-paypal-invoice-not-found\/","title":{"rendered":"Troubleshooting PayPal &#8216;Invoice Not Found&#8217; error with Subscriptions starting with &#8216;S-&#8216;"},"content":{"rendered":"<h1><a href=\"https:\/\/www.trustedhosting.in\/master-reseller-hosting.html\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11005 size-full\" title=\"Troubleshooting PayPal 'Invoice Not Found' error with Subscriptions starting with 'S-'\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/2148252151.jpg\" alt=\"Troubleshooting PayPal 'Invoice Not Found' error with Subscriptions starting with 'S-'\" width=\"1500\" height=\"1001\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2148252151.jpg 1500w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2148252151-300x200.jpg 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2148252151-1024x683.jpg 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2148252151-768x513.jpg 768w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/a><\/h1>\n<h1 class=\"lesson\">Troubleshooting PayPal &#8216;Invoice Not Found&#8217; error with Subscriptions starting with &#8216;S-&#8216;<\/h1>\n<div class=\"step step-depth-1\" data-step-uuid=\"fc295019-653e-4551-8033-32aaff679a3e\">\n<h2 id=\"introduction\" tabindex=\"0\">Introduction<\/h2>\n<\/div>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_092d1659-0572-4409-b2b0-c88cc2072656\" class=\"text-block-content\">\n<p>At the time of this writing (15 November, 2018), we have become aware of a change to legacy-styled PayPal Subscriptions (IDs starting with &#8216;S-&#8216;) that impacts the method by which subscription payments are associated with unpaid invoices. This may result in some PayPal subscription payments not being applied to invoices.<\/p>\n<p>The WHMCS Development Team is introducing an automated migration path in the upcoming 7.7 release. PayPal have set a 2 month window for migration, but we have raised the possibility of extending this.<\/p>\n<p><strong>To resolve this matter, we will need to identify the New Subscription ID Paypal is sending and update the affected Service&#8217;s Subscription ID to use the value PayPal is now providing.<\/strong><\/p>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"f13e0306-2bc8-4b85-8fee-bd0c8c02281c\">\n<h2 id=\"cause\" tabindex=\"0\">Cause<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_e6a1d732-da6d-4d91-ab37-0db9810034bd\" class=\"text-block-content\">\n<p>At the end of October 2018, PayPal made an undocumented and unannounced change to the format of IPN data. This is the notification sent from PayPal to your WHMCS installation notifying it when a payment is received.<\/p>\n<p>This change converts old &#8216;S-&#8216; formatted subscription IDs to the new &#8216;I-&#8216; style. During this transition, PayPal has begun supplying both the old and new subscription values, but has replaced the value WHMCS utilizes with the new value.<\/p>\n<p>As a result, when WHMCS receives an IPN for a payment, and attempts to look up the service using the subscription_id value, it does not match the stored value.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"56f44d22-8ebe-4142-9f5b-2556121f457a\">\n<h2 id=\"resolution\" tabindex=\"0\">Troubleshooting<\/h2>\n<\/div>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_4f02eca5-a8fe-42f5-ab70-fe7e5b9e1e0e\" class=\"text-block-content\">\n<p>Firstly, we need to review the Gateway Log to obtain the\u00a0<em>old_subscr_id<\/em>\u00a0value. This is the value that WHMCS is aware of in a Product\/Service and is what we will need to replace later on.<\/p>\n<p>To open the Gateway Log, navigate to\u00a0<strong>Billing &gt;&gt; Gateway Log<\/strong>\u00a0as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11105\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/b51a9ea7-ce48-4597-a95c-a77b09238c4f.png\" alt=\"\" width=\"508\" height=\"267\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/b51a9ea7-ce48-4597-a95c-a77b09238c4f.png 508w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/b51a9ea7-ce48-4597-a95c-a77b09238c4f-300x158.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/p>\n<p>From here we need to look at the logs to identify affected payments. An example of an entry is shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11106\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/2c0b1ffc-5d08-4650-bb87-2e2c38c2cb7d.png\" alt=\"\" width=\"855\" height=\"60\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2c0b1ffc-5d08-4650-bb87-2e2c38c2cb7d.png 855w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2c0b1ffc-5d08-4650-bb87-2e2c38c2cb7d-300x21.png 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/2c0b1ffc-5d08-4650-bb87-2e2c38c2cb7d-768x54.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/p>\n<p>If we scroll down in the Debug Data box, we can see that an\u00a0<em>old_subscr_id<\/em>\u00a0is provided, in addition to the expected\u00a0<em>subscr_id<\/em>. In this case, you can see the\u00a0<em>old_subscr_id<\/em>\u00a0does start with an\u00a0<strong>S-<\/strong>\u00a0and this is the cause of our issue.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11107\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/c7389f37-fb34-4806-8d99-67109682d625.png\" alt=\"\" width=\"778\" height=\"141\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/c7389f37-fb34-4806-8d99-67109682d625.png 778w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/c7389f37-fb34-4806-8d99-67109682d625-300x54.png 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/c7389f37-fb34-4806-8d99-67109682d625-768x139.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/p>\n<div class=\"step step-depth-1\" data-step-uuid=\"96a420c8-5738-4926-9155-a1cc515905bc\">\n<h2 id=\"resolution_1\" tabindex=\"0\">Resolution<\/h2>\n<\/div>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_fa6b81ec-6460-4c79-a2b1-7cb5a7a444fe\" class=\"text-block-content\">\n<p>To resolve this issue, we will need to locate the customer&#8217;s specific product that is affected. The simplest way to do this is to use our Intelligent Search to look for a &#8220;known variable&#8221;. In this case, we will search for the customer&#8217;s name which is referenced in the Debug Data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11108\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/08191bce-caf7-4058-9dba-30ae55882e60.png\" alt=\"\" width=\"562\" height=\"189\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/08191bce-caf7-4058-9dba-30ae55882e60.png 562w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/08191bce-caf7-4058-9dba-30ae55882e60-300x101.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/p>\n<p>Once the customer is opened, we can navigate to the\u00a0<strong>Products\/Services<\/strong>\u00a0tab to locate the affected item. We are looking for the\u00a0<strong>Subscription ID<\/strong>\u00a0field that matches the\u00a0<em>old_subscr_id<\/em>\u00a0value located in the Debug Data we found earlier.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11109\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/91aed1a1-252f-4f36-b445-7605e2367517.png\" alt=\"\" width=\"855\" height=\"274\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/91aed1a1-252f-4f36-b445-7605e2367517.png 855w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/91aed1a1-252f-4f36-b445-7605e2367517-300x96.png 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/91aed1a1-252f-4f36-b445-7605e2367517-768x246.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/p>\n<p>Once this is located, we simply need to &#8220;swap&#8221; out that value for the new\u00a0<em>subscr_id<\/em>\u00a0that starts with an\u00a0<strong>I-<\/strong>\u00a0as shown below. Once swapped out, simply click\u00a0<strong>Save Changes<\/strong>\u00a0and you are all set going forward!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11110\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/623cdbbc-5000-44e1-85da-df51d0274a6c.png\" alt=\"\" width=\"855\" height=\"265\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/623cdbbc-5000-44e1-85da-df51d0274a6c.png 855w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/623cdbbc-5000-44e1-85da-df51d0274a6c-300x93.png 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/623cdbbc-5000-44e1-85da-df51d0274a6c-768x238.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/p>\n<div class=\"step step-depth-1\" data-step-uuid=\"8d76efc2-9d9f-4507-8216-996d4ede1a27\">\n<h2 id=\"important-notes\" tabindex=\"0\">Important Notes<\/h2>\n<\/div>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_c9479860-811f-407b-8d22-9a944d4f1be8\" class=\"text-block-content\">\n<p>You may need to manually apply the invoice payment to the outstanding invoice. You will want to check if the customer has any outstanding Credit Balance. If WHMCS was able to match the transaction to the customer, an account credit will be applied. If WHMCS was not able to match the customer, the payment is not applied at all and will need to be manually applied. Please see our documentation referenced below on how to perform these tasks:<\/p>\n<p>How to Manually Apply a Payment to an Invoice<\/p>\n<p>Handling Credits in WHMCS<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Troubleshooting PayPal &#8216;Invoice Not Found&#8217; error with Subscriptions starting with &#8216;S-&#8216; Introduction At the time of this writing (15 November,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":11005,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-11104","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whmcs"],"_links":{"self":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/11104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/comments?post=11104"}],"version-history":[{"count":2,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/11104\/revisions"}],"predecessor-version":[{"id":11112,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/11104\/revisions\/11112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media\/11005"}],"wp:attachment":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media?parent=11104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/categories?post=11104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/tags?post=11104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}