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

Bearer token authentication using your API key

Body

application/json
latitude
number
required

Latitude coordinate of the device

Example:

37.785834

longitude
number
required

Longitude coordinate of the device

Example:

-122.406417

customer_id
string
required

Unique identifier for the customer

Example:

"cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"

Response

Device ping recorded successfully

geo_check
object

Reverse geocoding results from the lat/long you provided

id
string
Example:

"dp_ETBkCvQztKUrzVeQUypYDB1EtUP7oUUX"

ip_check
object | null

IP check results (turned off for now)

Example:

null