There actually is a plug-and-play solution for this: https://www.tracklution.com/stripe-conversion-tracking/
You basically have to do only few steps:
- Implement tracking script to your website () (with DNS setting you can make it 1st-party) --> Traclution saves and stores GCLIDs for you
- Redirect users back to your website from Stripe: example.com/thank-you/?stripe_session_id={CHECKOUT_SESSION_ID} (configured in Stripe)
- Set up webhook in Stripe that triggers on checkout.session.completed event and delivers Purchase data back to Tracklution
- Connect Google Ads API with your Tracklution account (few clicks in Tracklution dashboard)
--> Tracklution will tie together the website session with GCLID and Purchase data from Stripe, and send the Purchases back to Google Ads
More documentation/detailed instructions: https://docs.tracklution.com/installation/stripe-integration
With it you can use also other platforms, like send data to GA4 or Facebook Conversion API.