#zuohao

1 messages · Page 1 of 1 (latest)

mighty tulipBOT
high elk
#

hello! are you only collecting card payments? or you're accepting other types of payments as well?

digital wigeon
#

Credit card, WeChat Pay, and Alipay.

#

Not only credit card payments.

high elk
digital wigeon
#

[{"amount":100,"balanceTransaction":"txn_1NGcIT2eZvKYlo2Cjc0Y05dv","charge":"py_3NGcH92eZvKYlo2C18fJG4hE","created":1686205573,"currency":"usd","id":"pyr_1NGcIT2eZvKYlo2CAC6tAhqB","metadata":{},"object":"refund","paymentIntent":"pi_3NGcH92eZvKYlo2C1yoFTJ3B","status":"pending","testHelpers":{}}]

high elk
#

the charge.refund.updated event reflects the charge status

#

it doesn't display the the refund(s) and their corresponding status if you're using v2022-11-15 API or newer

#

you need to retrieve the refund to view what's the status of the relevant refund like i've mentioned

mighty tulipBOT
digital wigeon
#

I tried using the charge.refund.updated event to listen for successful refunds, but in the testing environment, I often don't receive this event even though the refund API call is successful.

muted dock
#

What's the re_xxx ID?

digital wigeon
#

I only have pyr_1NGcZI2eZvKYlo2CLlPxTFfC and py_3NGcH92eZvKYlo2C18fJG4hE.

#

The refund did not receive the charge.refund.updated callback event.

muted dock
#

So depends what you mean by 'don't receive this event'

digital wigeon
#

Will I receive the charge.refund.updated event every time I initiate a refund, regardless of the payment method used?

high elk
#

@digital wigeon sorry i made a mistake earlier - charge.refunded reflects the Charge object and doesn't auto expand the refunds parameters.

charge.refund.updated would reflect the refund object.

digital wigeon
#

I double-checked, and I did receive the charge.refund.updated event at 2023-06-08 14:50:06. However, I initiated the refund at 2023-06-08 14:43:35, which is a difference of almost 6 minutes. This made me think that I missed the charge.refund.updated event. Is this time interval normal?

digital wigeon
muted dock
#

Sure, refunds can be async so there can be a delay (and why we support that event in the first place)

digital wigeon
#

In the "charge.refund.updated" event, if the status of the refund object is "succeeded," can I confirm that the refund has been successful? If the refund fails, what would be the status of this event, or is there a document with status enumerations available?

muted dock
#

if the status of the refund object is "succeeded," can I confirm that the refund has been successful
Sure, that's what the status field denotes
If the refund fails, what would be the status of this event, or is there a document with status enumerations available?
It'd be failed: https://stripe.com/docs/api/refunds/object#refund_object-status