Skip to content

Stripe Session Service

The Stripe session service is what creates and handles the creation, updating and clearing of the Stripe session.

You can access the Stripe session service by injecting IStripeSessionService which can be found within the namespace UmbCheckout.Stripe.Interfaces

Gets a Stripe session

Parameters:

Name Detail
id Id of the Stripe Session
options Optional: the Stripe objects to expand on the session
Session GetSession(string id, UmbCheckoutSessionGetOptions? options = null);

Gets a Stripe session asynchronously

Parameters:

Name Detail
id Id of the Stripe Session
Task<Session> GetSessionAsync(string id);

Creates a Stripe session

Parameters:

Name Detail
basket The basket to be stored in the Stripe Session
Session CreateSession(Basket basket);

Creates a Stripe session asynchronously

Parameters:

Name Detail
basket The basket to be stored in the Stripe Session
Task<Session> CreateSessionAsync(Basket basket);

Clears (expires) the Stripe session, so it can no longer be paid

Parameters:

Name Detail
id Id of the Stripe Session
void ClearSession(string id);

Clears the Stripe session asynchronously

Parameters:

Name Detail
id Id of the Stripe Session
Task ClearSessionAsync(string id);