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
GetSession
Section titled “GetSession”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);GetSessionAsync
Section titled “GetSessionAsync”Gets a Stripe session asynchronously
Parameters:
| Name | Detail |
|---|---|
| id | Id of the Stripe Session |
Task<Session> GetSessionAsync(string id);CreateSession
Section titled “CreateSession”Creates a Stripe session
Parameters:
| Name | Detail |
|---|---|
| basket | The basket to be stored in the Stripe Session |
Session CreateSession(Basket basket);CreateSessionAsync
Section titled “CreateSessionAsync”Creates a Stripe session asynchronously
Parameters:
| Name | Detail |
|---|---|
| basket | The basket to be stored in the Stripe Session |
Task<Session> CreateSessionAsync(Basket basket);ClearSession
Section titled “ClearSession”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);ClearSessionAsync
Section titled “ClearSessionAsync”Clears the Stripe session asynchronously
Parameters:
| Name | Detail |
|---|---|
| id | Id of the Stripe Session |
Task ClearSessionAsync(string id);