(customerSessions)
- create - Create Customer Session
Create a customer session.
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Components;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Polar\Polar::builder()->setSecurity($security)->build();
$request = new Components\CustomerSessionCreate(
customerId: '<value>',
);
$response = $sdk->customerSessions->create(
request: $request
);
if ($response->customerSession !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Components\CustomerSessionCreate | ✔️ | The request object to use for the request. |
?Operations\CustomerSessionsCreateResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\HTTPValidationError | 422 | application/json |
Errors\APIException | 4XX, 5XX | */* |