#lou_alcala - Charge billing info

1 messages · Page 1 of 1 (latest)

crisp ivy
#

Hi, can you share what parameters you are trying to pass the the Charge API?

junior ledge
#

sure, I want to pass: city, country, address and postal code to the charge

#

I'm using stripe.Charge.create

crisp ivy
#

Okay do you have a request ID for a failed request?

junior ledge
#

not really, I'm just trying to send that data

crisp ivy
#

Okay but when you attempt to send the data it creates a request in your account logs. You should be able to find that log

junior ledge
#

I'm using the SDK with Python BTW

crisp ivy
#

The logging is universal. Any API request will be logged in your account.

junior ledge
#

actually, I did not try to send that data yet, bc there is not example about it

#

and I'm not sure how to pass the billing info to the charge

#

I'm also trying to pass the card holder name, but I'm not sure if I can pass this to the charge or should I pass it to the customer

crisp ivy
junior ledge
#

yeah I saw that, but in the charge object the billing_details is present

crisp ivy
#

If you have Customer object with linked Payment Methods associated with your charge, you can get all of that data by expanding the Customer and the Sources from the Charge

junior ledge
#

Okk, it looks like I have to change my current logic, I was creating a stripe.createToken via JS and then passing that token to the backend to create the customer and create the charge

#

but it looks like I have to create a paymentMethod first

crisp ivy
#

Yeah, Tokens is a VERY old API. Payment Methods are much more flexible.

junior ledge
#

cool, thanks

crisp ivy