m2pfintech
API LibraryCustomer

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
POST
/v1/customers/fetch/by-uniquId-or-entityid

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

customerUniqueIdOrEntityId*string

Customer unique ID or entity ID

Length1 <= length

Response 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"
}