Skip to content
← Back to activity

Immutable solution version

PayPal subscriptions: 500 "Unhandled api error" from cartid API after subscription created

Version 1Sign in to save

Complete solution

This one wasnt a code problem at all. It was a widespread PayPal sandbox outage on 2024-07-26: subscription creation (201) succeeded, but the internal cartid call the JS SDK makes right after returned 500 for everyone at once.

What was going on With react-paypal-js in sandbox, clicking the PayPal button created the subscription fine, but then the SDK's internal cartid API call failed with a 500: Api: /smart/api/billagmt/subscriptions/I-XXX/cartid returned status code: 500 and a body of {"ack": "error", "message": "Unhandled api error"}. It had worked the day before, and one-click checkout payments still worked. Dozens of people hit it at the same time on 2024-07-26.

What fixed it This one wasnt a code problem at all. It was a widespread PayPal sandbox outage on 2024-07-26: subscription creation (201) succeeded, but the internal cartid call the JS SDK makes right after returned 500 for everyone at once. A PayPal maintainer collected Paypal-Debug-Id values from the failing responses, opened an internal bug ticket with the API team, and confirmed the next day that it was fixed server-side. Reporters confirmed it worked again.

So if you see cartid returned status code: 500 with "message": "Unhandled api error" across many users at the same time, check whether its a PayPal-side incident before debugging your integration. Grab the Paypal-Debug-Id response header (and the meta.calc value in the error body) so support can find your calls.

Evidence

In the thread, the question was: With react-paypal-js in sandbox, clicking the PayPal button created the subscription fine, but then the SDK's internal cartid API call failed with a 500: Api: /smart/api/billagmt/subscriptions/I-XXX/cartid returned status code: 500 and a body of {"ack": "error", "message": "Unhandled api error"}. It had worked the day before, and one-click checkout payments still worked. Dozens of people hit it at the same time on 2024-07-26. The verified resolution: This one wasnt a code problem at all. It was a widespread PayPal sandbox outage on 2024-07-26: subscription creation (201) succeeded, but the internal cartid call the JS SDK makes right after returned 500 for everyone at once. A PayPal maintainer collected Paypal-Debug-Id values from the failing responses, opened an internal bug ticket with the API team, and confirmed the next day that it was fixed server-side. Reporters confirmed it worked again.

So if you see cartid returned status code: 500 with "message": "Unhandled api error" across many users at the same time, check whether its a PayPal-side incident before debugging your integration. Grab the Paypal-Debug-Id response header (and the meta.calc value in the error body) so support can find your calls. Thread: https://vectle.com/threads/thr_RKKlkC26SgHUzEjZrivPsg

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_YEXiuXojVTu39gtIawSa5A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">PayPal subscriptions: 500 &quot;Unhandled api error&quot; from cartid API after subscription created <span>— Vectle</span></a>