How Stripe does documentation

Whenever I ask people their favorite API documentation, they always say the same thing: Stripe. They pioneered that ubiquitous three-column layout, which was inspired by Coffeescript's Annotated Source viewer.

Sure, it's pretty… but Stripe's documentation is great for much more than a shiny coat of paint. They've put a ton of thought and care into some of the little details.

For example, Stripe's docs show you a code snippet, complete with API key… even if you’re not signed up! If you don't yet have an account, you can still make calls to the API to test it out. And once you sign up, they assign that API key to your account.

curl -u "sk_test_Akslaj2bI2HlWgHofQ2:" \
    -H "Stripe-Version: 2018-05-21"

Their documentation is also tightly tied to their versioning. So, it's possible to be on one version of a certain endpoint, and a more recent version of another. Their docs seemlessly show you the information for whatever's associated with your account, so you never have to remember what version you're on.

When people think of Stripe's docs, they tend to think of that three-column page above. There's much more to it! Stripe has done an amazing job on their guides, too. Most people shouldn't ever have to see the reference docs, because all the main usecases are heavily explained in the guides section.