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:
- entityId must be present and non-null
- kitNo must be present and non-null
- Entity must exist as a registered BusinessEntity
- Customer status must be ACTIVE
- Kit must be assigned to the entity
- 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.
Authorization
BearerAuth TenantHeader JWT Bearer token obtained from the /auth/login endpoint
In: header
Tenant identifier provided by M2P (e.g. ENBDTABBY)
In: header
Request Body
application/json
Unique entity identifier (customer ID from M2P registration)
Kit number of the card to enroll or remove. Required for registerEntityAndKit, addKit, and removeKit.
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
}Poll status of an async CTP operation POST
Poll the status of an asynchronous CTP operation using the requestTraceId returned from registration or removal APIs. This is a synchronous call that queries the CTP SaaS status endpoint with built-in retry logic (4 attempts with 1-second delay). If the SaaS reports a completed status that has not been processed via webhook yet, the platform automatically processes it and updates local CTP records. Status values: - IN_PROGRESS: Still processing with Visa VTS - SUCCESS: Operation completed successfully - FAILED: Operation failed (check errorDetails for root cause)
Remove customer from Click to Pay POST
Remove a customer and all their enrolled cards from the Visa Click to Pay network. Use this when a cardholder opts out entirely or withdraws consent. The entity and all associated payment instruments transition to REMOVAL_IN_PROGRESS immediately and are set to REMOVED on successful webhook confirmation. Validations: 1. Entity must be registered on CTP 2. Entity CTP status must be ACTIVE
