recurly / recurly-client-python

Recurly Python Client
https://developers.recurly.com
MIT License
92 stars 78 forks source link

i already create billing info in my account,but when i create subcription or purchase, The client asked me to provide the billing info #661

Closed dechengz closed 1 year ago

dechengz commented 1 year ago

The user has already created the billing info, why do they need to provide the token id generated by recurly.js every time they create a subscription or purchase? In my understanding, the user should not be required to provide the associated token id if the billing info already exists, which is what recurly client V2 does

douglasmiller commented 1 year ago

Hey @dechengz,

As long as the Account has a BillingInfo, then you do not need to provide a Recurly.js token when creating a subscription or purchase:

purchase = recurly.Purchase(
  account = recurly.Account(
    account_code = acc.account_code
  ),
  subscriptions = [
    recurly.Subscription(
      plan_code = plan.plan_code
    )
  ]
)
collection = purchase.invoice()

The Recurly.js token is only required when creating/updating an Account's BillingInfo.

Could you provide more information about the issue that you are experiencing?

douglasmiller commented 1 year ago

@dechengz, I'm going to close this issue since there has been no activity for a few weeks. Please let us know if we can be of more assistance.

dechengz commented 1 year ago

issue is settled, thanks for recurly's support