Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 3.39 KB

File metadata and controls

63 lines (42 loc) · 3.39 KB

CustomerSessions

Overview

Available Operations

  • create - Create Customer Session

create

Create a customer session.

For organizations with member_model_enabled, this will automatically create a member session for the owner member of the customer.

Scopes: customer_sessions:write

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Polar;
use Polar\Models\Components;

$sdk = Polar\Polar::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();

$request = new Components\CustomerSessionCustomerExternalIDCreate(
    externalCustomerId: '<id>',
);

$response = $sdk->customerSessions->create(
    request: $request
);

if ($response->customerSession !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Components\CustomerSessionCustomerIDCreate|Components\CustomerSessionCustomerExternalIDCreate ✔️ The request object to use for the request.

Response

?Operations\CustomerSessionsCreateResponse

Errors

Error Type Status Code Content Type
Errors\HTTPValidationError 422 application/json
Errors\APIException 4XX, 5XX */*