Skip to content

Latest commit

 

History

History
194 lines (130 loc) · 5.7 KB

File metadata and controls

194 lines (130 loc) · 5.7 KB

list

List VerificationSessions

Returns a list of VerificationSessions

API Endpoint: GET /v1/identity/verification_sessions

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.identity.verification_session.list()

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.identity.verification_session.list()

get

Retrieve a VerificationSession

Retrieves the details of a VerificationSession that was previously created.

When the session status is requires_input, you can use this method to retrieve a valid client_secret or url to allow re-submission.

API Endpoint: GET /v1/identity/verification_sessions/{session}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.identity.verification_session.get(session="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.identity.verification_session.get(session="string")

create

Create a VerificationSession

Creates a VerificationSession object.

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

Related guide: Verify your users’ identity documents

API Endpoint: POST /v1/identity/verification_sessions

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.identity.verification_session.create()

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.identity.verification_session.create()

update

Update a VerificationSession

Updates a VerificationSession object.

When the session status is requires_input, you can use this method to update the verification check and options.

API Endpoint: POST /v1/identity/verification_sessions/{session}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.identity.verification_session.update(session="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.identity.verification_session.update(session="string")

cancel

Cancel a VerificationSession

A VerificationSession object can be canceled when it is in requires_input status.

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

API Endpoint: POST /v1/identity/verification_sessions/{session}/cancel

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.identity.verification_session.cancel(session="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.identity.verification_session.cancel(session="string")

redact

Redact a VerificationSession

Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

Learn more.

API Endpoint: POST /v1/identity/verification_sessions/{session}/redact

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.identity.verification_session.redact(session="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.identity.verification_session.redact(session="string")