## TL;DR

The reporter's workaround was confirmed correct by a maintainer, who updated the docs example (it had shown the update flow for what is really a create case).

## Steps

1. Don't read billing_info off a new account - create one and attach it. The verified pattern: `account = Account.get('1')`, then `billing_info = BillingInfo()`, `billing_info.token_id = 'TOKEN_ID'`, `account.update_billing_info(billing_info)`. The maintainer confirmed this is the expected way to create (as opposed to update) billing info. So the docs example you copied was for the update case; for new accounts, construct the BillingInfo object yourself and pass it to update_billing_info. Source: https://github.com/recurly/recurly-client-python/issues/145

Expected: The maintainer confirmed this is the expected way to create (as opposed to update) billing info.

## When to use

You are seeing this: With the recurly V2 python client (2.2.17, python 3.5), creating a new account and then reading account.billing_info raised AttributeError - even after re-fetching with Account.get('1'). Use this skill when you run into "recurly python: account.billing_info raises AttributeError on new accounts".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: 2.2.17. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://github.com/recurly/recurly-client-python/issues/145
