Stripe
Stripe is an online payments and billing service, and the Stripe connector lets TAO look up customers, invoices, subscriptions and payments, and make billing changes with a person's approval.
What you can do
Illustrative examples of what you might ask TAO:
- "Find the Stripe customer with this email."
- "What invoices are unpaid?"
- "Did Acme's payment go through? Why was it declined?"
- "Which subscriptions are past due?"
- "Refund Acme's last payment."
TAO can read widely. Anything that changes billing or moves money waits for a person to approve it.
Before you connect
- A Stripe account. Test mode works as soon as the account exists. Live mode needs Stripe's own business checks first.
- An API key. An API key is a secret code that lets a program use your Stripe account. Create one in Stripe under Developers > API keys. A restricted key is recommended. It lets you grant only the permissions TAO needs. A full secret key also works.
- The key decides test or live. The start of the key says which world it belongs to. Keys starting
sk_test_orrk_test_are test. Keys startingsk_live_orrk_live_are live. There is no separate setting. Test and live data are completely separate. - Do not paste the wrong key type. A publishable key (starts
pk_) and a webhook signing secret (startswhsec_) are often pasted by mistake. Neither works. - Permissions on a restricted key. If a restricted key lacks a permission, Stripe answers "not allowed" (not "wrong key"). Add that permission in the Stripe dashboard. The product code does not list which permissions each tool needs.
Connect it
Open My Connectors
Go to Settings > Connectors. The page is called My Connectors.
Find the Stripe card
Look for Stripe. If it is missing, an admin has not switched it on yet. It has an Add button.
Paste your key
In the box labelled Secret or restricted API key, paste the key. The box is masked. There are no other settings to fill in.
Save
Optionally add a Label, such as "Stripe test". Click Save. A red message appears in the window if something is wrong.
Tools
Reads run straight away. Every write is queued and waits for a person to approve it. Five writes cannot be undone and always need a person, even in a chat that normally skips approvals.
Reads
| Tool name | What it does | Read or Write |
|---|---|---|
stripe_list_customers | Lists customers. The email filter must match exactly. Usually the first call. | Read |
stripe_get_customer | Gets one customer. Does not include subscriptions or invoices. | Read |
stripe_search | Searches customers, invoices, subscriptions, charges, payments, prices or products with Stripe's query language. | Read |
stripe_list_subscriptions | Lists subscriptions. With no status given, cancelled ones are left out. | Read |
stripe_get_subscription | Gets one subscription in full, including renewal date and any scheduled cancellation. | Read |
stripe_list_invoices | Lists invoices. Can filter by customer, subscription, status, collection method and dates. | Read |
stripe_get_invoice | Gets one invoice with totals, status and payment and PDF links. | Read |
stripe_list_products | Lists the products you sell. | Read |
stripe_list_prices | Lists prices. Subscriptions are created from a price, not a product. | Read |
stripe_list_payments | Lists payments (Stripe calls them PaymentIntents). | Read |
stripe_get_payment | Gets one payment, showing the amount requested, the amount received and any decline reason. | Read |
stripe_list_refunds | Lists refunds. Should be checked before any refund. | Read |
Everyday writes
| Tool name | What it does | Read or Write |
|---|---|---|
stripe_create_customer | Creates a customer record. Does not charge anything or add a card. | Write (needs approval) |
stripe_update_customer | Changes a customer's details. An empty value clears the field. | Write (needs approval) |
stripe_create_invoice | Starts a draft invoice. Nothing is sent or charged. | Write (needs approval) |
stripe_create_invoice_item | Adds a line to a draft invoice, or to the customer's next invoice. | Write (needs approval) |
stripe_update_subscription | Changes a subscription, such as plan or seats. Can also schedule or undo a cancellation at period end. | Write (needs approval) |
Irreversible writes
| Tool name | What it does | Read or Write |
|---|---|---|
stripe_create_subscription | Starts a subscription. Unless billed by invoice, it tries to charge the customer straight away. | Write (needs approval, irreversible) |
stripe_send_invoice | Finalizes a draft invoice and emails it. A finalized invoice can only be voided. | Write (needs approval, irreversible) |
stripe_create_refund | Refunds a payment, in full or in part. The money cannot be recalled. | Write (needs approval, irreversible) |
stripe_cancel_subscription | Cancels a subscription immediately. A new subscription is needed to restore it. | Write (needs approval, irreversible) |
stripe_void_invoice | Voids an open invoice. A voided invoice can never be paid or reopened. | Write (needs approval, irreversible) |
Total: 22 tools, 12 reads and 10 writes (5 everyday and 5 irreversible).
Limits and good to know
- Live mode always asks. In live mode, no write skips approval, whatever its type. The approval message opens with a warning that real money moves. The product notes say everyday writes in test mode can skip approval in a bypass-mode chat.
- Read first, then confirm values. Refunds, cancellations and voids re-read their target and refuse unless the values TAO gives match. A refund needs the customer and the payment's total. A cancellation needs the customer and one price ID from the subscription. A void and a send need the customer and the invoice total. The check runs when queued and again on approval.
- Success is not always success. Stripe can return success when the money has not moved. A refund can be pending or failed. A new subscription can be incomplete if the first payment is declined. A test-mode send emails nobody. Every write carries an
effectresult that says which happened, and TAO is told to report it. - Amounts are in the smallest unit. Stripe amounts are whole numbers of cents or the currency's smallest unit. The connector shows real amounts in results and approval cards.
- Cancelled subscriptions hide by default. A list with no status leaves cancelled subscriptions out. Pass the status all before concluding someone never subscribed.
- Search is a little behind. Stripe search can lag writes by up to a minute. A brand-new customer may not show up yet.
- Only the first invoice lines come back. A long invoice returns only a few lines. Use its own total, not a sum of the lines shown.
- Fraud reason is not just a label. Choosing the refund reason
fraudulentadds the customer's card and email to your block lists. Choose it only when it is true. - Duplicate protection. One approval carries one Stripe idempotency key, so clicking Approve twice does not refund twice. Keys last about 24 hours.
- Not offered. Deleting customers, creating or capturing payments, coupons, payment links, disputes, credit notes and payouts are not tools.
- Readiness. The product notes mark this as built and landed switched off. An admin turns it on. Test with a
rk_test_key first.