question

vsalidev avatar image
vsalidev asked Zeeshan Iqbal answered

IFrame/API setup (returns 500 with requestedRegionContext error)

I am attempting to convert a web app from PayPal's old PayFlow integration to the Hosted IFrame/REST API payment model. My website uses the hosted IFrame to get a "source" token which it passes up with order data to the site's REST API; that API then calls Clover's REST API to create a charge. This will be a very simple implementation for payment processing only; we will not be using order/customer data or any Clover tools for anything like refunds, etc.

In the sandbox I can use the interface provided in the documentation, supplying the source token from the iframe and getting a successful charge object back. However, when attempting the same thing through our server's REST API, Clover sends this:


{"message":"500 Internal Server Error","error":{"code":"processing_error","message":"Invalid data: requestedRegionContext does not equal requestedRegionContext"}}


What am I doing wrong?

REST APIecommerce
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

liamsmith avatar image
liamsmith answered bryanvargas edited

The error message suggests that the value of requestedRegionContext is not equal to itself. This could be due to an issue with the format of the parameter or an issue with the way it is being passed to the API.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Zeeshan Iqbal avatar image
Zeeshan Iqbal answered

If an IFrame/API setup returns a 500 error with a "requestedRegionContext" issue, it could be due to improper region configurations or restrictions. Ensuring the correct region settings, whether you're in the US or a Random Country like Chile, can help resolve this error and ensure smooth API functionality.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community