Access to Payments Table on dashboard via code?

I’m also not quite sure which ID field I should be using to represent a payment. I want the _id field of my database Payments table to be one of these ids and then it would be a bit easier programmatically. I don’t quite understand the difference between the two.

event.transactionId – This is the Provider Payment ID in downloaded Payments Table
event.payment.id – This is the Order ID in downloaded Payments Table.

The docs say the Order ID could be associated with multiple payables so I’m guessing the Provider Payment ID is better to use, but the example in the Wix documentation here:
https://www.wix.com/velo/reference/wix-pay-backend/events/onpaymentupdate
uses event.payment.id :

export function wixPay_onPaymentUpdate(event) {
5  let paymentId = event.payment.id;
6  let newTransactionStatus = event.status;
7}

Maybe it doesn’t matter which one I use.