m2pfintech
API LibraryClick To Pay

Add a card to an existing CTP enrollment

Enroll an additional card/kit for a customer who is already registered on Click to Pay. The entity must already have an ACTIVE CTP registration.

The operation is asynchronous. Use the returned requestTraceId to poll status.

Validations:

  1. Entity must already be registered on CTP (CTPCustomer record must exist)
  2. Entity CTP status must be ACTIVE
  3. Kit must be assigned to the entity
  4. Kit must not already be enrolled in CTP
POST
/Yappay/click-to-pay/v1/addKit

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

Entity identifier of the already CTP-registered customer

kitNo*string

Kit number of the additional card to enroll

Response Body

application/json

application/json

curl -X POST "https://api.m2p.com/Yappay/click-to-pay/v1/addKit" \  -H "Content-Type: application/json" \  -d '{    "entityId": "f25a9f38-682b-4094-b6e4-9671d500c49b",    "kitNo": "12346535"  }'
{
  "result": {
    "tenant": "ENBDTABBY",
    "entityId": "f25a9f38-682b-4094-b6e4-9671d500c49b",
    "requestTraceId": "451562ba-83cf-11ee-b962-0242ac120003",
    "event": "CTP_ADD_KIT"
  },
  "exception": null,
  "pagination": null
}
{
  "result": null,
  "exception": {
    "detailMessage": "Not a registered Customer",
    "shortMessage": "Not a registered Customer",
    "errorCode": "Y109",
    "languageCode": "en"
  },
  "pagination": null
}