Checkout page language issue

marcopassarelli
Contributor
Contributor

I am trying to integrate with the PayPal Rest API and I have a problem when trying to create the checkout urls. I have tried with various locales but it doesn't always work. Accepted values are "it-IT", "en-GB", "da-DK", "ja-JP", but for example I cannot use "ru-RU" and "el-GR". Could someone help me?

Here  an example of the request to https://api-m.sandbox.paypal.com/v2/checkout/orders

{
    "intent": "CAPTURE",
    "purchase_units": [
        {
            "custom_id": "TRANSACTION_ID",
            "amount": {
                "currency_code": "EUR",
                "value": "1.00"
            }
        }
    ],
    "payment_source": {
        "paypal": {
            "experience_context": {
                "shipping_preference": "NO_SHIPPING",
                "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED",
                "brand_name": "MY_BRAND",
                "locale": "el-GR",
                "landing_page": "GUEST_CHECKOUT",
                "cancel_url": "http://localhost:4200/cancel.html?brandName=MY_BRAND",
                "return_url": "http://localhost:4200/success.html?brandName=MY_BRAND"
            }
        }
    }
}
Login to Me Too
3 REPLIES 3

Kavyar
Moderator
Moderator

Good day @marcopassarelli 

 

Thank you for posting to the PayPal community.

 

I have successfully tested the request you provided in our local environment, and it is working properly on our end.

 

I would like to suggest that you try again and double-check that you are using the correct credentials when making the create order API call.

 

If you are still experiencing issues, please create an MTS ticket via the following URL  - https://www.paypal-support.com/s/?language=en_US  .Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

marcopassarelli
Contributor
Contributor
Hi Kavyar, Thank you for the response. I probably didn't explain well, but the request I'm making is correct, as I receive the response with the URL for checkout, but the page isn't in Greek using el-GR (or Russian with ru-RU) as I would expect.
Login to Me Too

Kavyar
Moderator
Moderator

Good day @marcopassarelli 

 

To address the error you encountered, which is caused by missing information in the request.

 

I would like to provide you with guidance on how to customize the locale of the buyer's checkout experience by passing a locale code to PayPal.

 

To determine the locale for the checkout page, PayPal takes into account the following factors:

 

  1. The shipping address country provided by the merchant in the request.

 

  1. The country obtained from the locale code parameter passed by the merchant.

 

  1. The country of the currently logged-in user.

 

  1. The merchant's country.

 

In cases where this information is not available, PayPal uses the default locale codes.

 

For more detailed information, please refer to the provided guide at the following link - https://developer.paypal.com/reference/locale-codes/

 

Please follow the instructions above and attempt the process again.

 

If you are still experiencing issues, please create an MTS ticket via the following URL  - https://www.paypal-support.com/s/?language=en_US  .Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.