#drismail_api

1 messages ¡ Page 1 of 1 (latest)

soft oceanBOT
#

👋 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/1337472903582715987

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

robust glade
#

Hi there! What is the exact error you're seeing?

verbal abyss
#

cors policy error

robust glade
#

Hi hi! That URL is to an HTML page, not a PDF.

verbal abyss
#

Yes, how to convert it to a pdf ?

#

add "/pdf" before the query param ?s ?

#

??

robust glade
#

No, that's not how. Let me dig a bit.

#

Can you provide me with the Invoice ID for that one?

verbal abyss
#

in_1QpuqKGYhbuKScZIlNaWZgUY

robust glade
#

Ok cool. Why are you trying to download this vs just showing the user the URL to the hosted receipt on Stripe?

#

I'm not sure there's a way to programmatically download these, but that adds a bunch of overhead to your server-side vs. just sending them to the Stripe-hosted page.

verbal abyss
#

I'd like to have the experience fully customized

#

I'd rather choose overhead over less customization

#

Can you please guide me through how I can do it?

robust glade
#

I'm not sure I entirely follow: how would clicking a link/button and having that download a PDF (which they may not want, or may open funny depending on their configuration) vs having it go to hosted page where they can choose to download the Receipt or the Invoice?

verbal abyss
#

The hosted page can't have my domain

#

stripe unfortunately still doesn't support white labeling the receipts page

robust glade
#

Ok cool. It looks like you can add /pdf at the end of the path and before the querystring and you'll get your PDF.

robust glade
#

Right, so it doesn't work for Receipts, only Invoices. That said, you could download and parse the HTML of the Invoice page for the Receipt download link, and then fetch it.

#

That's going to be really brittle and will require lots of observability in order to know immediately if the Stripe page changes enough to be unparsable, but it's also the only way as far as I can tell.

verbal abyss
#

Can a PI manually captured have an invoice?

robust glade
#

No.

#

Only an Invoice is an Invoice.

verbal abyss
#

I see, so only recurring sub payments have invoices

robust glade
#

No, you can create a one-off invoice too.

verbal abyss
#

But you can't manually capture it

#

It should be paid straight

#

right?

robust glade
#

Why are you manually capturing it?

verbal abyss
#

Because in my biz model, a user applies to join a comm, he pays

#

then admin approves or rejects

#

if rejected -> cancel
if accepted -> capture and start a sun

#

sub*

#

and join the comm

#

If application isnt reviewed within 72hrs -> cancel as well

#

Why pay upfront on application and not only after getting a decision? -> To increase the conversion rate

verbal abyss
#

Stripe has strict CORS policy, I need to parse it from server side

#

Can you please confirm that stripe doesn't support white labeling the receipts/invoices hosted pages?

robust glade
#

It does not.

verbal abyss
#

Alright, thanks for your help today

robust glade
#

Try removing the headers you've got in there.

verbal abyss
#

That's what I'll try to do, thank you!

robust glade
#

Also, you're currently doing it client-side, so you should try it server-side.