Developer guide
VEX Pay siteAPI reference
Browse documentation

Address search and maps with @vexpay/maps

VEX Maps: address search, reverse lookup, Colombian grid addresses, maps and a delivery location picker for Venezuela and Colombia, on open data. No Google Maps or Mapbox key.

What it does

  • Search streets, neighbourhoods, buildings, banks and pharmacies, typo-tolerant, in Venezuela (ve) and Colombia (co).
  • Colombian grid addresses such as Calle 72 # 10-34 or Cra 7 con 72.
  • Reverse lookup: a point → municipality, neighbourhood, nearest street and place, and whether it is inside your delivery area.
  • Maps and a location picker: search, then move the map so the pin sits on the door, then confirm. The VEX Maps · © OpenStreetMap signature always shows.

See it live, and the coverage per country, at vexpay.app/maps.

Keys

VEX Maps keys are separate from your VEX Pay API keys. You get one publishable and one secret key per product.

KeyPrefixWhereCan call
Publishablevexmap_pk_…The browser, from your allowed origins onlysearch, reverse
Secretvexmap_sk_…Your server onlyEverything, including countries
Keep the secret key on the server

The SDK refuses a secret key in a browser. Put only the publishable key in client code.

Request an API key

  1. Message us on WhatsApp

    Request a VEX Maps key on WhatsApp%3A%20%0ASitios%20web%20que%20usar%C3%A1n%20el%20mapa%3A%20%0AQu%C3%A9%20necesito%20(b%C3%BAsqueda%2C%20mapa%2C%20selector%20de%20ubicaci%C3%B3n)%3A%20) (+58 414 933 3844). The message opens filled in; complete the blanks.

  2. Tell us what we need

    Your product or company, the countries (ve, co or both), the website origins that will show the map (for example https://www.example.com), and what you need: search, a map or the location picker.

  3. Receive your keys

    We send the publishable key (vexmap_pk_…, locked to your origins) and the secret key (vexmap_sk_…, server only). Each is shown once: store it in your environment, never in the repository.

You can also start from vexpay.app/maps and its “Pide tu clave API” button.

Install

npmbash
npm install @vexpay/maps maplibre-gl

maplibre-gl is only needed for the map and the picker. React is optional: the React components come from @vexpay/maps/react.

Examples

React pickerjavascript
import 'maplibre-gl/dist/maplibre-gl.css';
import { useVexMaps, LocationPicker } from '@vexpay/maps/react';

export function DeliveryPin({ onPoint }) {
  const vexmaps = useVexMaps({ key: process.env.NEXT_PUBLIC_VEX_MAPS_KEY, country: 've' });
  return (
    <LocationPicker
      client={vexmaps}
      style={{ height: 420 }}
      onConfirm={({ point, reverse }) => onPoint(point, reverse)}
      onUnavailable={() => onPoint(null)} // fall back to typed address fields
    />
  );
}
Nodejavascript
import { createVexMaps } from '@vexpay/maps';

const vexmaps = createVexMaps({ key: process.env.VEX_MAPS_SECRET_KEY, country: 've' });

const { results } = await vexmaps.search('castellana');
const place = await vexmaps.reverse({ lat: 10.5013, lng: -66.8523 });
// place.admin.level2 → "Chacao", place.street?.label, place.inServiceArea (when you have a service area)
Plain HTMLjavascript
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5/dist/maplibre-gl.css">
<script src="https://unpkg.com/maplibre-gl@5/dist/maplibre-gl.js"></script>
<script src="https://unpkg.com/@vexpay/maps@0.1/dist/vexmaps.global.js"></script>
<div id="picker" style="height:420px"></div>
<script>
  const client = VexMaps.createVexMaps({ key: 'vexmap_pk_…', country: 've' });
  VexMaps.mountLocationPicker(document.getElementById('picker'), { client })
    .on('confirm', ({ point }) => console.log(point));
</script>
curlbash
curl --request POST "https://maps.chuventures.com/v1/search" \
  --header "Authorization: Bearer $VEX_MAPS_SECRET_KEY" \
  --header "Content-Type: application/json" \
  --data '{"text":"Calle 72 # 10-34, Bogotá","country":"co"}'
Never block a checkout on the map

Calls time out after 2 seconds with an unavailable error. When that happens, show typed address fields and carry on; a pin is a bonus, not a requirement.

Reference

ItemValue
APIhttps://maps.chuventures.com (POST /v1/search, POST /v1/reverse, GET /v1/countries)
Map stylehttps://tiles.chuventures.com/style.json (MapLibre)
Countriesve, co
LimitsSecret key 60 requests/min; publishable key 600/min, and 30/min per visitor. Over the limit: 429 rate_limited with Retry-After.
Errorsinvalid_api_key (401), origin_not_allowed (403), country_not_allowed (403), point_outside_country (400), rate_limited (429)
Package@vexpay/maps on npm, MIT

Data: OpenStreetMap (ODbL), Overture Maps, GeoNames and Colombian official data. Keep the attribution visible on any map you show. Search text and points are never stored in logs.