How can my clients update their card information on Stripe? - stripe-payments

I currently use Stripe to sell my product, namely a recurring subscription.
I sometimes see a recurring payment failed to be completed, but Stripe, unlike PayPal seems to not support out of the box email notifications to let the customer know that his payment has failed.
So, my questions are:
How can I email my clients to notify them about their payment having failed? ( tell it as if I am 7 year old please, I am not a programmer )
Most importantly, how can my clients update their card information?
Thank you very much.

The best way to be notified when a recurring payment fails, and in turn notify your own customer, is to use webhooks. Specifically, you'd need to catch the invoice.payment_failed event.
Here is a recipe that explains how to send emails for failed payments to customers (using PHP): https://stripe.com/docs/recipes/sending-emails-for-failed-payments.
To update the payment information of an existing customer, you'd need to first collect the new card's information (using Checkout or your own form with Stripe.js), then send a customer update request with the new card's token in the source parameter. This will replace the customer's current default card with the new one.

You can email a link to the customer to update their credit card:
Use “Customer” tab to search for customer
Click on customer to open details
Click on “subscribed to…” (1st section of page)
Invoices: click on most recent invoice
“Details” section: copy “payment page link” and email to customer

This is now all done by Stripe's Customer Portal. Very feature-rich.
https://stripe.com/docs/billing/subscriptions/integrating-customer-portal

After talking with Stripe support this worked for me to allow the customer to edit his credit card informations (May 2022):
stripe dashboard
customers
select your customer in the list
remove all existing payment methods of the customer
create a new invoice ("Create" button at the top of the invoice list)
add a new item with an amount of 0.5$ (minimum amount apparently) By indicating an amount of 0$ the window to indicate the card data is not displayed.
check the "email invoice to customer with link to payment page" box
review invoice (top right button)
click on the send button
Personally, I had to do this twice for the customer to see the form to enter the new credit card data but it finally worked...
I hope this will help some of you who tried the previous solutions without success.

You can enable a shareable link to your customer portal that customers can log in to by email address to do things like manage their card information.
Here's where you configure it and enable the shareable link (at the bottom of this page)
https://dashboard.stripe.com/settings/billing/portal

Related

Stripe create Subscription with payment method in one go instead of two

for my subscription based product I want to have a possibility to subscribe and enter payment details at once with stripe and struggle with that with the api.
In https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements I see an option to create a subscription with payment_behavior='default incomplete' and then enter the details to confirm the payment intent. So far so good. However if I create the subscription like that even before the customer confirms payment details stripe already generates an invoice which is not really what I want before final confirmation by customer.
Options I see:
create setupintent, have this filled by customer via elements and then have the customer subscribe. Technically works nicely but for a sales and customer perspective is not good as it has two steps thus probably reduces conversion.
create the subscription in the background before final subscription confirmation by customer and use the clientsecret of it to pass back to browser and then have customer enter his payment data and submit that and finish the setup of subscription and payment info. Technically works - however I realize that when I create the subscription to get the clientsecret to pass to elements before the customer enters his payment data and confirms the subscription the subscription is not only created but an invoice too - which would be really, i.e. an invoice created before customers really confirms the contract
create setupintent and submit it via elements and in metadata of it add the info of product that customers wants so that when the paymentmethod gets created and I get webhook event I do the booking of the product given in metainfo. May however mean the customer gets to success page but the webhook has not notified yet and thus the customer is not really subscrubed at the point in time but gets a success message he is
same as 3 except do not pass info via metadata but via successUrl parameters which refers to and endpoint at my backend which upon being called after setupintent was setup will do the subscription and then redirect to my frontend which shows success page. That seems like a error prone workaround however.
Create a workflow which is a 2 step sign up and asks for paymentinfo, sets that up and then brings customer to a final confirmation page where the submit triggers subscription creation. Seems a bit complicated from a user flow, but so far probably the best option?
Any better options?
Cheers
Tom
ps: Interestingly enough on discord stripe support told me #2 is the way to go - find it hard to believe ...
As far as I know, there isn't a workaround for this unfortunately. It is just how Subscriptions API is designed by Stripe. You can learn more about that here where they talk about "how subscriptions work".

How can I sent an payment invoice to my client email using node.js

Now I want to make an eCommerce website. In this website, I want to implement a feature like when a client or user buy something from my website and they also pay with any payment gateway (In case I use Stripe payment gateway) After completing payment, I want to send an automatic order completion invoice to my client email with product name, quantity, subtotal, total and so on. That means we receive our client order and payment.
**
Advanced Thank's
Ariful Islam JR.
MERN Stack Developer**
I have no idea about this problem to get a solution.
It sounds like what you really want is a receipt to be sent to your customer on payment completion. There's a couple ways to achieve this. Assuming you want the customer to pay on your website and not on a Stripe-hosted page, then you could use the accept a payment guide with a custom flow and add a receipt email when creating the PaymentIntent. This would email your customer a receipt on successful payment completion. You could also achieve this with Stripe Checkout if you want a Stripe-hosted payment page by enabling email receipts in your settings.

How do you generate a stripe invoice after a successfull checkout session

Quite suprisingly, it is not possible to automatically generate an invoice after as successfull checkout session with Stripe.
An invoice must always come before a payment in the stripe system.
I am left with having to recreate the invoice through a bunch of API calls fetching the PaymentIntent or the CheckoutSession that was just performed to recompute the data for the invoice and mark it as paid (not even sure I can retrieve everything I need)
This seems quite hacky... Is this the right way to do it or shall I just handle invoicing outside of stripe (quite annoying too) ?
just want clarify if you need Invoice or Receipt, because they are two different things
Invoice is something you send to customer to ask for payment (before payment)
Receipt is a proof of succeeded payment (after payment)
My understanding is that the payment is already collected upon a succeeded checkout session, so you probably want to send receipts to customers. To enable email receipts, you can go to Settings -> Emails and tick the Email customers about Successful payment box. Please note that emails won't be sent in test mode.
Let me explain a solution that you can use to generate invoices after payment in stripe. This solution is based on Zapier connectors.
There are three systems that we should connect.
Stripe
Zapier
Plumsail Documents
First, you have to set up a Stripe connection to Zapier. Go to Zapier, create a Zap, find the Stripe connection, and select "New Payment" as the trigger event. Then, connect your Stripe account with Zapier and make a test in Zap. If everything ok, go to the second step.
Second. After you have done the Zap connection for Stripe, go to Plumsail Documents, create the process, and make a template for your invoice.
Third. Set up a Plumsail Documents connection to Zapier. Go to your Zap (where you have made the connection to Stripe before), find the Plumsail Documents action, and set the Start Process as Action Event. Next, you have to select your process and match output data from Stripe payment with your invoice template in Plumsail Documents.
It seems a bit complicated, so you can read the article with a more detailed description of this solution. Also, there are screenshots for all processes.
As a result, you will get a fully automated custom invoice generation whenever you will get a payment in Stripe.
Max, product manager at Plumsail.

How to create invoices using Stripe Connect Express, on Stripe Subscriptions invoices are automatically created, but not on Stripe Connect payments

I charge Customers using this guide https://stripe.com/docs/connect/destination-charges adding amount, application fee and Service provider accound_id, after that I listen for "charge.succeeded" event with webhooks. If the payment was successful I generate invoice using this this guide - https://stripe.com/docs/billing/invoices/connect, but I get this error
"Nothing to invoice for customer"
Is it possible Stripe automatically to create Invoice for me?
Do I have to manually create this invoice and then make it paid.
Should I generate the Invoice before Payment or after Payment?
When you process a payment, Stripe will send your customers a receipt automatically per your email settings [1]. In some respects, this receipt serves as an invoice of services rendered, and might be sufficient for your needs. You can see an example of what a receipt will look like for a given payment by looking at a given payment in the dashboard (under the 'Receipt history' heading).
Now, if the receipt automatically generated by Stripe doesn't meet your needs (e.g., you want to be able to list more customer info on there), then you'll want to use the Invoices API [2] instead of the Payment Intents API to process the payment. Using the Invoices API also allows you send the invoice to the customer so they can initiate payment on their own [3].
So, with that out of the way, if you intend to create Invoices for your customers you need to first create Invoice Items on the Customer and then create an invoice off that Customer. Once you finalize the Invoice, Stripe will either process a payment automatically under the hood, or send the Invoice to your Customers via email so they can initiate the payment (through a Stripe hosted page). At that point you can send your customers a copy of the Invoice PDF. With this integration there is no need to process the payment on your own or deal with any other APIs. The Invoices API takes care of everything for you. These steps are documented in detail here:
https://stripe.com/docs/billing/invoices/create
To answer your questions more directly:
No. Stripe will only automatically create invoices when you make subscriptions. But, Stripe does automatically create receipts as described above.
Yes, you manually would need to add Invoice Items to the Customer, then create an Invoice off that Customer. Note that this step will also charge the customer, so you don't need to do that separately.
Invoices process the payment under the hood once they are finalized.
[1] https://stripe.com/docs/receipts
[2] https://stripe.com/docs/billing/invoices/create
[3] https://stripe.com/docs/api/invoices/create#create_invoice-collection_method

Online Reservation and Payment System

we created an online reservation and payment system, we are going to use paypal to pay for the reservation fee.
how do we exactly save the information of our customer and reservation info to our database, after confirming their payment.
how do we confirm that they also paid it?
thanks in advance. as of now we're using the 'pay now' button
You should save the info to the database FIRST, then they can go to the PayPal site. After that, you can use Instant Payment Notification to mark the order as complete.
https://www.paypal.com/ipn
Paypal provide different methods to make payment; you can redirect user to PayPal from your application without taking customer information (e.g. name, phone, email). PayPal API is rich with multiple set of methods like SetExpressCheckOut, GetExpressCheckOut, DoExpressChckOut.
First please make a contract with PayPal and get the Merchant information; later you can have detailed documented API to talk to them.
Thank you

Resources