Skip to main content
Skip to main content

retrieve - Customer Module Reference

This documentation provides a reference to the retrieve method. This belongs to the Customer Module.

This method retrieves a customer by its ID.

Example

A simple example that retrieves a customer by its ID:

const customer = await customerModuleService.retrieve("cus_123")

To specify relations that should be retrieved:

const customer = await customerModuleService.retrieve("cus_123", {
relations: ["groups"],
})

Parameters

customerIdstringRequired
The customer's ID.
The configurations determining how the customer is retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a customer.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CustomerDTO>Required
The retrieved customer.
Was this section helpful?