User Preference
HTTPS POST / Server-to-ServerRequests and Responses are encrypted using JWT
- Algorithm : HMAC SHA-256 using Merchant’s Secret Key.
Refer JWT Token Guide on how to prepare requests and process responses.
https://sandbox-pgw.2c2p.com/payment/4.3/userpreferencehttps://pgw.2c2p.com/payment/4.3/userpreference
API ParameterUser Preference Request Parameter 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.
- The sample code below demonstrates the correct structure for an API request.
{
"paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
"clientID": "E380BEC2BFD727A4B6845133519F3AD7",
"locale": "en"
}curl --location --request POST 'https://sandbox-pgw.2c2p.com/payment/4.3/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.
{
"paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
"user": {
"preference": {
"name": null,
"email": null,
"mobileNo": null,
"mobileNoPrefix": "60",
"locale": "",
"currencyCode": "MYR",
"countryCode": "MY"
},
"paymentChannels": []
},
"respCode": "0000",
"respDesc": "Success"
}Run test with Swagger Editor
Updated 11 days ago
