m2pfintech
API LibraryClick To Pay

Poll status of an async CTP operation

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)
POST
/Yappay/click-to-pay/v1/fetchRequestStatus

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

requestTraceId*string

The requestTraceId from a previous CTP API response

Response Body

application/json

application/json

curl -X POST "https://api.m2p.com/Yappay/click-to-pay/v1/fetchRequestStatus" \  -H "Content-Type: application/json" \  -d '{    "requestTraceId": "351562ba-83cf-11ee-b962-0242ac120002"  }'

{
  "result": {
    "status": "SUCCESS",
    "event": "CTP_REGISTER_ENTITY_AND_KIT",
    "tenant": "ENDTABBY",
    "entityId": "70752df2-8d98-4a0b-9a43-ed1e8f39d649",
    "errorDetails": null,
    "clickToPayCustomerId": "86e9d8c0-8581-4e5c-b5cb-77a856da0b3d",
    "clickToPayPaymentInstrumentId": "86e9d8c0-8581-4e5c-b5cb-77a856da0b3d",
    "requestTraceId": "351562ba-83cf-11ee-b962-0242ac120002"
  },
  "exception": null,
  "pagination": null
}

{
  "result": null,
  "exception": {
    "detailMessage": "Request Trace ID Not Found",
    "shortMessage": "Request Trace ID Not Found"
  },
  "pagination": null
}