#runefarer

1 messages ยท Page 1 of 1 (latest)

hexed patioBOT
azure epoch
#

Hi ๐Ÿ‘‹

Do you have any example payment intent IDs I could review?

primal tangle
#

Sure, just a question - is it secure to share live account payment intent IDs on Discord?

azure epoch
#

Yes, only people with access to your Stripe account and Stripe staff with specialized permissions can use them

primal tangle
#

pi_3NqHu3BDew7xQiBS1rcpeC8D

azure epoch
#

Thanks, taking a look

#

Okay I see a payment_intent.succeeded event associated with this PI.

#

It was sent to 6 webhook endpoints

primal tangle
#

We only have 3 endpoints configured with live

#

I can only see 3 hosted endpoints enabled, and the one we have with our test environment didn't receive the webhook.

Is it a setup issue?

azure epoch
#

I see all webhook endpoints associated with this event are Connect related. But event delivery was successful to all of them

primal tangle
#

Under Developers > Webhooks, we've configured 3 hosted endpoints.

Those are the ones we want to receive events on, and generally do. I just added the third one recently for our test environment.

#

we_1LAryuBDew7xQiBSRq3JBLlH

azure epoch
#

That endpoint was updated today. What was changed?

primal tangle
#

We have it disabled because we don't want the test environment getting live events. We're careful to only setup live with our test environment only when absolutely necessary, and then immediately tear it down.

Once testing will be done, I'll disable the endpoint again.

azure epoch
#

Okay well the last modification occurred 4 minutes after the event was generated.

#

So it is possible this webhook endpoint just missed this event

primal tangle
#

No, I enabled it more than an hour ago and didn't touch it afterwards.

azure epoch
#

You can trigger a resend using the CLI if you want to verify

primal tangle
#

Sure, thanks for your help. I have just one more question regarding Cash App.

On the frontend we use confirmCashappPayment to confirm the payment intent with handleActions: false and display the QR code ourselves.

Everytime the QR code expires (expires_at) we refresh it by re-fetching the payment intent using retrievePaymentIntent.

Is that implementation correct or should we use some other way of refreshing the QR code?

Because, randomly, we get the following error:

azure epoch
#

In that case your integration may be making multiple calls to the Payment Intent. This occurs when the object is locked while changes are propagating, to ensure the data returned is accurate. I would recommend reviewing your front-end code and make sure your API calls for the same Intent are triggered sequentially

primal tangle
#

I double checked, only one call is made every 30 or so seconds (depending on the expires_at).

We don't access the payment intent anywhere else, only get information through the webhook events.

I'll triple check, maybe there's some React magic happening in production build that I'm missing...

azure epoch
#

Hmmm .. ๐Ÿค”

React hooks do have a way of triggering code more often than expected. Adding some logging around the API calls might be a good approach to identifying this.

primal tangle
#

We avoid hooks as much as possible, but I see your point. I'll take a look.

Thanks for your help!

It's good to know that webhooks will work properly, as no one has touched or will touch the prod endpoint in forever. And that our implementation is at least okay in theory.

Thanks again!

azure epoch
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚