Skip to content

Prefill customer details

If you already have the customer’s name and email, pass them when you create the payment. The Stack sheet prefills the details step. The shopper can pay without creating or signing in to a Stack account first.

const intent = await stack.paymentIntents.create({
amount: 250_000,
currency: 'NGN',
customer: { email: user.email, first_name: user.firstName, last_name: user.lastName },
});
  • These details are not identity verification. Passing them does not sign the customer in or verify their Stack identity.
  • Guests can enter them themselves. If details are missing, the sheet asks for first name, last name and email before showing payment methods.
  • Identity setup is optional and happens after payment. A successful payment stays successful if the customer skips setup.
  • Receipts. Stack sends a receipt to the checkout email after payment is confirmed.
  • Server only. Set it when your server creates the payment. It can’t be set from an app.

The details are stored with the payment. After a successful guest payment, Stack records them as a provisional identity that can be claimed after email verification. A customer.phone may also be passed for payment contact information.