m2pfintech
API LibraryCustomer

Fetch Customer Details by Search Criteria

Searches for and retrieves customer details based on a flexible search criteria. This is the primary customer lookup API that supports searching by mobile number, kit number, entity ID, PAN, email, and other identifiers.

When to Use

  • Customer Support: Look up a customer using whatever identifier they provide
  • Pre-Transaction Validation: Verify customer existence before initiating operations
  • Profile Display: Fetch customer details to display in your app or portal

Response

Returns comprehensive customer details including:

  • Personal information (name, DOB, gender, email, mobile)
  • KYC details and status
  • Card details (kit number, card status, product type)
  • Account/wallet information
  • Address details

Important Notes

  • The response structure includes nested card and wallet details
  • For customers with multiple cards, all cards are included in the response
  • PAN and Aadhaar numbers are masked in the response for security
POST
/v1/customers/support/fetch-details

Authorization

bearerAuth tenantId
AuthorizationBearer <token>

JWT Bearer token from the Authentication API

In: header

X-TENANT-ID<token>

Your unique tenant identifier assigned during onboarding

In: header

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Request Body

application/json

Search criteria with type and value

searchType*string

Required. Type of search criteria. Determines how the value field is interpreted.

Value in"MOBILE" | "KIT" | "CUSTOMER_ID" | "ENTITY_ID" | "CARD" | "PAN" | "EMAIL_ID" | "FIRST_NAME" | "LAST_NAME"
value*string

Required. The search value corresponding to the searchType. Examples by type:

  • MOBILE: 9876543210
  • KIT: 910000031
  • ENTITY_ID: 798782647420001622070825
  • PAN: ABCDE1234F
  • EMAIL_ID: rajesh@email.com
Length1 <= length
countryCode?string
tenant?string

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/customers/support/fetch-details" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "searchType": "MOBILE",    "value": "9876543210"  }'
{
  "result": {
    "customerId": "CUST_12345",
    "entityId": "798782647420001622070825",
    "firstName": "Rajesh",
    "lastName": "Kumar",
    "email": "rajesh.kumar@email.com",
    "mobile": {
      "value": "9876543210",
      "countryCode": 91
    },
    "dob": "1990-05-15",
    "gender": "Male",
    "panNo": "ABCDE****F",
    "kycType": "FULL_KYC",
    "kycStatus": "VERIFIED",
    "status": "ACTIVE",
    "cards": [
      {
        "kitNo": "910000031",
        "maskedCardNumber": "5231XXXXXXXX0015",
        "productName": "Forex Travel Card",
        "productType": "Forex",
        "cardStatus": "ACTIVE",
        "expiryDate": "11/2029",
        "wallets": [
          {
            "accountId": "17556437212850072",
            "currency": "USD",
            "balance": 1250,
            "status": "ACTIVE"
          },
          {
            "accountId": "28667548323960183",
            "currency": "EUR",
            "balance": 500,
            "status": "ACTIVE"
          }
        ]
      }
    ],
    "address": {
      "address1": "123, MG Road",
      "city": "Bangalore",
      "state": "Karnataka",
      "pin": "560001",
      "country": "India"
    }
  },
  "pagination": null
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Bad Request",
  "status": 400,
  "detail": "searchType: must not be null",
  "message": "error.http.400"
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Customer does not exist",
  "status": 409,
  "detail": "No customer found for the given search criteria",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}

Fetch Customer Details POST

Retrieves comprehensive customer profile including card details, wallet balances, KYC status, preferences, and account information. ### Search Options You can search by one or more of: - Mobile number - PAN number - Date of birth - Entity ID - Kit number - CIF number ### Response Includes - Customer personal details (name, DOB, gender, email) - All card accounts with status, kit number, masked card number - Wallet details with currency and account IDs - KYC status and verification method - Card preferences (ATM, POS, E-com limits) - Trip history (for forex customers) - Bank account details - Product information

Search Customers by Criteria POST

Searches for customers using various search criteria. Returns a paginated list of matching customer profiles. ### Search Types | Type | Description | Example Value | |------|-------------|---------------| | `MOBILE` | Search by mobile number | `9876543210` | | `KIT` | Search by card kit number | `20003255` | | `CUSTOMER_ID` | Search by customer ID | `9932482` | | `ENTITY_ID` | Search by entity ID | `617713338570000051250925` | | `CARD` | Search by masked card number | `876541XXXXXX0682` | | `PAN` | Search by PAN number | `ABCDE1234F` | | `AADHAAR_ID` | Search by Aadhaar number | `XXXX-XXXX-1234` | | `EMAIL_ID` | Search by email | `john@example.com` | | `FIRST_NAME` | Search by first name | `John` | | `LAST_NAME` | Search by last name | `Doe` | | `KYC_TOKEN` | Search by KYC token | `TOKEN123` | | `CUSTOMER_ENTITY_ID` | Search by customer entity | `CUST_ENT_001` | | `VOTER_ID` | Search by voter ID | `ABC1234567` |