Verification Sessions#

A Verification Session represents a verification flow where a tenant connects bank accounts, uploads documents, or authorizes data access. Each session can include multiple verification products.

The Verification Session object#

AttributeTypeDescription
idstringUnique identifier with vs_ prefix
objectstringAlways "verification_session"
statusenumOne of created, pending, processing, completed, expired, failed
applicantobjectApplicant details: first_name, last_name, email, date_of_birth, phone, address
productsarrayChecks to run: identity, income, credit, cash_flow, documents
redirect_urlstringWhere to send applicant after completion
webhook_urlstringOverride default webhook endpoint
client_secretstringSecret for client-side widget initialization
reportstringID of the generated Verification Report (when completed)
metadatahashSet of key-value pairs for storing additional information
expires_attimestampWhen this session expires (default: 7 days)
createdtimestampTime at which the object was created (Unix timestamp)
livemodebooleanWhether this is a live mode object
{
  "id": "vs_1a2b3c4d5e6f",
  "object": "verification_session",
  "status": "completed",
  "applicant": {
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane.doe@example.com",
    "date_of_birth": "1990-05-15",
    "phone": "+44 7700 900123",
    "address": {
      "line1": "123 High Street",
      "city": "London",
      "postal_code": "SW1A 1AA",
      "country": "GB"
    }
  },
  "products": ["identity", "income", "credit", "cash_flow"],
  "redirect_url": "https://your-app.com/verification/complete",
  "client_secret": "vs_secret_abc123def456",
  "report": "vr_9z8y7x6w5v",
  "metadata": {
    "property_id": "prop_456",
    "unit": "4B"
  },
  "expires_at": 1706745600,
  "created": 1706140800,
  "livemode": false
}

Create a Verification Session#

Creates a new verification session for a tenant applicant.

POST /v1/verification_sessions

Parameters#

ParameterTypeRequiredDescription
applicantobjectYesApplicant details
applicant.first_namestringYesApplicant's first name
applicant.last_namestringYesApplicant's last name
applicant.emailstringYesApplicant's email address
applicant.date_of_birthstringNoDate of birth (YYYY-MM-DD)
applicant.phonestringNoPhone number in E.164 format
applicant.addressobjectNoApplicant's address
productsarrayYesVerification products to run
redirect_urlstringNoURL to redirect after completion
webhook_urlstringNoOverride webhook endpoint
metadatahashNoKey-value pairs

Returns#

Returns the Verification Session object.

curl https://api.casapay.com/v1/verification_sessions \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{
    "applicant": {
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane.doe@example.com",
      "date_of_birth": "1990-05-15"
    },
    "products": ["identity", "income", "credit", "cash_flow"],
    "redirect_url": "https://your-app.com/verification/complete"
  }'
{
  "id": "vs_1a2b3c4d5e6f",
  "object": "verification_session",
  "status": "created",
  "client_secret": "vs_secret_abc123def456",
  "redirect_url": "https://verify.casapay.com/session/vs_1a2b3c4d5e6f",
  "created": 1706140800
}

Retrieve a Verification Session#

Retrieves the details of an existing verification session.

GET /v1/verification_sessions/:id

Parameters#

ParameterTypeRequiredDescription
idstringYesThe ID of the verification session
curl https://api.casapay.com/v1/verification_sessions/vs_1a2b3c4d5e6f \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

List Verification Sessions#

Returns a list of verification sessions. Sessions are returned sorted by creation date, with the most recent first.

GET /v1/verification_sessions

Parameters#

ParameterTypeRequiredDescription
statusstringNoFilter by status
applicant_emailstringNoFilter by applicant email
limitintegerNoNumber of objects to return (1–100, default 10)
starting_afterstringNoCursor for forward pagination
ending_beforestringNoCursor for backward pagination
curl https://api.casapay.com/v1/verification_sessions?status=completed&limit=5 \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"
{
  "object": "list",
  "data": [
    {
      "id": "vs_1a2b3c4d5e6f",
      "object": "verification_session",
      "status": "completed",
      "applicant": { "first_name": "Jane", "last_name": "Doe" },
      "created": 1706140800
    }
  ],
  "has_more": false,
  "url": "/v1/verification_sessions"
}

Cancel a Verification Session#

Cancels a verification session that has not yet completed.

POST /v1/verification_sessions/:id/cancel

Parameters#

ParameterTypeRequiredDescription
idstringYesThe ID of the verification session
cancellation_reasonstringNoReason for cancellation
curl -X POST https://api.casapay.com/v1/verification_sessions/vs_1a2b3c4d5e6f/cancel \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"cancellation_reason": "applicant_withdrawn"}'
{
  "id": "vs_1a2b3c4d5e6f",
  "object": "verification_session",
  "status": "canceled",
  "created": 1706140800
}