For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterOpenAPI SpecStatus
OverviewInquiriesTransactionsRelaysAPI ReferenceChangelog
OverviewInquiriesTransactionsRelaysAPI ReferenceChangelog
  • Overview
    • Inquiries Overview
    • Inquiry Model Lifecycle
    • Inquiry Templates
  • Managing inquiries
    • Creating Inquiries
    • Resuming Inquiries
    • Accessing Inquiry status and data
      • Inquiries Best Practices
      • Ensuring user access to Inquiries
      • Prevent users from creating multiple Inquiries
      • Integration Testing
  • Hosted Flow integration
  • Embedded Flow integration
  • Mobile SDK integration
    • Overview
    • Webview
  • Troubleshooting
    • Troubleshooting Steps
    • Troubleshooting Common Issues
LogoLogo
Help CenterOpenAPI SpecStatus
On this page
  • Simulate Actions
  • Inquiry Status
  • Creating Verification with Status
  • Supported Verification types
Managing inquiriesBest practices

Integration Testing

Testing integrations using Sandbox Inquiries
Was this page helpful?
Previous

Hosted Flow Overview

Next
Built with

It may be valuable to programmatically test your various API integrations with the Persona platform. For example, throughout the Inquiry Model Lifecycle, the Inquiry may change status and fire associated Events as your customer progresses through the Inquiry. Similarly, within the Inquiry lifecycle, Verifications may be created and processed through the Verification Lifecycle, also changing status and firing associated events.

You can setup webhooks to notify your service about these events. You may also choose to directly fetch an Inquiry or fetch a Verification at anytime during their respective lifecycles. Your application may be set up to take certain actions based on these Events or on the data contained within the Inquiry or Verification.

After creating a Sandbox Inquiry, the following Simulate Actions can be specified to evoke Inquiry and Verification lifecycle behavior, thereby replicating the necessary conditions required for programmatically testing the behavior of your application.

The relevant endpoint is the Inquiries Perform Simulate Actions endpoint.

Simulate Actions

Inquiry Status

The following actions evoke behavior around the Inquiry lifecycle:

Simulate ActionEffects
start_inquiry
  • Set Inquiry status to pending
  • Fire inquiry.started event
complete_inquiry
  • Set Inquiry status to completed
  • Fire inquiry.completed event
fail_inquiry
  • Set Inquiry status to failed
  • Fire inquiry.failed event
expire_inquiry
  • Set Inquiry status to expired
  • Fire inquiry.expired event
mark_for_review_inquiry
  • Set Inquiry status to needs_review
  • Fire inquiry.marked-for-review event
approve_inquiry
  • Set Inquiry status to approved
  • Fire inquiry.approved event
decline_inquiry
  • Set Inquiry status to declined
  • Fire inquiry.declined event

Creating Verification with Status

The following actions evoke behavior around creating and processing a verification:

Simulate ActionEffects
create_passed_verification
  • Create a Verification with status passed
  • Fire the following events in order:
  • Events specific to the Verification type
  • verification.created
  • verification.submitted
  • verification.passed
create_failed_verification
  • Create a Verification with status failed
  • Fire the following events in order:
  • Events specific to the Verification type
  • verification.created
  • verification.submitted
  • verification.failed

Supported Verification types

The following are the Verification types currently supported, and their associated type-specific events:

Verification TypeType-specific Events
Government IDdocument.created document.submitted document.processed
Documentdocument.created document.submitted document.processed
DatabaseNone
Selfieselfie.created selfie.submitted selfie.processed