[Part of Sam's series on how to use the Ordr.in API]

The Ordr.in servers you choose to use will determine whether your order actually goes through and charges a real credit card. This is the difference between a demo and delivering real, delicious, delicious food. If you are using the raw HTTP API, then the subdomains "r.ordr.in" and "r-test.ordr.in" will be what sets these apart. If you are using an API wrapper, then you would pass an argument like "ordrin.TEST" or "ordrin.PRODUCTION" when creating the ordrin object.

The test API is what you want to use when you are developing and testing (go figure), as well as when you are demoing at a hackathon (unless you have a good 45 minutes to stick around and wait for food to arrive). You can access to the test servers just by registering an account and creating an app, which will give you the keys you can immediately begin using, no approval required!

When you want to throw your app into the wild and have users placing real food orders with it, then you switch to the production API. Your API key needs to be approved by ordr.in before you can use the production servers - you can email them with some details of your app to get approved. And then let the food come rolling in.

Both test and production servers have the same underlying data - if you can place a test order without any errors you can feel confident that the same order would have succeeded in the live server. So please test as much as possible on the test servers!

One important thing - when your key is approved for production it doesn’t remove access to the test servers, so you can continue developing/testing with the same key. You’re also free to start another app to specifically have test only keys if you’re worried about accidentally specifying the wrong server - it’s up to you!

Please check out the other API 101 posts:

API Overview

API Walkthrough

Dealing With The Menu

Test vs Production