m2pfintech
API LibraryCard Tokenization

Pair ECDH Public Key (One-Time Setup)

Register your ECDH public key with M2P. This is a one-time setup step performed during partner onboarding — not per-session.

The public key is generated using the P-256 (secp256r1) elliptic curve and submitted as a hex-encoded string. M2P stores this key and uses it as the base for ECDH shared secret derivation in subsequent generateSharedSecret calls.

Note: This endpoint is on the Core VDMS API server (/Yappay context), not the Auth/Tokenization service. Use the servers https://secure.yappay.in/Yappay (production) or https://sit-secure.yappay.in/Yappay (sandbox).

POST
/business-entity-manager/pairPublicKey

Authorization

BasicAuth
AuthorizationBasic <token>

Partner credentials (username/password) provisioned during onboarding

In: header

Header Parameters

TENANT*string

Tenant identifier (sponsor bank) provisioned during onboarding

Request Body

application/json

publicKey*string

Client ECDH public key in uncompressed hex format (P-256 / secp256r1 curve). Uncompressed keys are 65 bytes (130 hex chars) and begin with 04.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://secure.yappay.in/Yappay/business-entity-manager/pairPublicKey" \  -H "TENANT: TENANT_NAME" \  -H "Content-Type: application/json" \  -d '{    "publicKey": "04605a53e4d1a8c6a8b4d3e9f7c2a1b8e5d4f3c2a1b8e5d4f3c2a1b8e5d4f3c2a1b8e5d4f3c2a1b8e5d4f3c2a1b8e5d4f3c2a1b8e5d4f3c2a1b8e5d4"  }'
{
  "result": true,
  "exception": null
}
{
  "result": null,
  "error": {
    "errorCode": "VALIDATION_ERROR",
    "shortMessage": "Invalid request",
    "detailMessage": "recipientPan is required",
    "fieldErrors": [
      "recipientPan: must not be blank"
    ]
  }
}
{
  "result": null,
  "error": {
    "errorCode": "AUTH_FAILED",
    "shortMessage": "Authentication failed",
    "detailMessage": "Invalid credentials"
  }
}
{
  "result": null,
  "error": {
    "errorCode": "INTERNAL_ERROR",
    "shortMessage": "Internal server error",
    "detailMessage": "An unexpected error occurred. Please contact support."
  }
}