Docs
Sign in

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.

Screenshot to add: The Add Stripe window with the Secret or restricted API key box.

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_ or rk_test_ are test. Keys starting sk_live_ or rk_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 (starts whsec_) 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

  1. Open My Connectors

    Go to Settings > Connectors. The page is called My Connectors.

  2. Find the Stripe card

    Look for Stripe. If it is missing, an admin has not switched it on yet. It has an Add button.

  3. 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.

  4. 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 nameWhat it doesRead or Write
stripe_list_customersLists customers. The email filter must match exactly. Usually the first call.Read
stripe_get_customerGets one customer. Does not include subscriptions or invoices.Read
stripe_searchSearches customers, invoices, subscriptions, charges, payments, prices or products with Stripe's query language.Read
stripe_list_subscriptionsLists subscriptions. With no status given, cancelled ones are left out.Read
stripe_get_subscriptionGets one subscription in full, including renewal date and any scheduled cancellation.Read
stripe_list_invoicesLists invoices. Can filter by customer, subscription, status, collection method and dates.Read
stripe_get_invoiceGets one invoice with totals, status and payment and PDF links.Read
stripe_list_productsLists the products you sell.Read
stripe_list_pricesLists prices. Subscriptions are created from a price, not a product.Read
stripe_list_paymentsLists payments (Stripe calls them PaymentIntents).Read
stripe_get_paymentGets one payment, showing the amount requested, the amount received and any decline reason.Read
stripe_list_refundsLists refunds. Should be checked before any refund.Read

Everyday writes

Tool nameWhat it doesRead or Write
stripe_create_customerCreates a customer record. Does not charge anything or add a card.Write (needs approval)
stripe_update_customerChanges a customer's details. An empty value clears the field.Write (needs approval)
stripe_create_invoiceStarts a draft invoice. Nothing is sent or charged.Write (needs approval)
stripe_create_invoice_itemAdds a line to a draft invoice, or to the customer's next invoice.Write (needs approval)
stripe_update_subscriptionChanges a subscription, such as plan or seats. Can also schedule or undo a cancellation at period end.Write (needs approval)

Irreversible writes

Tool nameWhat it doesRead or Write
stripe_create_subscriptionStarts a subscription. Unless billed by invoice, it tries to charge the customer straight away.Write (needs approval, irreversible)
stripe_send_invoiceFinalizes a draft invoice and emails it. A finalized invoice can only be voided.Write (needs approval, irreversible)
stripe_create_refundRefunds a payment, in full or in part. The money cannot be recalled.Write (needs approval, irreversible)
stripe_cancel_subscriptionCancels a subscription immediately. A new subscription is needed to restore it.Write (needs approval, irreversible)
stripe_void_invoiceVoids 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 effect result 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 fraudulent adds 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.