m2pfintech

Add / Modify / Remove Lien

Place a new lien (ADD), modify an existing lien (ADJUST), or fully release a lien (REMOVE) on a wallet's balance. A lien is a temporary hold that reduces the available balance without debiting funds.

ADD — Place a new hold on the specified amount
ADJUST — Modify an existing lien (pass new total, not delta)
REMOVE — Fully release a lien (lienAmount is ignored)

Common use cases: pre-authorization, security deposits, staged debits.

POST
/api/lienmark

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

lienId*string

Unique identifier for this lien. Must be globally unique when creating a new lien (ADD). For ADJUST or REMOVE operations, must match the lienId used during the original ADD.

transactionId*string

Transaction ID for the lien operation (for audit and reconciliation)

extTxnId?string

External transaction ID (optional — used for partner-side reconciliation)

source*string

Source/reason for the lien (e.g., PRE_AUTH, SECURITY_DEPOSIT, STAGED_DEBIT)

txnOrigin?string

Origin channel of the transaction (e.g., POS, ATM, WEB, ECOM)

txnType?string

Type of transaction (e.g., PREAUTH, HOLD, CASH)

accountNumber*string

The wallet/account number on which the lien is to be placed

lienAmount*number

Amount to mark as lien.

  • ADD: The lien amount to place
  • ADJUST: The new total lien amount (not the delta)
  • REMOVE: Ignored — the full lien is removed regardless of value
Formatdouble
type*string

Type of lien operation

Value in"ADD" | "ADJUST" | "REMOVE"
balanceCheck*boolean

Whether to validate sufficient balance exists before placing/adjusting the lien

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/api/lienmark" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "lienId": "LIEN-20260320-001",    "transactionId": "TXN-PREAUTH-12345",    "extTxnId": "EXT-TXN-67890",    "source": "PRE_AUTH",    "txnOrigin": "POS",    "txnType": "PREAUTH",    "accountNumber": "17568190551480014",    "lienAmount": 1000,    "type": "ADD",    "balanceCheck": true  }'
{
  "result": {
    "lienId": "LIEN-20260320-001",
    "transactionId": "TXN-PREAUTH-12345",
    "extTxnId": "EXT-TXN-67890",
    "lienBalance": 1000,
    "accountNumber": "17568190551480014",
    "accountLienBalance": 3500
  },
  "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 exist",
  "status": 409,
  "detail": "Customer does not exists for id",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}