m2pfintech
API LibraryClick To Pay

Get CTP profile with enrolled cards and token details

Retrieve the full Click to Pay profile for a customer, including all enrolled cards, CTP status, Visa token details, and payment instrument metadata.

This is a synchronous call that fetches live data from the Visa VTS network via the CTP SaaS layer and also syncs the CTP status back to the local M2P database.

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

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

Response Body

application/json

application/json

curl -X POST "https://api.m2p.com/Yappay/click-to-pay/v1/fetchEntityDetails" \  -H "Content-Type: application/json" \  -d '{    "entityId": "918c3ed3-5cb0-4c2e-a80d-b70e1594de4b"  }'
{
  "result": {
    "entityId": "customer_1",
    "tenant": "TEST_VTS",
    "customerInfo": {
      "emails": [
        "alex123@hotmail.com"
      ],
      "mobileNumber": null,
      "lastName": "Miller",
      "firstName": "Alex",
      "middleName": "Robert",
      "countryCode": "USA",
      "nationalIdentifiers": [
        {
          "type": "PASSPORT",
          "value": "A123456"
        }
      ],
      "consent": {
        "version": "1.0",
        "presenter": "Bank A",
        "timeOfConsent": "2020-05-05T12:12:12.000Z",
        "validTimeOfConsent": true
      },
      "locale": "en_US",
      "ctpStatus": "ACTIVE",
      "ctpExternalConsumerId": "86e9d8c0-8581-4e5c-b5cb-77a856da0b3d"
    },
    "paymentInstrumentInfo": [
      {
        "kitNo": "100000011561",
        "cardNo": "4111111145551140",
        "issuerName": "M2P",
        "nameOnCard": "John Doe",
        "addressInfo": {
          "city": "San Francisco",
          "state": "CA",
          "country": "USA",
          "postalCode": "94105",
          "addressLine1": "1000 Market Street",
          "addressLine2": "Building 56",
          "addressLine3": "Suite 101"
        },
        "expirationDate": "2030-01",
        "ctpStatus": "ACTIVE",
        "ctpPaymentInstrumentId": "86e9d8c0-8581-4e5c-b5cb-77a856da0b3d",
        "tokenDetails": {
          "tokenRequestorID": "1234567890",
          "tokenReferenceID": "hflasdhflsdkfhoin3y038yfwn"
        },
        "panReferenceID": "PANREF123",
        "paymentAccountReference": "PAR456"
      }
    ]
  },
  "exception": null,
  "pagination": null
}

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