@cosmosapp/pay_sdkDefinicionesServidor

CustomerManager

Manages customers — client.customers. Reference for the CustomerManager class of @cosmosapp/pay_sdk: its members and their signatures.

Manages customers — client.customers.

Methods

create()

Create a customer.

create(options: CreateCustomerOptions): Promise<Customer>

Parameters

  • options: CreateCustomerOptions

Returns Promise<Customer>

list()

List the consumer's customers (with payment stats).

list(): Promise<Customer[]>

Returns Promise<Customer[]>

fetch()

Get a customer by id.

fetch(id: string): Promise<Customer>

Parameters

  • id: string

Returns Promise<Customer>

update()

Update a customer.

update(id: string, options: UpdateCustomerOptions): Promise<Customer>

Parameters

  • id: string
  • options: UpdateCustomerOptions

Returns Promise<Customer>

delete()

Delete a customer.

delete(id: string): Promise<CustomerDeletedData>

Parameters

  • id: string

Returns Promise<CustomerDeletedData>

addWallet()

Add a wallet to a customer, on Stellar, Solana or Monad (up to 20 per customer); payments paid from it count toward the customer. A wallet the customer already holds answers as it is; one another of your customers holds is 409 customer_wallet_taken.

addWallet(customerId: string, options: AddCustomerWalletOptions): Promise<CustomerWalletData>

Parameters

  • customerId: string
  • options: AddCustomerWalletOptions

Returns Promise<CustomerWalletData>

removeWallet()

Remove a wallet from a customer. Payments from that address stop counting toward it, and a later settled payment from it adds it as a new automatic customer. A walletId that is not one of this customer's wallets is 404.

removeWallet(customerId: string, walletId: string): Promise<CustomerWalletDeletedData>

Parameters

  • customerId: string
  • walletId: string

Returns Promise<CustomerWalletDeletedData>

En esta página