#lucynoodles20
1 messages · Page 1 of 1 (latest)
Hi 👋
We only expose the idempotency key in the Logs section of the Dashboard.
What requests are you interested in tracking?
I see. Okay, we can probably design another way to monitor it. I'll decide with my team if that's necessary.
Looking to monitor for creation of Payment Intents. We have retry logic that occasionally results in double charges. We want to add idempotency keys to prevent that but also want to make sure that this doesn't accidentally result in suppressing legitimate retries.
Okay and is there a reason you wouldn't just log this in the response to the API call to create the PI?
What do you mean? My understanding is that the info is in the header, which is not something we currently touch in the main logic
Well you can programmatically set the idempotency key directly in the API request: https://stripe.com/docs/api/idempotent_requests
I meant in Stripe's response. Whether it is a replay is in the header
We can log it yes
Was just checking to see if it's already there in the dashboard
I just tested this myself with the Python client library. I can print all the headers by writing payment_intent.last_response.headers.
I haven't yet figured out how to do this in Rails
We have an example of how to access the response object using stripe-ruby here: https://github.com/stripe/stripe-ruby#accessing-a-response-object