Creates billing portal sessions.
More...
#include <Client.h>
Creates billing portal sessions.
Reach an instance through StripeClient::billing_portal(). The billing portal is a Stripe-hosted page where customers update their card, download invoices, and cancel — which saves building any of that.
- See also
- https://docs.stripe.com/api/customer_portal/sessions
Definition at line 373 of file Client.h.
◆ CreateCompletion
Completion callback for the callback form of create().
Definition at line 376 of file Client.h.
◆ ~BillingPortalSessions()
| virtual stripekit::BillingPortalSessions::~BillingPortalSessions |
( |
| ) |
|
|
virtualdefault |
Destroys the API instance.
◆ create_async()
Creates a billing portal session.
Sessions are short-lived, so create one per visit rather than storing the URL.
- Parameters
-
| request | The customer to create the session for, and where to return them afterwards. |
| options | Per-request settings such as a timeout. |
- Returns
- A task producing the session, whose url is where the customer should be sent.
- Exceptions
-
| StripeApiException | Stripe rejected the request. A common cause is the billing portal not yet being configured in the dashboard. |
◆ create()
Creates a billing portal session, reporting the result through a callback.
The callback is invoked exactly once, and may run on a different thread than the caller.
- Parameters
-
| request | The customer to create the session for, and where to return them afterwards. |
| options | Per-request settings such as a timeout. |
| completion | Receives the created session or the failure. |
The documentation for this class was generated from the following file: