Skip to main content
Customers are people who have completed orders through your moneydevkit checkout. The customers page helps you manage customer relationships, issue refunds, and track purchase history.

What are Customers?

Customers let you collect information on people who complete orders so you can:
  • Contact them later - Reach out for support, updates, or marketing
  • Issue refunds - Process refunds to their refund address
  • Track purchases - View their complete order history

Customers Dashboard

The customers page in your moneydevkit dashboard displays:
  • Customer list - All customers with name and email
  • Search - Find customers by name or email
  • Customer details - View individual customer information and order history

Customer Information

Each customer record includes:
  • Name - Customer’s name (if provided)
  • Email - Customer’s email address
  • Refund Address - Lightning address for processing refunds
  • Order Count - Number of completed orders
  • Checkout Count - Number of checkout sessions
  • Order History - List of recent orders with amounts and dates

Collecting Customer Information

Customer information can be collected in two ways: by passing it programmatically when creating a checkout, or by requiring customers to fill out a form during checkout.

Option 1: Pass Customer Data Directly

If you already know the customer’s information (e.g., from your authentication system), pass it when creating the checkout:
navigate({
  title: 'Product Name',
  amount: 500,
  currency: 'USD',
  successUrl: '/checkout/success',
  customer: {
    email: '[email protected]',
    name: 'Jane Doe',
    externalId: 'user-123' // Your system's user ID
  }
})

Option 2: Require Customer Data Entry

Use requireCustomerData to display a form that collects customer information before payment. This is useful when you don’t have the customer’s details upfront:
navigate({
  title: 'Product Name',
  amount: 500,
  currency: 'USD',
  successUrl: '/checkout/success',
  requireCustomerData: ['email', 'name']
})
The checkout will display a form requiring the specified fields before the customer can proceed to payment.

Available Fields

FieldDescription
emailCustomer’s email address
nameCustomer’s full name
Custom fieldsAny additional field name (e.g., 'company', 'phone')

Combining Both Approaches

You can combine pre-filled data with required fields. The form will only show fields that aren’t already provided:
navigate({
  title: 'Product Name',
  amount: 500,
  currency: 'USD',
  successUrl: '/checkout/success',
  customer: {
    externalId: 'user-123', // Known from your auth system
    name: 'Jane Doe'        // Already known
  },
  requireCustomerData: ['email', 'name', 'company']
  // Form will only ask for email and company since name is already provided
})
If you pass an externalId for an existing customer, moneydevkit will automatically backfill any fields they’ve previously provided. This means returning customers may not need to fill out the form at all.

Customer Matching

Customers are matched and deduplicated using:
  1. External ID - If you provide an externalId, existing customers with that ID are updated
  2. Email - If no external ID match, customers are matched by email
This ensures you don’t create duplicate customer records when the same person makes multiple purchases.

Managing Customers

Editing Customers

Click the edit button to update customer information:
  • Name
  • Email
  • Refund address
  • Custom metadata

Refunds

To issue a refund:
  1. Find the customer in the customers list
  2. View their order history
  3. Use the refund address to send funds back
Refunds are processed manually by sending to the customer’s refund address. Ensure the refund address is valid before sending funds.

Customer Metadata

You can store additional information in customer metadata:
navigate({
  // ...
  customer: {
    email: '[email protected]',
    name: 'Jane Doe',
    // Custom fields are stored in userMetadata
    shippingAddress: '123 Main St',
    phoneNumber: '+1-555-0123'
  }
})
Custom fields beyond name, email, and externalId are stored in the customer’s metadata and visible in the dashboard.