User Preference

👍

HTTPS POST / Server-to-Server

Sandbox endpoint : sandbox-pgw.2c2p.com/payment/4.1/userpreference
Run test with Swagger Editor

To go live, refer to: Live endpoint guide

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.

For API specifications, refer to: User Preference Request Parameter

{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
    "clientID": "E380BEC2BFD727A4B6845133519F3AD7",
    "locale": "en"
}

 

User Preference Response


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

For API specifications, refer to: User Preference Response Parameter

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