#nollix_api

1 messages ยท Page 1 of 1 (latest)

edgy quarryBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

haughty compass
#

Hi there ๐Ÿ‘‹ it partly depends on what payment method types you plan to accept, primarily whether you intend to accept any that are delayed-notification. for those, you don't immediately know whether the payment succeeds and have to wait for an Event later.

This guide helps walk through that whole process, and step 2 is where we start talking about immediate vs delayed payment methods. Let me know if it doesn't help though!
https://docs.stripe.com/checkout/fulfillment?payment-ui=stripe-hosted#immediate-versus-delayed-payment-methods

long shadow
haughty compass
#

Using Stripe Checkout doesn't ensure you're only accepting instant-notification payment methods, which is why we built that guide for how to know when to fulfill orders when using Stripe Checkout which addresses both possibilities.

edgy quarryBOT
long shadow
#

Ok I have understood from the documentation that I should listen also for 'checkout.session.async_payment_succeeded' because not all the payment are instant. But my original question is still pending: what should I listen between checkout.session.completed and payment_intent.succeeded? Most of the documentation pages make example with checkout.session.completed but I had other discussion with other developers where they told me that the payment isn't guaranteed when the checkout.session.completed happens. I would like to know the pros and cons of these two solutions

exotic hollow
#

Either of those events are fine to listen to. I think it is mostly a choice of which info is more immediately relevant to your backend code. Ex: with checkout.session.completed can easily look up the checkout session and its line items from the session's ID but payment_intent.succeeded will include the latest charge ID which means you can stuff related to that more easily

#

You can get the same info from both, but some info will require additional API calls

long shadow
#

just to sum up:

  • if I listen to checkout.session.completed I can retrieve data about the payment through API or through the data of the session
  • if I listen to payment_intent.succeeded I will be sure that the payment is succeeded without looking in the data directly (cause the event itself is generated when the payment is ok).

Right?

exotic hollow
#

I actually think both of those bullet points apply to both. For both event types, you can look up the same info via the API but for each event some data will be a little more readily accessible compared to the other one.
And checkout sessions have a payment_status property which will be unpaid initially for async payment methods like this.

long shadow