Log Stripe payments to a Notion database
A Stripe + Notion agent flow
Finance lives in Stripe, but the rest of the company reads Notion. This recipe closes that gap by having your agent copy new payments into a Notion database the team can sort, filter, and annotate. It reads recent activity with Stripe's list_payment_intents, then writes one Notion page per payment with notion-create-pages, mapping amount, customer, and status onto the columns you defined. The payoff is a revenue table a non-engineer can actually open, kept current by an agent instead of a Monday-morning CSV export. The Stripe server returns data when asked, so the agent syncs on the cadence you set, and you choose the grain: a page per payment, or one daily batch.
The flow
list_payment_intentsLists PaymentIntents on the account.
notion-create-pagesCreates one or more Notion pages with specified properties and content.
Step by step
- Build the Notion database
Create a database with the columns you want to track, such as amount, customer, status, and date, so the agent has real properties to map onto.
- Read recent payments
The agent calls list_payment_intents, bounded to a time window, and reads back the amount, customer, and status of each payment.
- Write one page per payment
It calls notion-create-pages with those fields mapped to your columns, skipping any payment ID it has already logged.
Tell your agent
Once a day, list Stripe payment intents from the last 24 hours that succeeded, and add a row to the Revenue database in Notion for each one with amount, customer ID, status, and date. Don't duplicate payments already logged.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- list_payment_intents returns amounts in the smallest currency unit, so 4200 means $42.00. Have the agent divide by 100 before writing to Notion, or the figures read a hundred times too large.
- Stripe orders results newest first and paginates them. Bound a daily sync to a time window so the agent doesn't walk the whole account history on every run.
- notion-create-pages needs the target database ID and exact column names. Give the agent both up front so the fields land in the right place.
Questions
- Does it double-log payments?
- Not if you give it a key. Have the agent store each Stripe payment ID in a Notion property and skip any ID that already exists before it creates a page.
- Why payment intents and not charges?
- A PaymentIntent is the object Stripe tracks a payment through from start to finish, so list_payment_intents is the closest read to what actually got paid. If you bill on invoices, swap in list_invoices instead.
- Can it update a row when a payment is refunded?
- Reads and creates are the simple path here. Updating means matching the refund back to a logged page: the agent searches the database for the payment ID, then calls notion-update-page.