Skip to main content
monei.business provides methods to manage business customers under a specific business ID. With this service, you can:
  • Create a business customer
  • Retrieve all business customers
  • Get customer details
  • Update a customer
  • Disable a customer

Create Business Customer

Create a new customer under a specific business.
const businessId = "your-business-id";

const customer = await monei.business.createBusinessCustomer(
  businessId,
  {
    firstName: "John",
    lastName: "Doe",
    email: "john@example.com",
    phoneNumber: "+2348012345678"
  }
);

console.log(customer);

Get Business Customers

Retrieve all customers associated with a business.
const businessId = "your-business-id";

const customers = await monei.business.getBusinessCustomers(
  businessId
);

console.log(customers);

Get Customer Details

Retrieve detailed information about a specific customer.
const businessId = "your-business-id";
const customerId = "customer-id";

const customer = await monei.business.getCustomerDetails(
  businessId,
  customerId
);

console.log(customer);

Update Customer

Update an existing customer’s information.
const businessId = "your-business-id";
const customerId = "customer-id";

const updatedCustomer = await monei.business.updateCustomer(
  businessId,
  customerId,
  {
    firstName: "Jane",
    lastName: "Doe",
    email: "jane@example.com"
  }
);

console.log(updatedCustomer);

Disable Customer

Disable a customer under a business.
const businessId = "your-business-id";
const customerId = "customer-id";

const response = await monei.business.disableCustomer(
  businessId,
  customerId
);

console.log(response);

Notes

  • All methods require a valid business_id
  • A properly configured MoneiClient instance is required
  • Ensure authentication headers are set before making requests