Shoppers

The Shoppers resource is located at `/shoppers` route and requires API Credentials

post
Create Shopper

https://api.limepay.io/v1/shoppers
Creating a Shopper for Vendor
Request
Response
Headers
Authorization
required
string
Authorization through API Credentials
Body Parameters
firstName
required
string
First name of the shopper
lastName
required
string
Last name of the shopper
email
required
string
Shopper's email
vendor
required
string
The id of the vendor
walletAddress
optional
string
Shopper's wallet address. Required only if `useLimePayWallet` is `true`
useLimePayWallet
optional
boolean
Indicated whether the shopper will use LimePay powered Encrypted Wallets. Default is `false`
201: Created
Returns the created shopper:
{
"_id": "5c90d6ba0d7265c9310ae9a4",
"firstName": "John",
"lastName": "Doe",
"email": "john@gmail.com",
"vendor": "5c18dca47dc18d30a1e978f3",
"maliciousAttempts": 0,
"walletAddress": "0xa3796ec8e53402fd4ea9f670a2060e86b4a86572"
"useLimePayWallet": false,
}

patch
Update Shopper

https://api.limepay.io/v1/shoppers/:id
Update Shopper by ID
Request
Response
Path Parameters
id
optional
string
ID of the shopper
Headers
Authorization
required
string
Authorization through API Credentials
Body Parameters
firstName
optional
string
Shopper's first name
lastName
optional
string
Shopper's last name
email
optional
string
Shopper email
walletAddress
optional
string
Shopper's wallet address. Can be updated only if `useLimePayWallet` is `false`
200: OK
Returns the updated shopper:
{
"_id": "5c90d6ba0d7265c9310ae9a4",
"firstName": "John",
"lastName": "Doe",
"email": "john@gmail.com",
"vendor": "5c18dca47dc18d30a1e978f3",
"maliciousAttempts": 0,
"walletAddress": "0xa3796ec8e53402fd4ea9f670a2060e86b4a86572"
"useLimePayWallet": false,
}
404: Not Found
{
"errorName": "NOT_FOUND_ERROR",
"code": 3013,
"message": "Shopper was not found"
}

get
Get Shopper by ID

https://api.limepay.io/v1/shoppers/:id
Gets a Shopper by ID
Request
Response
Path Parameters
id
optional
string
ID of the shopper
Headers
Authorization
required
string
Authorization through API Credentials
200: OK
Returns the created shopper:
{
"_id": "5c90d6ba0d7265c9310ae9a4",
"firstName": "John",
"lastName": "Doe",
"email": "john@gmail.com",
"vendor": "5c18dca47dc18d30a1e978f3",
"maliciousAttempts": 0,
"walletAddress": "0xa3796ec8e53402fd4ea9f670a2060e86b4a86572"
"useLimePayWallet": false,
}
404: Not Found
{
"errorName": "NOT_FOUND_ERROR",
"code": 3013,
"message": "Shopper was not found"
}

get
Get All Shoppers

https://api.limepay.io/v1/shoppers
Get all Shoppers
Request
Response
Headers
Authorization
required
string
Authorization through API Credentials
200: OK
[
{
"_id": "5c90d6ba0d7265c9310ae9a4",
"firstName": "John",
"lastName": "Doe",
"email": "john@gmail.com",
"vendor": "5c18dca47dc18d30a1e978f3",
"maliciousAttempts": 0,
"walletAddress": "0xa3796ec8e53402fd4ea9f670a2060e86b4a86572"
"useLimePayWallet": false,
}
]

get
Get Wallet Token

https://api.limepay.io/v1/shoppers/:id/walletToken
Gets wallet token for shopper that uses LimePay powered Wallets.
Request
Response
Path Parameters
id
required
string
Headers
Authorization
required
string
Authorization through API Credential
201: Created
Newly created `walletToken` that can be used to create/update keystore file for the shopper
{
"walletToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlVc2VyIjoiNWM4YTYzYjk4MTE0ZWFlYThlNGQyMGVlIiwidXNlciI6IjVjMThkYjhkN2RjMThkMzBhMWU5NzhlYyIsInNob3BwZXJJZCI6IjVjOTBkYjc4MGQ3MjY1YzkzMTBhZTlhNSIsImNyZWF0ZWRPbiI6MTU1Mjk5NzI1NDMwNywidHlwZSI6IldBTExFVF9UT0tFTiIsImlhdCI6MTU1Mjk5NzI1NCwiZXhwIjoxNTUzMDAwODU0fQ.4Nit-0q-eyjxfCKmqfkLR6W4geDyHtJtTX90ihNM32s"
}
400: Bad Request
When the provided ID is for a shopper that does not use LimePay powered Wallet
{
"errorName": "SHOPPER_ERROR",
"code": 10031,
"message": `Shopper is not using LimePay powered wallet`
}
404: Not Found
You will get this response when providing non-existing ID
{
"errorName": "NOT_FOUND_ERROR",
"code": 3013,
"message": "Shopper was not found"
}