#brookflok_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/1218175157244395600
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
So there is this screen in the app
All the recipts will be in stripe, because every payment we are doing we are doing over the stripe
we have monthy or yearl subscription and additional top up for gems if user wish to get them more.
And we will have this page where user can Download there receipts
Is it the receipt or invoice you want?
I think it is a receipt, because user will have to pay for something first
I guess, I will just check diference online and let you know what I need
In the table above, which Stripe API objects are you listing?
We will need a receipt
This table above is just a mockup data. I was planning to create my receipts, when user makes the payment. But I saw that stripe has there own
so I was thinking maybe to use them
I'm not listening to anything yet to get the receipts
I was not able to find some clear guide for it
Then the receipt is available via the Charge object, which every payment has: https://docs.stripe.com/api/charges/object#charge_object-receipt_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How you find that Charge would deped on what API calls/objects you're using
okay, so in my app user can register an account and make a subscription on 3 packages. All 3 packages have monthly and yearly option.
I create a stripe customer in my app, then I make the subscription with paypal or with the credit card depending on the users choice and all the payment is done trough stripe.
In Customer emails I activated Succesfull payments that will send the recipt automaticly.
In my database I save the stripe_customer_id and the stripe_subscription_id
And overtime my user will be charged.
So I will use the Charge object to get the list of recipts?
OK, so if you're using recurring payments then each subscription 'period' will generate an invoice that they will pay (be it automatically or not). Those invoices are likely the object you'd list there in that table, and you can find the Charge (and receipt_url) via 'expanding' the payment_intent.latest_charge field on the Invoice object when listing them
Okay, I think I understand now
So as I see in Invoice i get the invoice and Invoice pdf and in charge I get receipt_url
Yes, but the invocie PDF URL includes a link to the receipt
Which is why I was asking about which APIs/objects you were working with, and whether you needed a receipt/invoice
Yes it's a hosted page you can send customers to and they can download what they need
There's no direct link you can use to facilitate a direct download from your UI
Okay, but I have found a way
when I list the charge
I get the receipt_url
and if I add /pdf to it on the end I get the recipt to be downloaded
Hi there
Yeah that's how it currently works, but that isn't documented publicly
We cannot generally recommend you do something that's not publicly documented since it may change
The team may change how the receipts work, so the /pdf route could in theory stop working
Okay, I understand totaly
I will have to speak to my boss to see what he wish to do. I'm totaly fine with the first methd @analog cipher explained
Thx for the explanation.
So basicly I get the list of invoices and on the button I just redirect them to the hosted_invoice_url and they will be able to download the receipt there
Just one more question
There is no way to bulk download receipts?
Yes exactly
Unfortunately not