• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / 6471862601

10 Oct 2023 04:02PM UTC coverage: 69.665% (-0.5%) from 70.141%
6471862601

push

github

web-flow
Merge pull request #1570 from localheinz/feature/coveralls

Enhancement: Use `coverallsapp/github-action` to report code coverage

2393 of 3435 relevant lines covered (69.67%)

3.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/Identity/VerificationSession.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Identity;
6

7
/**
8
 * A VerificationSession guides you through the process of collecting and verifying the identities
9
 * of your users. It contains details about the type of verification, such as what <a href="/docs/identity/verification-checks">verification
10
 * check</a> to perform. Only create one VerificationSession for
11
 * each verification in your system.
12
 *
13
 * A VerificationSession transitions through <a href="/docs/identity/how-sessions-work">multiple
14
 * statuses</a> throughout its lifetime as it progresses through
15
 * the verification flow. The VerificationSession contains the user's verified data after
16
 * verification checks are complete.
17
 *
18
 * Related guide: <a href="https://stripe.com/docs/identity/verification-sessions">The Verification Sessions API</a>
19
 *
20
 * @property string $id Unique identifier for the object.
21
 * @property string $object String representing the object's type. Objects of the same type share the same value.
22
 * @property null|string $client_secret The short-lived client secret used by Stripe.js to <a href="https://stripe.com/docs/js/identity/modal">show a verification modal</a> inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on <a href="https://stripe.com/docs/identity/verification-sessions#client-secret">passing the client secret to the frontend</a> to learn more.
23
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
24
 * @property null|\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification.
25
 * @property null|string|\Stripe\Identity\VerificationReport $last_verification_report ID of the most recent VerificationReport. <a href="https://stripe.com/docs/identity/verification-sessions#results">Learn more about accessing detailed verification results.</a>
26
 * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
27
 * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
28
 * @property null|\Stripe\StripeObject $options A set of options for the session’s verification checks.
29
 * @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
30
 * @property string $status Status of this VerificationSession. <a href="https://stripe.com/docs/identity/how-sessions-work">Learn more about the lifecycle of sessions</a>.
31
 * @property null|string $type The type of <a href="https://stripe.com/docs/identity/verification-checks">verification check</a> to be performed.
32
 * @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on <a href="https://stripe.com/docs/identity/verify-identity-documents?platform=web&amp;type=redirect">verifying identity documents</a> to learn how to redirect users to Stripe.
33
 * @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
34
 */
35
class VerificationSession extends \Stripe\ApiResource
36
{
37
    const OBJECT_NAME = 'identity.verification_session';
38

39
    use \Stripe\ApiOperations\All;
40
    use \Stripe\ApiOperations\Create;
41
    use \Stripe\ApiOperations\Retrieve;
42
    use \Stripe\ApiOperations\Update;
43

44
    const STATUS_CANCELED = 'canceled';
45
    const STATUS_PROCESSING = 'processing';
46
    const STATUS_REQUIRES_INPUT = 'requires_input';
47
    const STATUS_VERIFIED = 'verified';
48

49
    const TYPE_DOCUMENT = 'document';
50
    const TYPE_ID_NUMBER = 'id_number';
51

52
    /**
53
     * @param null|array $params
54
     * @param null|array|string $opts
55
     *
56
     * @throws \Stripe\Exception\ApiErrorException if the request fails
57
     *
58
     * @return \Stripe\Identity\VerificationSession the canceled verification session
59
     */
60
    public function cancel($params = null, $opts = null)
×
61
    {
62
        $url = $this->instanceUrl() . '/cancel';
×
63
        list($response, $opts) = $this->_request('post', $url, $params, $opts);
×
64
        $this->refreshFrom($response, $opts);
×
65

66
        return $this;
×
67
    }
68

69
    /**
70
     * @param null|array $params
71
     * @param null|array|string $opts
72
     *
73
     * @throws \Stripe\Exception\ApiErrorException if the request fails
74
     *
75
     * @return \Stripe\Identity\VerificationSession the redacted verification session
76
     */
77
    public function redact($params = null, $opts = null)
×
78
    {
79
        $url = $this->instanceUrl() . '/redact';
×
80
        list($response, $opts) = $this->_request('post', $url, $params, $opts);
×
81
        $this->refreshFrom($response, $opts);
×
82

83
        return $this;
×
84
    }
85
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc