#brookflok_api

1 messages ¡ Page 1 of 1 (latest)

covert shaleBOT
#

👋 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.

formal idol
#

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.

small spearBOT
formal idol
#

And we will have this page where user can Download there receipts

analog cipher
#

Is it the receipt or invoice you want?

formal idol
#

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

analog cipher
#

In the table above, which Stripe API objects are you listing?

formal idol
#

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

analog cipher
#

How you find that Charge would deped on what API calls/objects you're using

small spearBOT
formal idol
#

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?

analog cipher
#

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

formal idol
#

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

analog cipher
#

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

formal idol
#

I have tested it on stripe and I get this

analog cipher
#

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

formal idol
#

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

runic kraken
#

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

formal idol
#

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?

runic kraken