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

kitNo?string

Card kit number

entityId?string

Customer entity ID

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

Process Account Action State Transition (Checker) POST

Approves or rejects a **pending** account action request as the **checker** step of the maker-checker workflow. The checker must be a different user than the one who created the original request (maker). ### State Machine ``` PENDING ──(APPROVED)──▶ APPROVED PENDING ──(REJECTED)──▶ REJECTED ``` Any other transition (e.g. trying to approve an already-approved request) returns a 409 `invalidStateTransitionError`. ### Notes - `id` is the unique maker-checker record ID returned in the `result.id` field of the `/v1/accounts/update` response. - `userId` must be the checker's user ID and **cannot** match the maker's `sourceUser`. - `reason` is an optional free-text array explaining the checker's decision.