Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 727 Bytes

File metadata and controls

27 lines (18 loc) · 727 Bytes

create

Create a Customer Session

Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.

API Endpoint: POST /v1/customer_sessions

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.customer_session.create(components={}, customer="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer_session.create(components={}, customer="string")