#ebellotpu6

1 messages · Page 1 of 1 (latest)

thorn basinBOT
hidden lagoon
#

the fact is that the customer made a booking at 10 o'clock. He was then reimbursed and later, at 11 a.m., he tried again. Then my query to see if there was any paymentIntent with the same data returned yes, and so he was not charged the initial payment.

#

GET /v1/payment_intents/search

#

{
"limit": "1",
"query": "status:'succeeded' AND customer:'cus_PLgHEXdLZkA80j' AND metadata['centerId']:'ES_Barcelona_2' AND metadata['storageId']:'70' AND metadata['invoiceType']:'deposit'"
}

#

Is there a field I can add to the filter so that it does not return any paymentIntent in refunded status?

strange otter
#

So you want to exclude payment intent which is refunded?

#

Look at its latest_charge's refunded property

hidden lagoon
#

yes, thats it. Where I can find this property?

#

this is the response I got to the above query

strange otter
#

Here inside your Charge above

hidden lagoon
#

I understand, I have to filter the answer, I can't add one more field to this filter, can I?
GET /v1/payment_intents/search
{
"limit": "1",
"query": "status:'succeeded' AND customer:'cus_PLgHEXdLZkA80j' AND metadata['centerId']:'ES_Barcelona_2' AND metadata['storageId']:'70' AND metadata['invoiceType']:'deposit'"
}

strange otter
#

Um not sure whether that's possible. You would want to do an additional filter on the response you got

hidden lagoon
#

no, I would prefer to add the filter to the query.