> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywithsoap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Latest Geo Check

# 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.

Returns `null` if no geo check has been performed for the customer.

<RequestExample>
  ```bash Curl theme={null}
  curl -X GET 'https://api-sandbox.paywithsoap.com/api/v1/device_pings/latest_geo_check?customer_id=cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870' \
  --header 'Authorization: YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  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': 'YOUR_API_KEY'
    }
  };

  fetch(url, options)
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "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"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/v1/device_pings/latest_geo_check
openapi: 3.1.0
info:
  title: Soap API
  description: >-
    API documentation for Soap - AI-native payments infrastructure for complex,
    compliance-heavy payment flows
  license:
    name: MIT
  version: 1.4.0
servers:
  - url: https://api-sandbox.paywithsoap.com
security:
  - bearerAuth: []
paths:
  /api/v1/device_pings/latest_geo_check:
    get:
      tags:
        - Device Pings
      summary: Get latest geolocation check for a customer
      parameters:
        - name: customer_id
          in: query
          required: true
          description: Unique identifier for the customer
          schema:
            type: string
            example: cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870
      responses:
        '200':
          description: Latest geo check retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: gc_8HpqVXHQ7672sFi38yLN9kCMJN1LtiMw
                  passed:
                    type: boolean
                    example: true
                    description: Whether the location is in a state that you support.
                  municipality:
                    type: string
                    example: San Francisco
                  region:
                    type: string
                    example: CA
                  country:
                    type: string
                    example: USA
                  latitude:
                    type: number
                    example: 37.785834
                  longitude:
                    type: number
                    example: -122.406417
                  checked_at:
                    type: string
                    format: date-time
                    example: '2024-01-15T14:30:22Z'
                    description: ISO 8601 timestamp of when the check was performed
              example:
                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'
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your API key

````