Skip to content

Choose a tool

Each Gatepost tool follows the same spec, so each one reads a postcode in the same way. Choose by the language of your app and by what it must know.

You want to Use Needs a key
Check the form of a postcode in TypeScript or JavaScript @gatepost/core no
Add a postcode field to an HTML form @gatepost/field only to confirm
Add a postcode field to a React form @gatepost/react only to confirm
Look up a postcode from a TypeScript server @gatepost/client yes
Check or look up a postcode in PHP gatepost/postcode only for lookups
Check postcodes in a WooCommerce checkout Gatepost Postcode for WooCommerce only for lookups

The core packages read the text that a user typed. They tell you whether the text has the form of a postcode, and what is wrong when it does not. They work offline, so they cost nothing and send nothing.

A postcode with the right form can still be wrong. Only NIPOST’s gateway knows which postcodes exist. Check the form first, and then ask the gateway when your app needs to know more.

The gateway refuses every call without a key. Register on NIPOST’s dashboard to get one. NIPOST gives two kinds of key.

  • A secret key starts with nipost_test_ or nipost_live_. Keep it on a server.
  • A publishable key starts with nipost_pk_test_ or nipost_pk_live_. A web page can hold it, but it works only from the addresses that you allow in the dashboard.

Test keys work only on NIPOST’s staging gateway. NIPOST’s docs do not give the address of the staging gateway. Ask NIPOST for it, and pass it as baseUrl. NIPOST’s docs explain the levels, the credits and the limits: docs.postcode.gov.ng.

Unofficial. Not made or endorsed by NIPOST.