#morteza_webhooks
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/1313088152046534666
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
if you want to know when the payment is successful, you should listen to payment_intent.succeeded
for all integrations, if a payment is successful, you get payment_intent.succeeded
ok, by the way I have another question
in react antive stripe when we make a purchase we have error and if it's null then it's considered as a success, can we consider it really as a success or we should wait for the webhook to get the real result ?
we have error and if it's null
what do you mean by this? what exact API call you made? what's the exact response you received from Stripe?
we are using sdk
export default function CheckoutScreen() {
// continued from above
const openPaymentSheet = async () => {
const { error } = await presentPaymentSheet();
if (error) {
Alert.alert(`Error code: ${error.code}`, error.message);
} else {
Alert.alert('Success', 'Your order is confirmed!');
}
};
return (
<Screen>
<Button
variant="primary"
disabled={!loading}
title="Checkout"
onPress={openPaymentSheet}
/>
</Screen>
);
}
used like this
in else block can we say that payment was 100% successful or our backend should wait for webhook to know if it was really successful
yes payment is successful in the else. but to actually fulfill your order, you should do that in your webhook endpoint
what's the common way to handle this ? our front-end team check if payment was asuucessfull every 10 seconds and then announces payment as successful!!
It's fine to use the code you shared above. But I would still send a final email to the customer when you received the webhook and started fulfilling the order.
nice
how can i know the success event was sent for pi_3QMtx3LmjdnG8GX01280lfh2
this is a payment done using tap to pay but we didn't receive success event from the webhooks
A payment_intent.succeeded Event was created for it, but it doesn't seem like it was send to any webhook endpoints: https://dashboard.stripe.com/events/evt_3QMtx3LmjdnG8GX01lLSyZk1
Do you have any webhook endpoints listening to this event?
yes we have
I am checking now and I don't see any webhook endpoints on your account listening to payment_intent.succeeded.
what are available endpoints ?
But I see charge.succeeded successfully delivered to 3 endpoints: https://dashboard.stripe.com/events/evt_3QMtx3LmjdnG8GX017QJvJ60
it's weired that tap to pay events used to be successful even with charge.succeeded
You should see all you registered webhook endpoints here: https://dashboard.stripe.com/webhooks
What do you mean? What's weird exactly?
How exactly?
and by the way charge.succeed has also been sent for this payment
Yes, that's expected to receive both types of events.