#crkdltrn_api

1 messages ยท Page 1 of 1 (latest)

umbral heathBOT
#

๐Ÿ‘‹ 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/1296877287269990491

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

gentle axle
#

Hi ๐Ÿ‘‹

I"m a little confused about what you are attempting here. If you create subscriptions/invoices with a collection method of send_invoice then we will send an email to the customer with the PDF and the link to use our Hosted Invoice page.

trim perch
#

We create the invoice, add line items, then finalize in our API, during finalize, we turn off all emails to the customer for the invoice. We will facilitate the emails from our internal system to customers.

#

We want to direct customers to our self hosted invoice payment page.

gentle axle
#

Okay so you don't want to charge_automatically but you want to handle collecting the payment method details yourself? That seems doable.

trim perch
#

The PDF url in the invoice object goes to this PDF, which still has this link which some users may click on, not going through our invoice payment page

#

When I provide only "card" as a payment option for the invoice, there are still the form fields on the stripe hosted invoice

#

This will not use our system and attach metadata we need in zapier

gentle axle
#

Okay so you don't want them to use the hosted invoice page, that seems clear

trim perch
#

Thank you for your help

gentle axle
#

How are you collecting payment method details?

trim perch
#

Correct, only use our self hosted page. But I'd like this to be configurable per invoice to turn off that link in the PDF if possible

#

We are using stripe.js and using the card element and payment method elements

#

Which are saved to the customer object and set as default payment

gentle axle
#

Okay 2 questions

  1. Why are you not collecting the payment method details and saving them to the customer before creating the Invoice? Then you could use charge_automatically and skip the PDF issue
  2. What object are you attaching metatdata to?
trim perch
#

We are using payment intent to process the payment, then if charge is successful, we mark the invoice as paid out of band after that via API

#

Attaching metadata to invoice object and payment intent

gentle axle
#

Okay that's a really bad flow

#

And makes no sense

trim perch
#

We are adding the customer prior to payment because we're collecting agreements through adobe sign first, then setting up customer after they have signed on.

gentle axle
#

When you create an Invoice for an amount greater than 0, it generates a Payment Intent automatically

#

You should use that payment intent, which will automatically mark the Invoice as paid

#

We are adding the customer prior to payment because we're collecting agreements through adobe sign first, then setting up customer after they have signed on.
Nothing about this means you cannot collect the payment method before you create the Invoice

trim perch
#

We're not selling widgets or e-commerce, this is a SAAS which requires details and signatures before Stripe is involved.

gentle axle
#

We're not selling widgets or e-commerce, this is a SAAS which requires details and signatures before Stripe is involved.
This also means nothing with respect to when you collect payment method details and generate Invoice objects

trim perch
#

We create the stripe customer before we know payment details, we will send the invoice url to our self hosted and at that point, they provide card to use

gentle axle
#

Yeah, that is a bad flow and the reason you have so much trouble

trim perch
#

Our flow works, the PDF has a pay online link, that's the problem

gentle axle
#

It's perfectly normal to create the customer before you have payment method details

#

Our flow works
Using a separate PI and marking invoices as paid out of band is particularly bad

trim perch
#

The solution seems to be to not ever allow them to download the stripe generated PDF and create one ourselves in our internal system.

#

Ok I will work on improving that flow and the payment intent on the invoice object, but the PDF link still is a problem

gentle axle
#

That way, you can use the Stripe email setting to send the customer the PDF of the Invoice after they have completed payment

#

So they have the PDF as a record of their payment but they cannot use it to get to the Hosted Invoice page

trim perch
#

Some corporate accounts like to have a PDF before payment is made too

#

I think I have my answers, no Stripe PDF visible or download prior to payment.

#

And I'll improve the invoice flow and look into that payment intent and associate with the payment method from card element

gentle axle
#

And I'll improve the invoice flow and look into that payment intent and associate with the payment method from card element
I think this will help with record keeping since the payment will be directly linked to the Invoice object in the Stripe dashboard

trim perch
#

Yes that makes sense. I will work on getting that done in test mode.

#

But there is no way to remove that "Pay Online" link in PDFs?

umbral heathBOT
gentle axle
#

I was looking and I don't think that is possible here

trim perch
#

OK thank you for your help.