> ## Documentation Index
> Fetch the complete documentation index at: https://docs-alpha.pepay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer email

> Set and retrieve the customer email for a payor session.

## Overview

Store a customer email address in the payment session context (for example, receipts or post-payment notifications).

## Authentication

Requires `x-session-token` + `x-signature`.

## Request

### Set customer email

```ts theme={null}
await pepay.paymentSessions.setCustomerEmail({ email: 'customer@example.com' });
```

### Get customer email

```ts theme={null}
const email = await pepay.paymentSessions.getCustomerEmail();
```

## Response

Example get response:

```json theme={null}
{
  "email": "customer@example.com",
  "has_email": true
}
```

## Errors

* `400` invalid email format
* `401` invalid session token/signature

## Examples

* If you render checkout in multiple steps, set the email once and retrieve it later to prefill forms.

Next: [WebSockets (payor)](/sdk/payors/websockets)
