Creates and retrieves Stripe customers.
More...
#include <Client.h>
Creates and retrieves Stripe customers.
Reach an instance through StripeClient::customers(). A Stripe customer is the object everything else hangs off, so create one per application user and store the resulting id; do not create a fresh customer per checkout.
- See also
- https://docs.stripe.com/api/customers
Definition at line 149 of file Client.h.
◆ CreateCompletion
Completion callback for the callback form of create().
Definition at line 152 of file Client.h.
◆ RetrieveCompletion
◆ ~Customers()
| virtual stripekit::Customers::~Customers |
( |
| ) |
|
|
virtualdefault |
Destroys the API instance.
◆ create_async()
Creates a customer in Stripe.
- Parameters
-
| request | Details of the customer to create. |
| options | Per-request settings such as an idempotency key. |
- Returns
- A task producing the created customer, including its Stripe id.
- Exceptions
-
◆ create()
Creates a customer, reporting the result through a callback.
Use this in code that is not using coroutines; create_async() is otherwise preferable. The callback is invoked exactly once, and may run on a different thread than the caller.
- Parameters
-
| request | Details of the customer to create. |
| options | Per-request settings such as an idempotency key. |
| completion | Receives the created customer or the failure. |
◆ retrieve_async()
Fetches an existing customer.
- Parameters
-
| customer_id | Stripe customer id, of the form "cus_...". |
| options | Per-request settings such as a timeout. |
- Returns
- A task producing the customer.
- Exceptions
-
◆ retrieve()
Fetches an existing customer, reporting the result through a callback.
The callback is invoked exactly once, and may run on a different thread than the caller.
- Parameters
-
| customer_id | Stripe customer id, of the form "cus_...". |
| options | Per-request settings such as a timeout. |
| completion | Receives the customer or the failure. |
The documentation for this class was generated from the following file: