Skip to main content

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

await pepay.paymentSessions.setCustomerEmail({ email: '[email protected]' });

Get customer email

const email = await pepay.paymentSessions.getCustomerEmail();

Response

Example get response:
{
  "email": "[email protected]",
  "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)