Retrieve Customer Record API

The Retrieve Customer Record API allows you to fetch customer details using various identifiers such as customerId, mobileNumber, email, or urn.

Environment

EnvironmentURL
Testhttps://apitest.payu.in/loyalty-points/v1/wallet/retrieveCustRecord
Productionhttps://api.payu.in/loyalty-points/v1/wallet/retrieveCustRecord

HTTP Method: POST

Request Headers

This API uses HMAC-SHA512 authentication on the header.

Parameter Description
walletIdentifier
mandatory
String Program Type (e.g., CLW)
date
mandatory
String GMT formatted date (e.g., Thu, 17 Feb 2022 08:17:59 GMT)
Authorization
mandatory
String HMAC-SHA512-based authentication token
Content-Type
mandatory
String application/json
↩️

If you do not post the authentication, you will get error in response. For the list of error codes, refer to Status Codes

hmac authentication logic

hmac username="smsplus", algorithm="sha512", headers="date", signature="7ff938849aa79265a3de63fe241dfecb1c680f58c6d11e9f9ca08512afea374705eb9f8995ef6c4584e16eca2e1dc688262bb0937a36cc0f75ec22a9eea33523"

Where, the fields in this example are:

  • username: The merchant key of the merchant.
  • algorithm: This must have the value as hmac-sha512 that is used for this API.
  • headers: This must have the value as date digest.
  • signature: This must contain the hmacsha512 of (signing_string, merchant_secret), where:
  • signing_string: It must be in the "date: {dateValue}"format. Here, the dateValue is the same values in the fields listed in this table For example, "date: Thu, 17 Feb 2022 08:17:59 GMT"
  • merchant_secret: The merchant Salt of the merchant. For more information on getting the merchant Salt, refer to Generate Merchant Key and Salt.

Request Parameters

parameter description example
messageCode mandatory Numeric (4) - API Code to uniquely identity 'Register Customer' API 1930
clientTxnId mandatory AlphaNumeric (100) - Unique Id generated by the calling application for each transaction. This ID should always unique in all API Requests. 20150701235959xhstiesqfds
requestDateTime mandatory Numeric (14) - Local Date and time stamp when the transaction originated from the calling application in YYYYMMDDHHMMSS 20161031214559
customerMobile optional Numeric (15) - This is customer mobile number including country code 916789123456
customerId optional String (20) - Customer Id, which uniquely identifies the walletholder in the client system 0011001188721
emailId optional String(50) - Email Address of the Customer. [email protected]
urn optional Numeric(11) - A unique reference number for the generated wallet. 70000000008

📘

Note: At least one of customerMobile, customerId, or urn must be provided.

Response Parameters

ParameterDescriptionExample
responseCodeResponse status code00
messageCodeAPI response code1931
clientTxnIdMirrors the request's clientTxnIdretrieval12
mobileCustomer mobile number918765432123
emailCustomer email address[email protected]
firstNameCustomer first nameJohn
lastNameCustomer last nameDoe
kycNameKYC verified nameJohn Doe
urnWallet reference number70000000008
accountNumberAccount number72623345
walletStatusCurrent wallet statusACTIVE
availableBalanceCurrent available balance5000
responseMessageResponse messageCUSTOMER RECORD RETRIEVED SUCCESSFULLY

Sample Request

curl --location --request POST 'https://apitest.payu.in/loyalty- points/v1/wallet/retrieveCustRecord' \
--header 'walletIdentifier: CLW' \
--header 'authorization: hmac username="smsplus", algorithm="sha512", headers="date", signature="v15rnvh1InSEWRq6EW9BCfXlxO0QI/4Sxxmdxd2f4Q0="' \
--header 'date: Wed, 12 Jun 2024 08:53:43 GMT' \
--header 'Content-Type: application/json' \
--header 'Cookie: PHPSESSID=s4uujktf7gm484pt7uk7bdhv55' \
--data-raw '{ 
"messageCode":1930,
"clientTxnId": "ram91e9112221001028", 
"requestDateTime": "20220615123143",
"customerMobile": "9199998035345"
}'

Sample Response

{
  "responseCode": "00",
  "messageCode": 1931,
  "clientTxnId": "ram91e911222100005",
  "clientId": "7310",
  "responseDateTime": "20240521183019",
  "accosaTransactionId": 412,
  "responseMessage": "SUCCESS",
  "bankId": 6060,
  "profileId": 300,
  "mobile": "918878638233",
  "email": "[email protected]",
  "firstName": "test",
  "lastName": "test",
  "dob": "15-Dec-2009",
  "kycName": "SHORTFALL_KYC",
  "riskCategory": "LOW_RISK",
  "riskScore": 12,
  "rekyc": false,
  "rekycValidity": "21-05-2034",
  "form60": true,
  "panValid": false,
  "form60Validity": "31-03-2025",
  "cardList": [
    {
      "cardNumber": "854321 XXXXXX 6168",
      "lastFourDigit": "6168",
      "entityName": "PAYU",
      "cardType": "GPR",
      "profileId": 0,
      "cardStatus": 0,
      "availableBalance": 0,
      "createdOn": "21-May-2024",
      "updatedOn": "21-May-2024",
      "urn": 1000019,
      "statusDescription": "Active",
      "transactionProfiles": [
        {
          "transactionProfileId": 1,
          "status": true,
          "transactionType": "e-Com",
          "transactionRegionName": "DOMESTIC"
        },
        {
          "transactionProfileId": 2,
          "status": true,
          "transactionType": "POS",
          "transactionRegionName": "DOMESTIC"
        },
        {
          "transactionProfileId": 3,
          "status": true,
          "transactionType": "e-Com",
          "transactionRegionName": "INTERNATIONAL"
        },
        {
          "transactionProfileId": 4,
          "status": true,
          "transactionType": "POS",
          "transactionRegionName": "INTERNATIONAL"
        }
      ],
      "subwalletListDetails": [
        {
          "subwallet_id": "731f7956a39_1",
          "default_wallet": 1,
          "available_balance": "0",
          "account_number": "606009993005780",
          "account_status": "0",
          "subwallet_name": "ClosedLoop",
          "accountValidity": "0527"
        }
      ],
      "uniqueNumberValidity": "0529",
      "cardLinked": true
    }
  ]
}

Ask AI Beta

Hi! I am an AI Assistant. Ask me about PayU and get help with your integration.
Responses are generated by AI, may contain some mistakes.

EXAMPLE QUESTIONS