Swipelux
Customer Management

Update customer base data

Update customer profile information including name, email, phone

Available Fields

Personal Information

  • firstName - Customer's first name
  • lastName - Customer's last name

Contact Information

  • email - Email address for notifications and communication
  • phone - Phone number in international format (e.g., +1234567890)

Address Information

  • address - Street address
  • city - City name
  • state - State or province
  • postalCode - Postal or ZIP code
  • country - ISO country code (e.g., "US", "CA")

Field Validation

  • Email: Must be valid email format
  • Phone: International format with country code
  • Names: No special characters, reasonable length limits
  • Country: Must be valid ISO 3166-1 alpha-2 code
  • All fields are optional - update only what you need

Common Use Cases

Progressive Enhancement

// Start with empty customer (core flow)
const customer = await createCustomer({});
 
// Later, add profile data when user provides it
const enhancedCustomer = await updateCustomer(customer.id, {
  firstName: "John",
  lastName: "Doe",
  email: "john@example.com"
});

Communication Setup

// Add email for transfer notifications
await updateCustomer(customerId, {
  email: "user@example.com"
});
 
// Now you can send personalized emails
await sendTransferConfirmation(customer.email, transfer);