Skip to main content
POST
/
api
/
public
/
auth
/
checkout-token
curl -X POST "https://api.crovver.com/api/public/auth/checkout-token" \
  -H "x-public-key: pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "externalTenantId": "workspace_123",
    "returnUrl": "https://app.com/dashboard"
  }'
{
  "success": true,
  "data": {
    "token": "eyJhbGciOiJIUzI1NiJ9...",
    "expiresAt": "2025-01-01T00:10:00Z"
  },
  "meta": {
    "checkoutUrl": "https://ecom.crovver.com/pricing?token=eyJhbGci...",
    "expiresIn": 600
  }
}
Creates a signed JWT that the ecom/pricing app uses to identify the tenant during checkout. The React SDK calls this automatically when you invoke redirectToCheckout().

Request Headers

x-public-key
string
required
Your public key (pk_live_...)

Request Body

externalTenantId
string
required
The tenant ID from your application
returnUrl
string
required
URL to return to after checkout completes
requiredFeature
string
Pre-selects a plan that includes this feature on the pricing page
requiredPlan
string
Pre-selects a specific plan ID on the pricing page

Response

data.token
string
Signed JWT (valid for 10 minutes)
data.expiresAt
string
ISO 8601 expiry timestamp
meta.checkoutUrl
string
The full ecom URL with token appended — you can use this directly
curl -X POST "https://api.crovver.com/api/public/auth/checkout-token" \
  -H "x-public-key: pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "externalTenantId": "workspace_123",
    "returnUrl": "https://app.com/dashboard"
  }'
{
  "success": true,
  "data": {
    "token": "eyJhbGciOiJIUzI1NiJ9...",
    "expiresAt": "2025-01-01T00:10:00Z"
  },
  "meta": {
    "checkoutUrl": "https://ecom.crovver.com/pricing?token=eyJhbGci...",
    "expiresIn": 600
  }
}