Fetch Customer by UniqueId or EntityId
Retrieves customer details using either the customer unique ID or the entity ID. Returns the same comprehensive profile as the Fetch Customer endpoint.
Use Case
- When you have the entity ID from a webhook or transaction response
- Quick lookup without needing mobile/PAN details
Authorization
bearerAuth tenantId JWT Bearer token from the Authentication API
In: header
Your unique tenant identifier assigned during onboarding
In: header
Header Parameters
Your unique tenant identifier
Request Body
application/json
Customer unique ID or entity ID
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/customers/fetch/by-uniquId-or-entityid" \ -H "X-TENANT-ID: ACME_CORP" \ -H "Content-Type: application/json" \ -d '{ "customerUniqueIdOrEntityId": "617713338570000051250925" }'{
"result": {},
"pagination": {
"list": true,
"pageSize": 0,
"pageNo": 0,
"totalPages": 0,
"totalElements": 0
}
}{
"type": "https://www.m2pfintech.com/problem/problem-with-message",
"title": "Bad Request",
"status": 400,
"detail": "Unable to convert http message",
"message": "error.http.400"
}{
"type": "https://www.m2pfintech.com/problem/problem-with-message",
"title": "Customer does not exists for given input :customerUniqueIdOrEntityid: 1234567890",
"status": 409,
"detail": "Customer does not exists for given input",
"message": "error.business",
"businessCode": "PPCUST_080"
}De-Duplicate Check (PAN & Mobile) POST
Checks if a customer with the given PAN and/or mobile number already exists. This is a **pre-issuance validation** step to prevent duplicate forex card issuance. ### Response Interpretation | Mobile | PAN | Meaning | |--------|-----|---------| | `null` | `null` | ✅ No duplicate — safe to proceed | | Masked mobile | `null` | ⚠️ Mobile match found, no PAN match | | `null` | Masked PAN | ⚠️ PAN match found, no mobile match | | Masked mobile | Masked PAN | ⚠️ Both match — same customer exists | ### Masked Values Returned PAN/mobile values are partially masked for privacy: - Mobile: `709****999` - PAN: `BMX****23B`
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
