How to finalise one-time payment summary with Firebase Extension "Run Payments with Stripe" on a ReactJs website - reactjs

I'm currently using Firebase for my ReactJs website.
I wanted to use stripe to add a payment module. So I created an account on Stripe and added the extension "Run Payments with Stripe" on my Firebase project.
Everything works fine on this extension on my website:
I can make payment
I'm well redirected to the Stripe payment interface
The webhook add the payment document on my customer document on Firestore
But, I have one problem remaining : how to know which firestore document payment was concerned by the one-time payment a customer make on the current checkout session?
Firestore does not update checkout session document with the payment id, or the payment document with the checkout session id.
I tried to update manually the webhook function on Google Cloud but I don't think that's a good idea (and I don't know why but the update was not considered).
I don't want to list all payment the customer made and displayed it : I want to have this specific payment and display a summary of this order.
Does someone has clues on this?

Yup, it appears that the function in the webhook handler does not add Checkout Session data with the associated Firestore payment document.
I'd recommend creating an issue on the GitHub repository with your feedback/request. Alternatively you can configure a 2nd webhook to update the Firestore documents as you need.

Related

How to generate links for profile completion with expiry date in NextJS - Supabase

I'm currently working on a NextJS-Supabase project where I have to build a dashboard for some vendors.
Each vendor should be able to login into his dashboard and add his customers to keep track of their informations. The process of adding a customer falls into the following steps :
fill the customer email and submit the request of adding him.
The customer receives an email containing a link available for 5hours.
The link redirects him to a page where he can complete some of his basic information such as address, phone...etc.
Once the form submitted the customer data are updated in Supabase.
I don't know how to implement this in NextJS-Supabase knowing that the customers don't have a user account. Only vendors have a user account and can login/logout.

How can I have a stripe dynamic form for collecting billing address and name along with card details

I'm using react hooks with typescript for stripe integration to the commercial website. and stripe Intent is getting created at backend using java spring can I update the stripe intent with billing address and name using stripe dynamic form
enter image description here
obtained clientSecret and passed to elements options
here I'm confirming the payment
enter image description here
checked out some other solutions at online. But did not find solution that I can adapt.
I appreciate any help!
It looks like you're using the Payment Element, based on your use of confirmPayment. The Payment Element automatically collects required billing information based on the customer country and selected payment method type. You can preview this on the page above by changing the country and payment method type to see the fields collected.
Other optional (non-PCI) billing details can be collected by you in your own form and provided during confirmation using payment_method_data[billing_details] (ref).

Get to know when paypal made payment in subscriptions plan

I'm using paypal subscription plan which is define here Subscription Integration I'm using reactjs here is package which I'm using for paypal react-paypal-button-v2 I'm successfully able to make payment but problem is I'm setting subscription plan which make payment every month. So how can I get to know when paypal made payment for next month. Is there some webhook or callback url which is called everytime when paypal made payment for this specific subscription plan. If there is how can I set any guide or something ?
Store a record of the subscriptionID when it is first created. Typically you'll want to associate this with a user.
For keeping track of future payments, set up a webhook listener for PAYMENT.SALE.COMPLETED events.
Webhook PAYMENT.SALE.COMPLETED has subscription id named billing_agreement_id.
(if this webhook was triggered as a result of a subscription payment)
Ex: webhook body like
{
...
...
resource: {
"billing_agreement_id":"I-XXXXXXXXX"
}
}

React Firestore how to create a unique url when posting document to firestore

Not sure where to start on this one, so here goes.
After creating a document in Firestore by POSTing data the user inputs in my React application state, how can I create a unique URL that a user can visit to GET/view that data?
For example:
https://myreactwebsite.com/new-document/
I need to ensure that a unique URL exists in my website index, so that not only can a user visit, but it can be indexed by Google for SEO.
My React application is hosted on Firebase as well as using Firestore for the database.
Firestore is a NoSQL Document database (Much like MongoDB if you're familiar with it). They both implement some form of document ID in each document. That could be leveraged in creating a unique route in your use case.
I would create a route such as /profile/:id in your react app, that when you visit it you make a call to your backend requesting that profile and then use the response from that request to fill in the data.
I would try to describe it here but in all honesty, this page does a much better job than I could in one short SO post

server side account check - is user registered (backand.com)

i currently stuck on building an account check like whatsapp.
When a user clicks on his smartphone on his/her contacts, it should display, which user has an existing account.
So in theory it should post all user contacts to server, server checks if there is an account with this email adresse and sends the "updated list" back to the client.
Sounds easy, but how do i do something like that :)
Getting the contacts is working, also posting contacts to server.
I had my backend on backand.com and building an app with Ionic/Angular.
This should be very simple.
The core functionality here is based on Backand built in 'users' object, it holds all users you've added to your app, a simple GET to this object will return all your users details including emails.
Now you can add a serverside js action that
gets the contacts details from the client-side app in the request body (as JSON)
does an $http call to the users object ro fetch exiting users.
loops the contacts and search for them in the users array

Resources