Skip to main content
POST
https://api-sandbox.pavewaygroup.com/v1
/
sessions
/
create
Customer Sessions
curl --request POST \
  --url https://api-sandbox.pavewaygroup.com/v1/sessions/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_email": "<string>"
}
'
Customer sessions allow you to create a temporary, authenticated context for a customer. This is commonly used to let customers manage their own payment methods or view their billing history in your application without exposing your Secret Keys.

Authentication

Include your Secret Key in the Authorization header as a Bearer token.
Authorization: Bearer sk_test_...

Request Body

customer_email
string
required
The email address of the customer to create a session for.

Response

Returns a session_token which can be used in client-side requests for a limited time (default 30 minutes).
{
  "success": true,
  "message": "Session created successfully",
  "data": {
    "session_token": "cs_AbCdEf...",
    "customer_email": "[email protected]",
    "expires_at": "2024-01-01T12:30:00Z"
  }
}

Validate a Session

Check if a session token is still valid.
POST /v1/sessions/validate
-H "Authorization: Bearer cs_AbCdEf..."

Revoke a Session

Explicitly terminate a session (Logout).
POST /v1/sessions/revoke
-H "Authorization: Bearer cs_AbCdEf..."