To solve this problem, I upgraded to the latest version of the Recurly client library for Python.
My billing code turned out to be like this, and this works as long as the card number is valid:
account_code = "%s_%s" % (int(time.time()), random.randint(0,10**9)) account = recurly.Account( account_code = account_code, first_name = form.first_name, last_name = form.last_name, email = form.email, billing_info = recurly.BillingInfo( token_id = form.token ) ) account.save() subscription = recurly.Subscription() subscription.plan_code = 'bimonthly-candy' subscription.currency = 'USD' subscription.account = recurly.Account.get(account_code) subscription.save()
source share