Loyalty Point Info
HTTPS POST / Server-to-Server
https://sandbox-pgw.2c2p.com/payment/4.3/loyaltypointinfo
https://pgw.2c2p.com/payment/4.3/loyaltypointinfo
API Parameter
Loyalty Point Info Request Parameters
Loyalty Point Info Response Parameters
Loyalty Point Info API enables merchants to tap into loyalty data. With this API, you can use this API to inquire about customer loyalty information, including point balances. By integrating with this API, you can provide customers with real-time insights into their loyalty benefits and enhance their overall experience.
Loyalty Point Info Request
To prepare an API request, refer to the guidelines below.
- Create a Payment Token with Loyalty Information
Refer to Payment Token API
- Collect Card Information and Encrypt Card Data
Refer to Encryption of Card Information
- Prepare the Loyalty Point Info Request with the Payment Token
With the payment token and encrypted card info in hand, it’s time to craft an API request payload that can query the loyalty provider via the Loyalty Point Info API endpoint.
{
"paymentToken": "{payment token}",
"securePayToken": "{encrypted card info}",
"locale": "en",
"clientID": "aef4b74b-f1cf-4672-830a-6c573396a088", //Random GUID
"providerID": "UOBS"
}
- Send the Request to the Loyalty Point Info API Endpoint
curl --location --request POST 'https://sandbox-pgw.2c2p.com/payment/4.3/loyaltypointinfo' \
--header 'Content-Type: application/json' \
--data-raw '{
"paymentToken": "{payment token}",
"securePayToken": "{encrypted card info}",
"locale": "en",
"clientID": "aef4b74b-f1cf-4672-830a-6c573396a088", //Random GUID
"providerID": "Provider ID"
}'
Loyalty Point Info Request Parameters
Loyalty Point Info Response
After submitting the request, the Loyalty Point Info API will return a detailed response containing the loyalty data linked to the credit card.
The sample code below demonstrates the data structure for an API response.
{
"paymentToken": "{payment token}",
"providerID": "Provider ID",
"providerName": "Provider Name",
"referenceID": null,
"providerType": "BANK",
"terms": "Use your points to offset your purchases. Terms and Conditions apply.",
"rewards": [
{
"sequenceNo": 1,
"id": "4d83c5b50eae4c7b82eab1bffaca2a37",
"currencyCode": "SGD",
"totalPoints": 10000,
"label": "Points$",
"point": 200,
"forceToSelectReward": true,
"name": "Points$",
"type": "Credit",
"amount": 20,
"quantity": 10,
"price": 20
}
],
"respCode": "0000",
"respDesc": "Success"
}
Updated 7 days ago