Get Shopper Information
Look up a shopper’s current and allowed spending limits.
GET
/api/paylater/merchant-portal/v2/web-checkout/shopper
Sandbox
https://connect.uat.paylaterapp.com/api/paylater/merchant-portal/v2/web-checkout/shopper
Production
https://connect.paylaterapp.com/api/paylater/merchant-portal/v2/web-checkout/shopper
Authentication
All requests require a bearer token from the OAuth 2.0 token endpoint. Pass it as Authorization: Bearer <ACCESS_TOKEN>.
Request
Headers
| Header | Value |
|---|---|
Authorization | Bearer <ACCESS_TOKEN> |
Query parameters
mobile_numberStringrequiredShopper’s mobile number.
emailStringrequiredShopper’s email address.
Example request
curl --location 'https://connect.uat.paylaterapp.com/api/paylater/merchant-portal/v2/web-checkout/shopper?mobile_number=97412345678&email=test@sample.com' \
--header 'Authorization: Bearer <ACCESS_TOKEN>'
const params = new URLSearchParams({
mobile_number: '97412345678',
email: 'test@sample.com',
});
const res = await fetch(
`https://connect.uat.paylaterapp.com/api/paylater/merchant-portal/v2/web-checkout/shopper?${params}`,
{
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`,
},
},
);
const shopper = await res.json();
import requests
resp = requests.get(
"https://connect.uat.paylaterapp.com/api/paylater/merchant-portal/v2/web-checkout/shopper",
headers={
"Authorization": f"Bearer {access_token}",
},
params={
"mobile_number": "97412345678",
"email": "test@sample.com",
},
)
shopper = resp.json()
$query = http_build_query([
'mobile_number' => '97412345678',
'email' => 'test@sample.com',
]);
$ch = curl_init('https://connect.uat.paylaterapp.com/api/paylater/merchant-portal/v2/web-checkout/shopper?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $accessToken,
],
]);
$response = json_decode(curl_exec($ch), true);
Response
A 200 OK returns the shopper’s identifiers and spending limits.
{
"shopperId": "uuid",
"email": "test@sample.com",
"mobileNumber": "97412345678",
"currentSpendingLimit": 925.0,
"allowedSpendingLimit": 4000.0
}
Errors
{
"message": "Shopper not found"
}
{
"message": "Missing API key in request headers"
}
See Error handling & response codes for the full catalogue.