---
updatedAt: 2026-03-23T06:38:35.000Z
agentTools:
  projectIndex: https://developer.2c2p.com/llms.txt
---

# User Preference

> 👍 HTTPS POST / Server-to-Server
>
> Requests and Responses are encrypted using JWT
>
> * Algorithm : HMAC SHA-256 using Merchant’s Secret Key.
>
> Refer [***JWT Token Guide***](https://developer.2c2p.com/docs/json-web-tokens-jwt) on how to prepare requests and process responses.

```text Sandbox / Demo URL
https://sandbox-pgw.2c2p.com/payment/4.5/userpreference
```
```text Production URL
https://pgw.2c2p.com/payment/4.5/userpreference
```

> 📘 API Parameter
>
> [***User Preference Request Parameter***](https://developer.2c2p.com/docs/api-user-preference-request-parameter)
> [***User Preference Response Parameter***](https://developer.2c2p.com/docs/api-user-preference-response-parameter)

The User Preference API allows merchants to retrieve information on users' preference settings.

## **User Preference Request**

***

To prepare a user preference request, refer to the guidelines below.

1. The sample code below demonstrates the correct structure for an API request.

```json User Preference Request
{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
    "clientID": "E380BEC2BFD727A4B6845133519F3AD7",
    "locale": "en"
}
```

```curl
curl --location --request POST 'https://sandbox-pgw.2c2p.com/payment/4.5/userpreference' \
--header 'Content-Type: application/json' \
--data-raw '{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
    "clientID": "E380BEC2BFD727A4B6845133519F3AD7",
    "locale": "en"
}'
```

 

## **User Preference Response**

***

The sample code below demonstrates the data structure for an API response.

```json User Preference Response
{
  "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
  "user": {
    "preference": {
      "name": null,
      "email": null,
      "mobileNo": null,
      "mobileNoPrefix": "60",
      "locale": "",
      "currencyCode": "MYR",
      "countryCode": "MY"
    },
    "paymentChannels": []
  },
  "respCode": "0000",
  "respDesc": "Success"
}
```

<b>Run test with</b> [*Swagger Editor*](https://developer.2c2p.com/reference/userpreference)