/v2/subscriptions/bulk-swap-plan Internal Server Error

Square-Version: 2025-06-18’

'{
    "new_plan_variation_id": "6C3QMZ6RQNJZMUC3HQNYF5SS",
    "old_plan_variation_id": "GJNUSIDUPTX4U6H4FFXFAJN6",
    "location_id": "LYD2D6750FT2G"
  }'

Results in:

{
  "errors": [
    {
      "code": "INTERNAL_SERVER_ERROR",
      "detail": "An internal error has occurred, and the API was unable to service your request.",
      "category": "API_ERROR"
    }
  ]
}

Both these variations and the location exist, and present_at_all_locations is true.

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Square Developer
Locations API
Custom Attributes for Locations

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

I see the error in the logs and I’ve reached out to the team about this. :slight_smile:

Thank you! This would be very useful for our product if resolved.

Hi, can I get an update on this please?

Hey @aidansw, sorry for the delay here! The team suspects there may be an issue with the request timing out here. Can you set a longer client-side timeout for the request (~90s) and test again? We’d like to confirm whether that’s the root cause here.

@josh-square Hi, the error occurs within 30 seconds in both the API explorer and with my Go client, I don’t see how to set the timeout in the API explorer- but my Go client gets the error in ~17 seconds consistently- despite me using a Go HTTP Client with a timeout of 180+ seconds. So I am fairly confident that is not the issue. My guess is that the error could occur because there are no actual subscriptions assigned to the old variation, which would be non-idempotent.

@aidansw Got it, thanks for confirming. I’ll see if the team has any other thoughts here.

@aidansw It looks like this is most likely being caused by an internal time out then. The team is going to look into it further to see what they can find!