简体   繁体   中英

Stripe: Shipping address not submitting via Node/Express

I'm using Node and Express to submit a form to Stripe . When I create the new customer for the charge, I submit the related data with it: https://stripe.com/docs/api/node#create_customer

Everything appears in Stripe's dashboard just fine except shipping address. I'm not getting any errors in command line or console so it's really hard to trouble shoot. My only guess is that there's some config I need to pass into Stripe that tells them I'm collecting address. No idea.

Any help would be much appreciated!

Here's what I've got now.

 stripe.customers.create({ email: req.body.stripeEmail, source: req.body.stripeToken, description: "this is he", metadata: { this: "that", gender: "female", party: "green" }, shipping: { name: "Yuki Matthews", address: { line1: "123 Yukon Ave.", line2: "Suite B", city: "Seattle", state: "Washington", country: "United States", postal_code: "98144" } } })

Your code is correct. The shipping address is not displayed in the dashboard, but can be retrieved when you retrieve the customer via the API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM