#Dov
1 messages · Page 1 of 1 (latest)
Hi there, what you mean by have no way of retrieving this.?
I would have to run an API call again to be able to do this. The issue however is that I have no way of filtering out paid only. I would simply be cycling over the same records.
Is there a way to retrieve only checkouts with the paid status? I would use payments but payments doesn't have the line details so I can't reconcile.
There's no API to filter checkout sessions by status.
It's recommended to use webhooks for checkout order fulfillment (https://stripe.com/docs/payments/checkout/fulfill-orders) is there anything blocking from using webhooks?
The real issue stemmed from the fact that a checkout was received via the API as unpaid. When I make the call again now to that same checkout session it shows as paid and I don't see any history in the payment of it being unpaid.
How is that possible?
Can a status change at a later date?
Share with me the checkout session ID
Sure.
Yes, it's 100% possible and that's why we recommend using webhook
pi_3LfyICGovY9Qvzsj0tneH3eh
If that's the only option then I'm going to have to set that up. I was hoping to avoid it.
Can you see any other activity where it was unpaid?
One sec, do you wish to filter the checkout session of PaymentIntents? Because status is a query field available for PaymentIntents search API (https://stripe.com/docs/search#query-fields-for-payment-intents)
Most important (to be able to reconcile) is the client_reference_id from the checkout API. I don't see this under paymentIntents unless I'm missing something?
Or are you saying to run an API call for all paymentIntents based on the success and then run a nested API call to that checkout session for the data such as the client_reference_id?
Hmm, I'll suggest you to set a metadata (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata) to the PaymentIntent when create a checkout session, so that you can use the metadata to reconcile later.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
metadata is also one of the query fields for PaymentIntents search API
Ok, I'm going to have a look at this.
Oh, this is already what I have done hence my mention of client_reference_id.
So I can use this for the pamentIntent API is what you are suggesting?
Not exactly the same, he client_reference_id is not passed down to the paymentIntent, and that's why I suggest you to use PaymentIntent's metadata, which you can specify one when creating a checkout session.
I'm pretty sure this is what I did when setting up the checkout. I'll have a look again tomorrow as the search paymentIntents API looks like it will be helpful if so.