Skip to main content
PayGlocal provides two channels for partners to track merchant onboarding progress:
ChannelDeliveryBest for
UI Events (postMessage)Browser → parent pageReal-time UX updates while the iFrame is open
WebhooksServer → your endpointReliable async notifications for backend workflows
Always confirm the final onboarding state with a server-side Get Onboarding Status call. Neither UI events nor webhooks alone should be treated as the source of truth for go-live decisions.

UI Events (iFrame postMessage)

When you embed the PayGlocal verification iFrame, the verification page communicates with your parent page using the browser’s postMessage API.

Listening for completion

window.addEventListener("message", (event) => {
  const allowedOrigins = [
    "https://uat.dashboard.payglocal.in",
    "https://dashboard.payglocal.in"
  ];
  if (!allowedOrigins.includes(event.origin)) return;

  console.log("Message received:", event.data);

  if (event.data === "PARTNER_MERCHANT_VERIFICATION_COMPLETE") {
    console.log("Onboarding verification completed!");
    // Trigger server-side GET /status to confirm final state
  }
});
Event valueMeaning
PARTNER_MERCHANT_VERIFICATION_COMPLETEMerchant has finished the full verification flow (T&C, DigiLocker, VKYC)
During intermediate steps, the iFrame may also emit structured events:
{
  eventName: "PARTNER_MERCHANT_VERIFICATION_REDIRECT",
  eventData: {
    uri: "https://...",
    stepName: "DIGILOCKER",
    subStepId: "CONSENT_PROCEED"
  }
}

Best practices

  • Validate event.origin — only accept messages from https://uat.dashboard.payglocal.in (UAT) or https://dashboard.payglocal.in (Production). The iFrame loads the PayGlocal dashboard partner onboarding experience, not a separate verify subdomain.
  • Follow with GET /status — the postMessage signals UI completion; confirm vkyc, digiLocker, and onboardingStatus server-side before updating your merchant record.
  • See iFrame Integration for the full embed workflow.

Webhook Events

PayGlocal sends server-side webhook notifications to URLs configured in your PayGlocal Partner Dashboard. Webhooks fire for partner-assisted merchant onboardings only. Configure which events you receive via POST /gcc/v2/partner/{resellerMid}/webhook. List available event types with GET /gcc/v2/partner/webhook.

Supported events

EventWhen firedDescription
MERCHANT_DIGILOCKER_CKYC_COMPLETEDDigiLocker or CKYC verification completesIdentity verification step finished
MERCHANT_TERMS_AND_CONDITIONS_ACKNOWLEDGEDMerchant accepts T&CTerms and conditions acknowledged
MERCHANT_VKYC_COMPLETEDVKYC session completesVideo KYC finished
MERCHANT_STATUS_ACCEPTEDMerchant is activatedOnboarding approved and merchant goes live
MERCHANT_PENDENCY_STATUS_UPDATEDPendency status changesDocument or compliance pendency updated
System-created pendencies with status UNDER_REVIEW are not sent to partners. Only partner-visible pendency updates trigger this webhook.

Webhook Payload Structure

All onboarding webhook payloads are flat key-value maps (Map<String, String>).

Common fields (all events)

FieldTypeDescription
onboarding_idstringPayGlocal onboarding ID
onboarding_statusstringCurrent NewOnboardingStatus value
event_timestampstringUnix epoch milliseconds when the event was generated
statusstringEvent type name (matches the event enum)

Event-specific fields

MERCHANT_STATUS_ACCEPTED
FieldDescription
merchant_idActivated merchant ID (UCIC)
event_timestampGo-live timestamp (overwritten with go-live time)
MERCHANT_TERMS_AND_CONDITIONS_ACKNOWLEDGED
FieldDescription
terms_and_conditions_acknowledged"true"
MERCHANT_VKYC_COMPLETED
FieldDescription
vkyc_completed"true"
MERCHANT_DIGILOCKER_CKYC_COMPLETED
FieldDescription
digilocker_ckyc_completed"true"
MERCHANT_PENDENCY_STATUS_UPDATED
FieldDescription
pendency_info_categoryPendency category
pendency_info_sub_categoryPendency sub-category
pendency_info_reasonReason for the pendency
pendency_info_statusCurrent pendency status
pendency_info_creation_timeWhen the pendency was created
pendency_info_cards_approval_blocking"true" / "false" — blocks card approval
pendency_info_mca_approval_blocking"true" / "false" — blocks MCA approval

Example payload — VKYC completed

{
  "onboarding_id": "pg_onboard_abc123",
  "onboarding_status": "UNDER_REVIEW",
  "event_timestamp": "1717238400000",
  "status": "MERCHANT_VKYC_COMPLETED",
  "vkyc_completed": "true"
}

Example payload — Merchant accepted

{
  "onboarding_id": "pg_onboard_abc123",
  "onboarding_status": "ACCEPTED",
  "event_timestamp": "1717324800000",
  "status": "MERCHANT_STATUS_ACCEPTED",
  "merchant_id": "merchant_xyz789"
}

1. Partner completes onboard API steps (business details → products)
2. Partner calls GET Verification Redirect → embeds iFrame
3. Parent page listens for PARTNER_MERCHANT_VERIFICATION_COMPLETE postMessage
4. Partner backend receives webhook events asynchronously
5. Partner backend calls GET /status to confirm final state
6. Partner updates merchant record in their system

iFrame Integration

Embed the verification flow and handle postMessage events.

Get Onboarding Status

Confirm final merchant state server-side.

API Flow Overview

End-to-end onboarding sequence.