---
id: setpreferredlanguage
title: Set Preferred Language
hide_title: true
description: "Set the preferred language for notifications for a customer"
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Flag from '../../../../src/components/flag/flag';
import Ingress from '../../../../src/components/ingress/ingress.react';

<Ingress title="Set Preferred Language">
This operation sets a preferred notification language for specified customer. The notification language affects the printed invoice.
</Ingress>

## Parameters

| Field           | min Occurs | nillable | Max | Type   | Description                                                                                                                                                                               |
| :-------------- | :--------- | :------- | :-- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ClientIpAddress | 1          | false    | 50  | string | The IP address of the customer performing the purchase at the partner's web shop.                                                                                                         |
| Password        | 1          | false    | 50  | string | The password used to authorize the request.                                                                                                                                               |
| Username        | 1          | false    | 50  | string | The username used to authorize the request.                                                                                                                                               |
| CorrelationId   | 1          | true     | 50  | string | CorrelationID is sent back in the response.                                                                                                                                               |
| CountryCode     | 1          | false    | 2   | string | The country code (ISO 3166-1 alpha-2) for country.                                                                                                                                        |
| LanguageCode    | 1          | true     | 5   | string | Desired customer notification language code (BCP-47). \*                                                                                                                                  |
| RegNo           | 1          | true     | 20  | string | The registration number of the customer. Either civic registration number or organization number. Only nillable if an IntegrationId is set and has been assigned to the RegNo beforehand. |
| StoreId         | 1          | true     | 4   | short  | The StoreId used for identification of store.                                                                                                                                             |

Supported language codes are:

- sv-SE
- sv-FI
- fi-FI
- en-GB

## Response

| Field         | min Occurs | nillable | Max | Type   | Description                            |
| :------------ | :--------- | :------- | :-- | :----- | :------------------------------------- |
| CorrelationID | 1          | true     | 50  | string | CorrelationID from the request if any. |

### Example Requests

| &nbsp;       | Value                                                              |
| :----------- | :----------------------------------------------------------------- |
| Environment: | UAT                                                                |
| Service:     | PaymentService                                                     |
| URL:         | https://ecommercetest.collector.se/v3.0/PaymentServiceV10.svc?wsdl |
| Function:    | setpreferredlanguage                                               |
| Description: | The operation fetches all reservations                             |
| Notes:       | N/A                                                                |

<Tabs defaultValue="reqB2C" values={[
{ label: 'B2C Request', value: 'reqB2C', },
{ label: 'B2C Response', value: 'resB2C', }]}>
<TabItem value="reqB2C">

```xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pay="http://schemas.ecommerce.collector.se/v30/PaymentService">
   <soapenv:Header>
      <pay:Username>USERNAME</pay:Username>
      <pay:Password>PASSWORD</pay:Password>
      <pay:ClientIpAddress>127.0.0.1</pay:ClientIpAddress>
   </soapenv:Header>
   <soapenv:Body>
      <pay:SetPreferredLanguageRequest>
         <pay:CorrelationId>SetPreferredLanguageV10</pay:CorrelationId>
         <pay:CountryCode>SE</pay:CountryCode>
         <pay:LanguageCode>sv-FI</pay:LanguageCode>
         <pay:RegNo>195001182046 </pay:RegNo>
         <pay:StoreId>1234</pay:StoreId>
      </pay:SetPreferredLanguageRequest>
   </soapenv:Body>
</soapenv:Envelope>

```

</TabItem>
<TabItem value="resB2C">

```xml

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <SetPreferredLanguageResponse xmlns="http://schemas.ecommerce.collector.se/v30/PaymentService">
         <CorrelationId>SetPreferredLanguageV10</CorrelationId>
      </SetPreferredLanguageResponse>
   </s:Body>
</s:Envelope>

```

</TabItem>
</Tabs>

## Error codes

Please see separate page [Error Codes](/docs/paymentsApi/integration/error-codes)

| Fault Code                                   | Description                                                                                  |
| :------------------------------------------- | :------------------------------------------------------------------------------------------- |
| LANGUAGE_CODE_CHANGE_NOT_ALLOWED_FOR_PARTNER | The functionality to change preferred language is not set on merchant. Plase contact Walley. |
