m2pfintech
API LibraryCustomer

Get Customer Usage Details (LRS Limits)

Retrieves the customer's transaction usage/limits consumed, aggregated by base currency and transaction type. This is critical for forex operations to track LRS (Liberalised Remittance Scheme) limits.

Use Cases

  • Check how much of the ₹7 lakh LRS limit has been consumed
  • Validate load eligibility before initiating forex card load
  • Display usage summary in partner app

Response Structure

Returns usage broken down by:

  • Base currency (USD, INR, etc.)
  • Transaction type (LOAD, LOAD_DIY, etc.)
  • Time period (daily, monthly, yearly, overall)
POST
/v1/customers/getUsageDetails

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

mobile?
pan*string

Required. Customer PAN number

Length1 <= length
dob?string

Customer date of birth

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/customers/getUsageDetails" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "mobile": {      "value": "9876543210",      "countryCode": 91    },    "pan": "ABCDE1234F"  }'
{
  "result": {
    "baseCurrencyConsumptions": [
      {
        "baseCurrency": "USD",
        "transactionTypes": {
          "LOAD": {
            "daily": {
              "amount": 0
            },
            "monthly": {
              "amount": 0
            },
            "yearly": {
              "amount": 10
            },
            "overall": {
              "amount": 0
            }
          },
          "LOAD_DIY": {
            "daily": {
              "amount": 0
            },
            "monthly": {
              "amount": 0
            },
            "yearly": {
              "amount": 0
            },
            "overall": {
              "amount": 0
            }
          }
        }
      },
      {
        "baseCurrency": "INR",
        "transactionTypes": {
          "LOAD": {
            "daily": {
              "amount": 0
            },
            "monthly": {
              "amount": 0
            },
            "yearly": {
              "amount": 10
            },
            "overall": {
              "amount": 0
            }
          }
        }
      }
    ]
  },
  "pagination": null
}
{
  "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": "Invalid request",
  "status": 409,
  "detail": "Invalid request",
  "message": "error.business",
  "businessCode": "PPCUST_010"
}

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` |

Update Customer Account Status POST

Changes the customer's account status. Only valid status transitions are allowed. ### Valid Statuses | Status | Description | |--------|-------------| | `ACTIVE` | Account is fully operational | | `LOCKED` | Temporarily locked (can unlock) | | `BLOCKED` | Blocked by admin (terminal for some transitions) | | `FRAUD` | Flagged for fraud | | `INACTIVE` | Account inactive | | `CUSTOMER_BLOCKED` | Blocked at customer request | | `CREDIT_FREEZE` | Credits blocked, debits allowed | | `DEBIT_FREEZE` | Debits blocked, credits allowed | | `REFUND_ONLY` | Only refund transactions allowed | | `CLOSED` | Account permanently closed | | `EXPIRED` | Account expired | ### Invalid Transitions Attempting an invalid transition (e.g., CREDIT_FREEZE → CREDIT_FREEZE) returns error code `PPCUST_032`.