In order to consume the Shopper's functionality you have to connect the SDK first. You can find more information on how to do that in the Installation section.
LimePay.shoppers.create(shopperData) // returns new Promise<>.then(shopper => {}).catch(error => {});
Where shopperData
is object with the following properties:
Field | Type | Description | Required |
|
| Shopper's first name | Yes |
|
| Shopper's last name | No |
|
| Vendor ID for which the shopper will be created. If not provided, the default organisation's vendor will be used | No |
|
| Shopper's email | Yes |
|
| Whether the shopper will use LimePay Wallets or not. Default value is | No |
|
| Shopper's wallet address | Yes, if |
Returns object of type Shopper.
limePay.Shoppers.Create(shopperData types.Shopper)// returns (*types.Shopper, error)
Where shopperData
is object with the following properties:
Field | Type | Description | Required |
|
| Shopper's first name | Yes |
|
| Shopper's last name | No |
|
| Vendor ID for which the shopper will be created. If not provided, the default organisation's vendor will be used | No |
|
| Shopper's email | Yes |
|
| Whether the shopper will use LimePay Wallets or not. Default value is | No |
|
| Shopper's wallet address | Yes, if |
Returns a pointer to Shopper object and an error.
LimePay.shoppers.update(shopperId, shopperData) // returns new Promise<>.then(shopper => {}).catch(error => {});
Where shopperData
is object with the following properties:
Field | Type | Description | Required |
| string | Shopper's first name | No |
| string | Shopper's last name | No |
| string | Shopper's email | No |
| string | Shopper's wallet address | No |
Returns the updated Shopper.
limePay.Shoppers.Update(shopperID string, shopperData types.Shopper)// returns (*types.Shopper, error)
Where shopperData
is object with the following properties:
Field | Type | Description | Required |
| string | Shopper's first name | No |
| string | Shopper's last name | No |
| string | Shopper's email | No |
| string | Shopper's wallet address | No |
Returns a pointer to Shopper object and an error.
walletAddress cannot be updated if the shopper is using LimePay Wallets
In order to receive Wallet Token for a given shopper, you have to execute the following function:
LimePay.shoppers.getWalletToken('shopperId') // returns new Promise<>.then(result => {}).catch(error => {});
Returns object of type Wallet Token.
limePay.Shoppers.GetWalletToken(shopperID string) // returns (*types.WalletToken, error)
Returns a pointer to Wallet Token object and an error.
Wallet token can be received only for shoppers that use LimePay Wallets.
​