-
Notifications
You must be signed in to change notification settings - Fork 184
Support collection of shipping address details #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I have the same issue where, my invoices do not contain all the details I need to display to my clients. I am looking for the following:
It's possible for me to put this information manually when I generate the link as per the following screenshot: Is there some way that I can update the invoice object so that this information is captured? |
@Ess-Bidali sorry for the delay. I'm discussing this one with the team. As it stands today, Checkout does not propagate the billing address to the customer object. I have a PR open that copies the billing address collected from Checkout to the customer object, you can follow along there: #96 To note that this only collects the name and billing address, it does not collect phone number nor custom fields. These would have to be collected outside of the checkout and added to the customer object via a separate Cloud Function for example. |
Hello, I am using this system for my project in the Netherlands. All of the functions work perfectly but I have one problem. The only accepted payment method is creditcard. But in the Netherlands this is not that common. Most of the people use their bank account for online payments so I would like to implement SEPA. Is there any way to do this implementation, but keep the features from firebase with all of the stuff. |
@jellelimpens Stripe Checkout does not yet support SEPA Direct Debit for subscription creation, you would have to follow this tutorial to build your own checkout form and start subscriptions with your own Cloud Function: https://stripe.com/docs/billing/subscriptions/sepa-debit The extension would still work for the webhook handling to sync subscription statuses and the creation of the portal link etc. |
Quick note that the billing address is now being transcribed to the customer object since v0.1.8: https://github.com/stripe/stripe-firebase-extensions/blob/next/firestore-stripe-subscriptions/CHANGELOG.md#version-018---2020-11-19 |
Absolutely. I collect shipping addresses in JavaScript checkout, this would stop me from using a middleman like SuperPortal. |
Shipping address collection is supported as of version 0.1.12: https://github.com/stripe/stripe-firebase-extensions/blob/next/firestore-stripe-subscriptions/CHANGELOG.md#version-0112---2021-04-29 You can update the extension in your Firebase console to enable this. |
Should country codes be individual array strings? |
Correct, see: https://github.com/stripe-samples/firebase-subscription-payments/blob/master/public/javascript/app.js#L177 you can test it out here: https://stripe-subs-ext.web.app/
This works both for one-time payment and for subscription mode |
Thanks. My array was poorly formatted. |
If anybody struggles like me to use Stripe firebase extension for fetching billing address details, just use my code, u need to change handleWebhookEvents cloud function that the extension gave u, and u only need this part that will update the billing address inside payment:
|
I also had the same problem.
But in this case it did not work. Investigating the const shippingCountries:Stripe.Checkout.SessionCreateParams.ShippingAddressCollection.AllowedCountry[] =
collect_shipping_address
? (
await admin
.firestore()
.collection(
config.stripeConfigCollectionPath ||
config.productsCollectionPath
)
.doc('shipping_countries')
.get()
).data() ??['allowed_countries'] ?? []
: []; I modified the function by adding logs to check the variables. I modified the function by commenting const shippingCountries:Stripe.Checkout.SessionCreateParams.ShippingAddressCollection.AllowedCountry[] =
collect_shipping_address
? (
await admin
.firestore()
.collection(
//config.stripeConfigCollectionPath ||
config.productsCollectionPath
)
.doc('shipping_countries')
.get()
).data() ??['allowed_countries'] ?? []
: []; This correctly retrieves the country codes and prompts for the shipping address at checkout. |
My shipping shows up fine since 2021. |
Feature request
firestore-stripe-subscriptions
Is your feature request related to a problem? Please describe.
Some subscription business models ship physical goods. We should support collection of shipping address details for those.
Describe the solution you'd like
Support https://site-admin.stripe.com/docs/payments/checkout/customization#shipping-address-collection
We need to figure out whether to
allowed_countries
via the client side (not ideal as it could be modified by customer via browser dev console)allowed_countries
as metadata on the product? (need to figure out if the 500 character limit would be a problem)allowed_countries
from a location in Firestore?The text was updated successfully, but these errors were encountered: