Stripe to MySQL: Charge Ledger Sync Template

A scheduled Spojit workflow that lists recent Stripe charges and inserts them into a MySQL ledger table so finance can run SQL reports on your payment data.

What It Builds

A Schedule trigger fires on a cron you set (for example, every weekday morning). A Connector node on the stripe connector calls list-charges to pull recent charges, a Loop node iterates each charge, and a Connector node on the mysql connector calls insert-rows to write each charge into a ledger table. The result is a MySQL table your finance team can query directly with SQL.

The Prompt

Paste this into Miraxa, the intelligent layer across your automation, and it builds the workflow, connecting the tools for you:

Build a workflow that runs every weekday at 7am Australia/Sydney time, lists Stripe charges created in the last day, and for each charge inserts a row into the MySQL table "charge_ledger" with the charge id, amount, currency, status, customer id, and created date so finance can report on payments in SQL.

Connectors Used

  • Schedule trigger - runs the sync on a 5-field cron with an IANA timezone (for example 0 7 * * 1-5, Australia/Sydney).
  • stripe - list-charges retrieves recent charges from your Stripe account.
  • mysql - insert-rows writes each charge as a row into your ledger table.

Customize It

Change the cron expression and timezone to match your reporting cadence, swap the table name charge_ledger for your own, and edit the field list so each row carries exactly the columns your finance reports need. To narrow the pull, tell Miraxa which charge status to keep (for example only succeeded charges) or widen the lookback window past one day. If duplicate rows are a concern across runs, ask Miraxa to use the mysql update-rows tool on the charge id instead so re-runs upsert rather than duplicate.

Tips

  • Keep the Stripe step in Direct mode: listing charges is a predictable single-tool call, so you avoid AI credit cost and get deterministic output.
  • Stripe amounts are in the smallest currency unit (for example cents). Store the raw value and divide in your SQL reports, or add a Transform node to convert before insert.
  • Create the charge_ledger table and its columns in MySQL first, then use the mysql describe-table tool while building so your field mapping matches the schema exactly.

Related

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.