Guide

How to get and use an Australia Post API key for WooCommerce

Any plugin that quotes live Australia Post rates needs a Postage Assessment Calculator (PAC) API key. It is free, it takes a few minutes, and you do not need a business account. Here is what it is, how to get one and how to keep it working.

What the PAC API is

The Postage Assessment Calculator is the same engine behind the postage calculator on Australia Post's website. The API version lets software ask the same question: "what does it cost to send a parcel of this weight and size from this postcode to that one?" It answers with the retail price for each available service, domestic and international. It does not create labels, book pickups or access your MyPost Business account; it only quotes prices.

Australia Post offers the key free to anyone who registers. There is a fair-use limit on how many requests you can make per day, which is why a good plugin caches results.

Getting the key

  1. Open developers.auspost.com.au/apis/pacpcs-registration.
  2. Complete the registration form with your name, email and a short description of what you will use the key for ("WooCommerce shipping rates for my online store" is enough).
  3. Submit. Australia Post sends the key to the email address you gave. Keep that email; the key is a long string of letters and numbers and it is easy to lose.

If the email does not arrive, check spam, then wait a little. Registration is automated but not always instant.

Putting the key into WooCommerce

Where the key goes depends on the plugin, but it is always a single text field in the plugin's settings. For Ratehaul it is WooCommerce › Settings › Shipping › Ratehaul › PAC API key. Paste the key exactly as it arrived, with no spaces before or after, and save.

Then set your origin postcode. The API prices by distance between your postcode and the customer's, so this has to be right. Add a default box with dimensions and a maximum weight, because the API will not quote a parcel with no size.

Testing the key

Add a product with a weight to your cart and enter a destination postcode in the shipping calculator. If you see Parcel Post and Express Post prices, the key works. If you see your fallback rate or nothing, the usual causes are:

To check the API directly, you can compare your checkout's price with the calculator on Australia Post's site using the same weight, box and postcodes. They should match to the cent for retail Parcel Post and Express Post.

Keeping the key safe

The key identifies your registration, not a payment method, so a leaked key cannot cost you money. It can be used up against your daily request limit by someone else, though. Treat it like a password: do not post it in forums or support tickets, and blank it out of screenshots. If you think it has leaked, register for a new one and replace it in the plugin.

The key lives in your WordPress database and only ever travels from your server to Australia Post. A well-behaved plugin never sends it anywhere else. If a plugin asks you to enter the key on the plugin vendor's own website rather than in your WordPress admin, ask why.

What the key does not give you

The PAC API quotes retail prices. If you have a MyPost Business account and pay less than retail, the API will still quote retail. You handle that in the plugin, by applying a percentage discount or by entering the prices you actually pay in a satchel table. Contract rates, label printing and tracking are separate Australia Post services with their own APIs and their own sign-up, and are not needed for showing prices at checkout.

If you would rather not set this up by hand, Ratehaul Lite does the API work for free, and Pro adds satchel pricing, box packing and international rates for A$59 once.

Download Lite See Pro pricing

Ratehaul is independent and is not affiliated with or endorsed by Australia Post.