#jamesroper_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1222667205024677918
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- jamesroper_error, 5 hours ago, 21 messages
- jamesroper_error, 1 day ago, 42 messages
To clarify - I only need to allow customers to view their previous purchases, and view and update their billing information
Hi, taking a look here
Are you asking how you can extract the customer billing data to then use it on your app?
If needs be I can manually extract it and set up my own viewing and editing page, but I was hoping there was a way to embed the formats from Stripe (for example the following for billing details, allowing customers to view and edit them directly on Stripe from within our app):
If not, where can I find all the necessary details (such as lists of countries accepted and the country formats, phone number format etc)
That I would need to set up my own billing details editor for instance
and invoice viewer
And if this isn't feasible, how can i allow users to view their invoices and update their billing details?
You can look at Address Elements, and for invoices, you can use Stripe Customer Portal, https://docs.stripe.com/customer-management as well depending on how you want to build these. Are you able to look at these and let me know what questions you have.
Ah, from within your app, you likely want to make a retrieve call, https://docs.stripe.com/api/customers/retrieve. You can surface that address and then when they update it, you can use your own UI to then update the address on the customer.
So in the Customer portal, the example seems to show the customer can only interact with their invoices, can I configure another one which allows customers to interact with their billing details?
business_profile={
"headline": "Cactus Practice partners with Stripe for simplified billing.",
},
features={"invoice_history": {"enabled": True}},
)```
Also, will this open a page separately from the app?
yes, it's a separate page.
yes, you can set the configuration, https://docs.stripe.com/api/customer_portal/configurations/create#create_portal_configuration-features-customer_update-allowed_updates to update the address.
OK I will make my own UI for billing details and figure out the format of the different fields from the documentation.
For viewing invoices on the other hand - how can I embed a table of invoices in my app?
Or at least, if I need to make such a table myself, how can I extract the necessary information from a customer's profile? Also, can the invoice for each payment be viewed/downloaded as a pdf?
Hello! I'm taking over and catching up...
You can list Invoices by customer: https://docs.stripe.com/api/invoices/list
If you do that I recommend you use auto-pagination: https://docs.stripe.com/api/pagination/auto
Each Invoice has an invoice_pdf property which contains a URL to a PDF of that Invoice: https://docs.stripe.com/api/invoices/object#invoice_object-invoice_pdf
Amazing, thank you
Happy to help!
Also, given customers will typically only purchase from us once of twice a year (as our product is software), is there a way to create an invoice immediately after each purchase and include this in the confirmation email we send when they make a purchase? Also would make more sense to have the invoice table I make update immediately. I presume automatically invoices are made at the end of each month or similar?
Are you charging them yearly with a Subscription, or are you creating the Invoices manually/directly?
They will be manually paying each time as it might not be the same date each year (at least that's the plan for now)
I have set up embedded payments, and I can see the transactions in test mode and everything appears to be working. But I notice there aren't any invoices available for any of the test customers I've made despite them having transactions
Can you give me the ID of one of those test mode transactions so I can take a look?
That's a Payment Method ID, which represents payment information. It's not specific to a single transaction. Do you have a Payment Intent ID (starts with pi_)?
pi_3OyzlwP7FVbVKqaz08YjrETw
Ah, okay, so that Payment Intent was created by a Checkout Session which you created here: https://dashboard.stripe.com/test/logs/req_baN9m1r4JIl6u5
If you want an Invoice for that payment you need to set invoice_creation.enabled on that Checkout Session: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-invoice_creation
See here for more info: https://docs.stripe.com/receipts?payment-ui=checkout#paid-invoices
Thanks, will work through that