Class: Stripe::Identity::VerificationSessionService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Identity::VerificationSessionService
- Defined in:
- lib/stripe/services/identity/verification_session_service.rb
Defined Under Namespace
Classes: CancelParams, CreateParams, ListParams, RedactParams, RetrieveParams, UpdateParams
Instance Method Summary collapse
-
#cancel(session, params = {}, opts = {}) ⇒ Object
A VerificationSession object can be canceled when it is in requires_input [status](docs.stripe.com/docs/identity/how-sessions-work).
-
#create(params = {}, opts = {}) ⇒ Object
Creates a VerificationSession object.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of VerificationSessions.
-
#redact(session, params = {}, opts = {}) ⇒ Object
Redact a VerificationSession to remove all collected information from Stripe.
-
#retrieve(session, params = {}, opts = {}) ⇒ Object
Retrieves the details of a VerificationSession that was previously created.
-
#update(session, params = {}, opts = {}) ⇒ Object
Updates a VerificationSession object.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#cancel(session, params = {}, opts = {}) ⇒ Object
A VerificationSession object can be canceled when it is in requires_input [status](docs.stripe.com/docs/identity/how-sessions-work).
Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](docs.stripe.com/docs/identity/verification-sessions#cancel).
265 266 267 268 269 270 271 272 273 |
# File 'lib/stripe/services/identity/verification_session_service.rb', line 265 def cancel(session, params = {}, opts = {}) request( method: :post, path: format("/v1/identity/verification_sessions/%<session>s/cancel", { session: CGI.escape(session) }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
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](docs.stripe.com/docs/identity/verify-identity-documents)
282 283 284 285 286 287 288 289 290 |
# File 'lib/stripe/services/identity/verification_session_service.rb', line 282 def create(params = {}, opts = {}) request( method: :post, path: "/v1/identity/verification_sessions", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of VerificationSessions
293 294 295 296 297 298 299 300 301 |
# File 'lib/stripe/services/identity/verification_session_service.rb', line 293 def list(params = {}, opts = {}) request( method: :get, path: "/v1/identity/verification_sessions", params: params, opts: opts, base_address: :api ) end |
#redact(session, params = {}, opts = {}) ⇒ Object
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](docs.stripe.com/docs/identity/how-sessions-work). 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](docs.stripe.com/docs/identity/verification-sessions#redact).
322 323 324 325 326 327 328 329 330 |
# File 'lib/stripe/services/identity/verification_session_service.rb', line 322 def redact(session, params = {}, opts = {}) request( method: :post, path: format("/v1/identity/verification_sessions/%<session>s/redact", { session: CGI.escape(session) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(session, params = {}, opts = {}) ⇒ Object
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.
336 337 338 339 340 341 342 343 344 |
# File 'lib/stripe/services/identity/verification_session_service.rb', line 336 def retrieve(session, params = {}, opts = {}) request( method: :get, path: format("/v1/identity/verification_sessions/%<session>s", { session: CGI.escape(session) }), params: params, opts: opts, base_address: :api ) end |
#update(session, params = {}, opts = {}) ⇒ Object
Updates a VerificationSession object.
When the session status is requires_input, you can use this method to update the verification check and options.
350 351 352 353 354 355 356 357 358 |
# File 'lib/stripe/services/identity/verification_session_service.rb', line 350 def update(session, params = {}, opts = {}) request( method: :post, path: format("/v1/identity/verification_sessions/%<session>s", { session: CGI.escape(session) }), params: params, opts: opts, base_address: :api ) end |