@MelixMalaysia You dont need the API or an app for this. Its already in a native export, just not the one you used.
The Payment ID sits in the Orders export, not the Transaction histories export. Thats the whole confusion. On the Orders page you clicked Export and then Export transaction histories. Go back and click Export orders instead.
Shopify documents both file structures here, and its worth sending this link to your accountant too:
https://help.shopify.com/en/manual/fulfillment/managing-orders/exporting-orders
Scroll to Order export CSV structure and youll find two columns that solve this.
Payment ID. Shopifys own description is a unique ID sent by Shopify to payment providers when a customer pays at checkout, and it says outright to use this ID to match order information between Shopify and your payment provider. Successful or pending payments only, no captures or refunds.
Payment References. Same thing but complete, including failed payments, refunds and captures. For accounting reconciliation this is usually the one you actually want. Theres also an older Payment Reference in the singular which the docs mark as deprecated, so ignore that one.
Two things to warn your accountant about before they open the file.
An order can have more than one payment id, and when it does they all sit in one cell separated by a space, a plus sign, then another space. Those cells need splitting before anything will match.
Orders with several products are spread across multiple rows, one per line item, and Shopify leaves most fields blank on the extra rows. So the payment id shows on the first row of an order and nothing after it. Sort by order name and fill down, otherwise it looks like most of your orders have no payment id at all and thats where people give up.
Also worth knowing, on the same page under Transaction history CSV structure you can see exactly why that export was never going to work. It only has ten columns and none of them is an id. It also only contains captured payment data, authorisation data is left out completely.
Last thing, since the Payouts report came up above. That only exists on Shopify Payments, and Malaysia isnt on Shopifys supported countries list, so it wont apply to you.