#acaiafa

1 messages · Page 1 of 1 (latest)

violet shoreBOT
unborn escarp
#

Hello! No, I don't believe Invoices have that property.

fringe mirage
#

So how can I know in the invoice.paid webhook that the payment is referring exactly to the customer id within my application?
I had understood that this tag was exactly for that

unborn escarp
#

Are you using Checkout to create a Subscription?

fringe mirage
#

How do I access this data using "Embeddable pricing table for SaaS businesses"?

unborn escarp
#

The Pricing Table creates Checkout Sessions.

#

You can access the data from the API.

fringe mirage
#

but if I'm using the pricing table embedded in my page, how am I going to get the checkout session, still make sure it was paid and do all this binding? does not make sense.

unborn escarp
#

You would write code to do it. Are you a developer?

fringe mirage
#

yes I am and I figured with the webhook this would be solved. All I had to do was enter a unique id and that same id would be returned in the webhook. If I need to use an api to get the session checkout to be able to interpret what comes in the webhook, and I don't even have access to the moment the customer completed or not the purchase, it makes no sense to anyone

unborn escarp
#

I think you're listening for the wrong Event.

#

Try listening for checkout.session.completed.

fringe mirage
#

now it makes sense

#

I will try this way

#

in invoice.paid is when the payment is confirmed, I didn't find the reference to session checkout in it

unborn escarp
#

There are several Events that will be emitted, all of which serve a specific purpose and describe a different object involved in the process. checkout.session.completed is the high-level Event that says "this Checkout Session completed" and it contains the Checkout Session object. Other Events that will fire in your use case include ones for the Subscription, the Invoice, the Payment Intent, and so on. You can listen to whichever Events make sense for your use case and suit your needs.

#

If your Checkout Session is creating a Subscription, for example, the the Subscription will create an Invoice, and that Invoice will create a Payment Intent, and that Payment Intent will create a Charge.

#

All of those objects have associated Events.

fringe mirage
#

thanks