stripe / openapi

An OpenAPI specification for the Stripe API.
MIT License
394 stars 123 forks source link

`POST /v1/ephemeral_keys` is missing the `verification_session` property #101

Closed n-i-k-o-l-a-s closed 1 year ago

n-i-k-o-l-a-s commented 1 year ago

Ephemeral keys can be created for a verification session to support the Stripe Identity Mobile SDKs (which take an ephemeral key instead of a client secret).

Passing a verification session ID in through verification_session is documented within the Stripe Identity docs here: https://stripe.com/docs/identity/verify-identity-documents?platform=react-native&type=new-integration#add-server-endpoint Below is a code snippet pulled from that page showing a verification session ID being passed through.

// Create an ephemeral key for the VerificationSession
const ephemeralKey = await stripe.ephemeralKeys.create(
  {verification_session: verificationSession.id},
  {apiVersion: '2020-08-27'}
);

Currently only customer and issuing_card (and expand) are properties documented within the OpenAPI spec for POST /v1/ephemeral_keys. Since verification_session is missing on the OpenAPI specs, it seems to affect types on the Node Stripe SDK, which causes some confusion as the only place of verification_session being documented as a working and valid parameter for the ephemeral key creation endpoint is in a single page of the Stripe docs.

remi-stripe commented 1 year ago

Hey @n-i-k-o-l-a-s, thanks for the report. Looks like the parameter is supported but undocumented right now for some reason. We're looking into what's causing this and will work on a fix.

pakrym-stripe commented 1 year ago

The verification_session property has been released.