const { result, error } = await unprice.realtime.createTicket({
customerId: "cus_1234567890"
});
if (error) {
console.error(error.message);
return;
}
console.log(result);
{
"ticket": "rt_...",
"expiresAt": 1778240000000,
"projectId": "project_1234567890",
"customerId": "cus_1234567890"
}
Request
The customer ID to scope realtime access.
Optional project ID. Only main-project keys can request another project.