m2pfintech
API LibraryClick To Pay

Register customer and card with Visa Click to Pay

Enroll a customer and their card with the Visa Click to Pay network in a single operation. This is the primary CTP onboarding API.

The operation is asynchronous. On success, a requestTraceId is returned which can be used to poll the operation status via /click-to-pay/v1/fetchRequestStatus.

Prerequisites:

  • Customer must be registered on M2P via v3/register or v4/register
  • Kit must be assigned to the entity
  • CTP must be enabled for the tenant (BUSINESSCUSTOMFIELD click.to.pay.enable)
  • Explicit cardholder consent must be obtained

Validations performed:

  1. entityId must be present and non-null
  2. kitNo must be present and non-null
  3. Entity must exist as a registered BusinessEntity
  4. Customer status must be ACTIVE
  5. Kit must be assigned to the entity
  6. CTP must be enabled for the tenant

When CTP is enabled with ALL scope (Y|ALL in business custom fields), registration is also triggered automatically during customer registration via v3/register and v4/register.

POST
/Yappay/click-to-pay/v1/registerEntityAndKit

Authorization

BearerAuth TenantHeader
AuthorizationBearer <token>

JWT Bearer token obtained from the /auth/login endpoint

In: header

TENANT<token>

Tenant identifier provided by M2P (e.g. ENBDTABBY)

In: header

Request Body

application/json

entityId*string

Unique entity identifier (customer ID from M2P registration)

kitNo?string

Kit number of the card to enroll or remove. Required for registerEntityAndKit, addKit, and removeKit.

consent?

Cardholder consent details required by Visa for Click to Pay enrollment.

Response Body

application/json

application/json

curl -X POST "https://api.m2p.com/Yappay/click-to-pay/v1/registerEntityAndKit" \  -H "Content-Type: application/json" \  -d '{    "entityId": "70752df2-8d98-4a0b-9a43-ed1e8f39d649",    "kitNo": "100000011561",    "consent": {      "version": "1.0",      "presenter": "ENDTABBY",      "timeOfConsent": "2026-07-19T10:23:39.930Z"    }  }'
{
  "result": {
    "tenant": "ENBDTABBY",
    "entityId": "70752df2-8d98-4a0b-9a43-ed1e8f39d649",
    "requestTraceId": "351562ba-83cf-11ee-b962-0242ac120002",
    "event": "CTP_REGISTER_ENTITY_AND_KIT"
  },
  "exception": null,
  "pagination": null
}

{
  "result": null,
  "exception": {
    "detailMessage": "Not a registered Customer",
    "shortMessage": "Not a registered Customer",
    "errorCode": "Y109",
    "languageCode": "en"
  },
  "pagination": null
}