curl -X GET 'https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870' \
--header 'Authorization: Bearer YOUR_API_KEY'
const fetch = require('node-fetch');
const customerId = 'cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870';
const url = `https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=${customerId}`;
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"id": "gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw",
"passed": true,
"municipality": "San Francisco",
"region": "CA",
"country": "USA",
"latitude": 37.785834,
"longitude": -122.406417,
"checked_at": "2024-01-15T14:30:22Z"
}
API Endpoints
Get Latest Geo Check
GET /api/v1/device_pings/latest_geo_check retrieves the most recent geolocation check result for a customer. Server-side call authenticated with the API key.
GET
/
api
/
v1
/
device_pings
/
latest_geo_check
curl -X GET 'https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870' \
--header 'Authorization: Bearer YOUR_API_KEY'
const fetch = require('node-fetch');
const customerId = 'cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870';
const url = `https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=${customerId}`;
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"id": "gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw",
"passed": true,
"municipality": "San Francisco",
"region": "CA",
"country": "USA",
"latitude": 37.785834,
"longitude": -122.406417,
"checked_at": "2024-01-15T14:30:22Z"
}
Get Latest Geo Check
Use this endpoint to retrieve the latest geolocation check for a customer. This endpoint returns the most recent location verification data for a given customer, including whether the location check passed or failed. This is useful for checking a customer’s current geo-compliance status before processing transactions or granting access to location-restricted features. Returnsnull if no geo check has been performed for the customer.
This endpoint authenticates with your API key, unlike Create Device Ping which uses the client secret. Call it server-side.
Authorization header:
Authorization: Bearer YOUR_API_KEY
key_....
Requests with a missing or invalid API key return 422 — never 401 — with a JSON error field, usually {"error": "API key not found."}. Branch on the status code rather than the message: GET /api/v1/device_pings/latest_geo_check does not yet return the same wording.
Never expose your API key in client-side code — it is server-side only.
curl -X GET 'https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870' \
--header 'Authorization: Bearer YOUR_API_KEY'
const fetch = require('node-fetch');
const customerId = 'cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870';
const url = `https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=${customerId}`;
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"id": "gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw",
"passed": true,
"municipality": "San Francisco",
"region": "CA",
"country": "USA",
"latitude": 37.785834,
"longitude": -122.406417,
"checked_at": "2024-01-15T14:30:22Z"
}
Authorizations
Bearer token authentication using your API key (key_...). Used for every endpoint except POST /api/v1/device_pings.
Query Parameters
Unique identifier for the customer
Example:
"cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"
Response
object | null
The customer's most recent geo check, or the JSON literal null when no geo check has been performed for the customer yet.
Example:
"gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw"
Whether the location is in a state that you support.
Example:
true
Example:
"San Francisco"
Example:
"CA"
Example:
"USA"
Example:
37.785834
Example:
-122.406417
ISO 8601 timestamp of when the check was performed
Example:
"2024-01-15T14:30:22Z"

