English
Services
Events

Events

The iframe emits (via postMessage) to the host:

  • stepUpdate: { type: "stepUpdate", step: number }
  • processCompleted: { type: "processCompleted", status: "approved"|"rejected"|"pending", reason?: string }

Use eventHandler to observe:

const sdk = PixFace({
  ...,
  eventHandler: (evt) => {
    if (evt.type === "stepUpdate") {
      console.log("Step:", evt.step);
    }
    if (evt.type === "processCompleted") {
      console.log("Status:", evt.status, evt.reason);
    }
  },
});

The SDK also calls onSuccess(name, data) and onError(name, data) for generic success/error events when applicable.