Payment_id on order vs gateway mismatch on some orders?

HI,

we’re using Stripe as our payment gateway, and for financial/accounting purposes match data from Stripe with Shopify order data. We’ve been succesfully doing it for 2+ years but now see some strange behavior in the data.

We use “Payment_id” field found in Shopify order export data (CSV generated through Orders - Export - Orders by date to match with "order_id" metadata found in Stripe.

This method worked without issues, only now with some (maybe 5%) of successful transactions it doesn’t:

  • the payment_id in Shopify Order export is completely different (i.e. rtGuae6JyOoUDwA0AoKrRoQDM)

  • stripe shows order_id as rjeTEZSNddbE5YDy2DiSmcKrT

  • back in Shopify, it’s definitely the correct transaction, as the order metadata also shows “order_id”=>“rjeTEZSNddbE5YDy2DiSmcKrT”

So my question is - why is the “Payment_ID” data found in Order Export equal to “order_id” for most transactions, and sometimes completely different? If they differ, how can we get the “order_id” to display in the Order Export data files?