PixFace IFrame
PixFace offers a simple integration via iframe, allowing you to embed the complete KYC verification flow directly into your web application.
Implementation
Onboarding
To use the iframe for the onboarding process, add the code below to your page, replacing <ONBOARDING_ID> with the onboarding ID obtained through:
- Dashboard PixFace
- PixFace SDK
- REST API
<iframe
src="https://kyc.pixtopay.com/?guid=<ONBOARDING_ID>"
onMessage={(event) => {
if (event.data.type === "stepUpdate") {
console.log("Etapa:", event.data.step);
}
}}
/>
</iframe>Liveness
To use the iframe for the liveness process, the procedure is similar to onboarding, with the difference that the /verify path is used:
<iframe
src="https://kyc.pixtopay.com/verify?guid=<ONBOARDING_ID>"
onMessage={(event) => {
if (event.data.type === "stepUpdate") {
console.log("Etapa:", event.data.step);
}
}}
/>
</iframe>Event Capture
The iframe communicates events to the host through the onMessage attribute. You can capture different event types as shown in the example above.
Available Events
stepUpdate
Emitted when the user advances to a new step in the process.
{
type: "stepUpdate",
step: number
}processCompleted
Emitted when the verification process is completed.
{
type: "processCompleted",
status: "approved" | "rejected" | "pending",
reason?: string
}Possible statuses:
approved: Verification approvedrejected: Verification rejectedpending: Verification under manual review
The reason field is optional and provides additional details when applicable.