Get Instant Solutions for Kubernetes, Databases, Docker and more
Adyen is a comprehensive payment gateway solution that enables businesses to accept payments from customers worldwide. It supports a wide range of payment methods and currencies, making it a popular choice for e-commerce platforms and businesses looking to streamline their payment processing. Adyen's robust API allows developers to integrate payment functionalities seamlessly into their applications.
When integrating Adyen into your application, you might encounter an error message indicating an 'Invalid Shopper Locale'. This error typically appears during the payment process, causing transactions to fail or be rejected. The error message may look something like this:
{
"errorCode": "Invalid Shopper Locale",
"message": "The shopper locale specified is not valid or supported."
}
The 'Invalid Shopper Locale' error occurs when the locale specified in the payment request does not match any of the supported locales by Adyen. The locale is a combination of language and country code (e.g., 'en_US' for English in the United States). This error can arise due to typos, unsupported locales, or incorrect formatting of the locale string.
To resolve the 'Invalid Shopper Locale' error, follow these steps:
Consult the Adyen Localization Documentation to ensure that the locale you are using is supported. This documentation provides a list of all valid locale codes that can be used in your payment requests.
Ensure that the locale is formatted correctly as a combination of language and country code, separated by an underscore (e.g., 'en_US'). Double-check for any typographical errors in the locale string.
Once you have verified the correct locale, update your application code to use the valid locale. Here is an example of how you might set the locale in a payment request:
{
"amount": {
"currency": "USD",
"value": 1000
},
"reference": "YOUR_ORDER_REFERENCE",
"shopperLocale": "en_US"
}
After making the necessary changes, test your application to ensure that the error is resolved. Conduct several test transactions to verify that the payment process works smoothly with the updated locale.
By following these steps, you can effectively resolve the 'Invalid Shopper Locale' error in your Adyen integration. Ensuring that you use a valid and correctly formatted locale will help maintain a seamless payment experience for your customers. For further assistance, refer to the Adyen Support Center.
(Perfect for DevOps & SREs)
Try Doctor Droid — your AI SRE that auto-triages alerts, debugs issues, and finds the root cause for you.