> ## 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 customer email within a session.

## Overview

These endpoints store a customer email address in the payment session context (useful for receipts, order updates, or merchant support workflows).

## Authentication

Requires:

* `x-session-token: pst_...`
* `x-signature: sig_...`

## Request

Endpoints:

* `POST /api/v1/payments/customer-email`
* `GET /api/v1/payments/customer-email`

Example (set email):

```bash theme={null}
BASE_URL=${PEPAY_API_URL}

curl -X POST "$BASE_URL/api/v1/payments/customer-email" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..." \
  -H "Content-Type: application/json" \
  -d '{"email":"customer@example.com"}'
```

## Response

Example (set):

```json theme={null}
{
  "success": true,
  "email": "customer@example.com",
  "message": "Email added successfully"
}
```

## Errors

* `401` invalid session token/signature
* `400` invalid email address or invoice already paid
* `410` invoice expired

## Examples

Example (get email):

```bash theme={null}
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/payments/customer-email" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..."
```

Next: [Invoice questions](/api-spec/payors/invoice-questions)
