#crkdltrn_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/1296877287269990491
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
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.
Okay so you don't want to charge_automatically but you want to handle collecting the payment method details yourself? That seems doable.
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
Okay so you don't want them to use the hosted invoice page, that seems clear
Thank you for your help
How are you collecting payment method details?
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
Okay 2 questions
- Why are you not collecting the payment method details and saving them to the customer before creating the Invoice? Then you could use
charge_automaticallyand skip the PDF issue - What object are you attaching metatdata to?
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
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.
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
We're not selling widgets or e-commerce, this is a SAAS which requires details and signatures before Stripe is involved.
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
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
Yeah, that is a bad flow and the reason you have so much trouble
Our flow works, the PDF has a pay online link, that's the problem
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
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
I think the solution is to create the Invoice setting charge_automatically as the payment collection method and then use your custom form with the Card Element to confirm the Payment Intent that is related to the Invoice.
https://docs.stripe.com/api/invoices/object#invoice_object-payment_intent
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
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
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
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?
I was looking and I don't think that is possible here
OK thank you for your help.