Start a new topic

PaymentError: card[billing_country] : cannot be blank

Using the Python API to create a new Subscription, the server responds with this error that doesn't seem to make sense:


    PaymentError: card[billing_country] : cannot be blank


The Python code which attempts to create the Subscription looks like: 

        result = chargebee.Subscription.create({                                                         
            u"plan_id": plan_id,                                                                         
            u"customer": {
                u"email": email,
            },
            u"card": {
                u"tmp_token": authorization_token,
                u"billing_country": u"US",
            },
        }) 

      It certainly seems to be supplying a non-empty card[billing_country].  What is this error trying to tell me?

1 Comment

Hey Jean


When you are passing tmp_token, the gateway will provide all the fields and you need not pass the card billing country.


Make sure that you have card billing country validation turned off since you are using tmp_token. You can find this option under Settings > SITE SETTINGS > Site info & Billing rules.


Screenshot attached for your reference.

image

Login or Signup to post a comment