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

# Check Customer's IP address

> Returns information about an IP address. If the `isAllowed` flag is set to <span class="value">false</span>, it means that MoonPay accepts citizens of this country but not residents.



## OpenAPI

````yaml GET /v3/ip_address
openapi: 3.0.0
info:
  title: Ramps
  version: 1.0.0
servers:
  - url: https://api.moonpay.com
security: []
tags:
  - name: On-ramp
    description: Get quotes and transaction details for buying cryptocurrencies.
  - name: Off-ramp
    description: Get quotes and transaction details for selling cryptocurrencies.
  - name: Data
    description: >-
      Get currently supported countries, currencies, and payment methods. Also
      check the customers's IP address restrictions.
  - name: DefiToken
    description: Retrieve token data and token lists for DeFi assets.
paths:
  /v3/ip_address:
    get:
      tags:
        - Data
      summary: Check Customer's IP address
      description: >-
        Returns information about an IP address. If the `isAllowed` flag is set
        to <span class="value">false</span>, it means that MoonPay accepts
        citizens of this country but not residents.
      operationId: getIpAddress
      parameters:
        - name: query
          in: query
          style: form
          explode: true
          required: true
          schema:
            type: object
            properties:
              ipAddress:
                type: string
                example: 71.183.124.141
                description: The IP address to be checked.
      responses:
        '200':
          description: Successful response. IP Address details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAddress'
        '400':
          description: >-
            Bad request. A required parameter is missing or invalid; check
            `message` and `errors` for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    IpAddress:
      type: object
      properties:
        alpha2:
          type: string
          example: GB
          description: The country's ISO 3166-1 alpha-2 code.
        alpha3:
          type: string
          example: GBR
          description: The country's ISO 3166-1 alpha-3 code.
        country:
          type: string
          example: United Kingdom
          description: The IP address country.
        state:
          type: string
          example: ''
          description: The IP address state or region or empty if not applicable.
        ipAddress:
          type: string
          example: 81.152.178.191
          description: The IPv4 or IPv6 address of the caller
        isAllowed:
          type: boolean
          example: true
          description: Whether residents of this country can use the service.
        isBuyAllowed:
          type: boolean
          example: true
          description: Whether residents of this country can buy cryptocurrencies.
        isSellAllowed:
          type: boolean
          example: true
          description: Whether residents of this country can sell cryptocurrencies.
        isNftAllowed:
          type: boolean
          example: true
          description: Whether residents of this country can buy NFTs.
    Error:
      type: object
      description: >-
        Standard error response. See [Errors](/api-reference/widget/errors) for
        the full code catalog.
      properties:
        moonPayErrorCode:
          type: string
          description: >-
            Stable, machine-readable error code. System codes are prefixed
            `1_SYS_` (general) or `4_SYS_` (request validation); domain codes
            are prefixed `5_`. `1_SYS_UNKNOWN` with a 4xx status indicates a
            legacy validation error. Read `message` for the cause. See
            [Errors](/api-reference/widget/errors).
          example: 4_SYS_BAD_REQUEST
        message:
          type: string
          description: >-
            Human-readable description of the error. May change over time.
            Branch on `moonPayErrorCode` and the HTTP status, not on this text.
        type:
          type: string
          description: >-
            The error class name, e.g. `BadRequestError`, `UnauthorizedError`,
            `MoonPayApiError`.
        errors:
          type: array
          description: >-
            Field-level validation details, when the error was caused by invalid
            input. Empty or absent otherwise.
          items:
            type: object
            properties:
              property:
                type: string
                description: The invalid field.
              message:
                type: string
                description: Why the field is invalid.
              children:
                type: array
                items:
                  type: object
                description: Nested validation errors for object fields.
      required:
        - moonPayErrorCode
        - message
        - type
  securitySchemes:
    apiKey:
      type: apiKey
      name: apiKey
      in: query
      description: >-
        Your publishable API key, passed as the `apiKey` query parameter.
        Publishable keys are prefixed with `pk_test_` (sandbox) or `pk_live_`
        (production) and are safe to use in client-side code. Find your keys on
        the [API keys page](https://dashboard.moonpay.com/developers/api-keys)
        of the dashboard. See
        [Authentication](/api-reference/widget/using-the-api#authentication).

````