Skip to main content
POST
/
api
/
v1
/
device_pings
curl -X POST 'https://api-sandbox.paywithsoap.com/api/v1/device_pings' \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_CLIENT_SECRET' \
--data '{
    "latitude": 37.785834,
    "longitude": -122.406417,
    "customer_id": "cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"
}'
{
  "id": "dp_ETBkCvQztKUrzVeQUypYDB1EtUP7oUUX",
  "geo_check": {
    "country": "USA",
    "id": "gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw",
    "latitude": 37.785834,
    "longitude": -122.406417,
    "municipality": "San Francisco",
    "passed": true,
    "region": "CA"
  },
  "ip_check": null
}

Create Device Ping

Use this endpoint to record a device location ping for a customer. This endpoint helps verify a customer’s location by sending their device’s coordinates. The location data is validated and returns information about the detected geographic location, along with whether the location check passed or failed. This should be done from the client (browser, app, etc) rather than your server since we are collecting IP address. This endpoint uses a client secret rather than an api key (found in your dashboard).
curl -X POST 'https://api-sandbox.paywithsoap.com/api/v1/device_pings' \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_CLIENT_SECRET' \
--data '{
    "latitude": 37.785834,
    "longitude": -122.406417,
    "customer_id": "cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"
}'
{
  "id": "dp_ETBkCvQztKUrzVeQUypYDB1EtUP7oUUX",
  "geo_check": {
    "country": "USA",
    "id": "gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw",
    "latitude": 37.785834,
    "longitude": -122.406417,
    "municipality": "San Francisco",
    "passed": true,
    "region": "CA"
  },
  "ip_check": null
}

Authorizations

Authorization
string
header
required

Body

application/json
latitude
number
required
Example:
longitude
number
required
Example:
customer_id
string
required
Example:

Response

geo_check
object
id
string
Example:
ip_check
object | null
Example: