m2pfintech
API LibraryCustomer

Create Account Action Request (Maker)

Creates an account action request as the maker step of a maker-checker workflow. The request is created in a PENDING state and stays pending until a separate checker approves or rejects it via the account state-transition API.

Action Types

actionTypeDescription
CLOSUREClose the account. Optionally pull back the residual balance to a bank account (bankDetails + autoPullback).
STATUS_UPDATEChange the account status.
FREEZEFreeze the account (block debits/credits per product config).
UNFREEZEReverse a freeze and restore the account.
LIMIT_UPDATEUpdate account-level limits.

Notes

  • customerEntityId and accountEntityId are mandatory.
  • For CLOSURE with balance pull-back, supply bankDetails and set autoPullback: true.
  • updateReason is free text, capped at 512 characters.
POST
/v1/accounts/update

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

customerEntityId*string

Required. Entity ID of the customer who owns the account.

Length1 <= length
accountEntityId*string

Required. Entity ID of the account the action applies to.

Length1 <= length
actionType?string

Type of account action to perform.

Value in"CLOSURE" | "STATUS_UPDATE" | "FREEZE" | "UNFREEZE" | "LIMIT_UPDATE"
updateReason?string

Free-text reason for the action.

Lengthlength <= 512
bankDetails?

Beneficiary bank account details used for closure balance pull-back.

autoPullback?boolean

When true (for CLOSURE), the residual balance is auto pulled back to bankDetails.

Defaultfalse
sourceChannel?string

Channel that originated the request.

sourceUser?string

Identifier of the user/operator that initiated the request.

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/accounts/update" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "customerEntityId": "750244137320000234050825",    "accountEntityId": "750244137320000234050825-ACC01",    "actionType": "CLOSURE",    "updateReason": "Customer requested account closure",    "autoPullback": true,    "bankDetails": {      "accountHolderName": "John Doe",      "accountNumber": "1234567890123",      "ifsc": "HDFC0000123",      "bankName": "HDFC Bank",      "accountType": "SAVINGS"    },    "sourceChannel": "MOBILE_APP",    "sourceUser": "john.doe"  }'
{
  "result": {
    "id": "6612f0a1b2c3d4e5f6a7b8c9",
    "customerEntityId": "750244137320000234050825",
    "accountEntityId": "750244137320000234050825-ACC01",
    "actionType": "CLOSURE",
    "status": "PENDING",
    "message": "Account action request created successfully"
  },
  "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": "Customer does not exists for id",
  "status": 409,
  "detail": "Customer does not exists for id :750244137320000234050643",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}