#Jasuno
1 messages · Page 1 of 1 (latest)
👋 Hello! You're basically just trying to get from a py_123 object on a connected account back to the original Invoice on a platform account, right?
Yeah, the original invoice has the metadata i need which is some IDs to object in our data base, if i can get the invoice or have that metadata in the payment (py_xxxxx...) then that would solve my problem
You should be able to retrieve the py_123 object on the connected account and expand source_transfer.source_transaction.invoice
The source_transfer will give you back the original Transfer object on the platform -> the source_transaction is the Charge tied to that transfer -> and now that you have the Charge object you can get the Invoice
Ok so im in the right direction my expand looks like thisdata.source.source_transfer.source_transaction but because i can it seems like data is required and i can only go 4 levels deep in not able to go all the way to invoice
Ah yeah if you're going from listing all balance transaction then you'll have to start with data.source
Yeah thats why i was thinking maybe there is another way i may not be thinking about or somthing
Yeah the best option I can think of is listing Charges instead of Balance Transactions
You could alternatively update the Charge or Transfer with the right metadata whenever the Invoice is paid (so that it's easy to check again later)
Mmmmmmm the page is a wallet for the customer, if i do that then i would have to also get the payouts separately and any or transactions that the balance transactions provide
and do you know if the charge will have access to the invoice information?
Invoice metadata doesn't get copied to the Charge, but the Charge has an invoice param with the Invoice ID that you can use to retrieve the Invoice
Ok that helps, ill setup a webhook to add the metadata to the charge thanks