#si-balancetransaction
1 messages · Page 1 of 1 (latest)
when we create a refund we get an id back that starts with 're_' but the refund object I'm getting back in the Balance transaction has an id of 'pyr_' we are using stripe connect so it may be connected to that. Im just wondering the best way of linking them
https://stripe.com/docs/expand/use-cases#charges-in-payout helps with this but you need to understand the data model.
if it's a Destination charge then you have these objects
platform:
Charge ch_xxx
Transfer re_xxx
connected account:
payment py_xxx <--- this is the funds from the transfer arriving
when you issue a refund and use the reverse_transfer option you end up with this :
platform:
Refund re_xxx
TransferReversal trr_xxx
connected account:
PaymentRefund pyr_xxx <--- this is the transfer being reversed
the pyr_xxx should link to the trr_xxx (https://stripe.com/docs/api/refunds/object#refund_object-source_transfer_reversal) and then that links to the re_xxx (https://stripe.com/docs/api/transfer_reversals/object#transfer_reversal_object-source_refund)