Braintree Connection
The Braintree connection integrates your Braintree payment gateway with OpsTower, giving agents the ability to search transactions for revenue analysis, query subscriptions with MRR calculations, monitor disputes and chargebacks, and search the customer vault. All operations are read-only.
Prerequisites
Section titled “Prerequisites”You need a Braintree account (PayPal-owned) with API access. Both production and sandbox environments are supported.
Credentials Required
Section titled “Credentials Required”To set up a Braintree connection, you need:
- Merchant ID — your Braintree merchant identifier
- Public Key — API public key for authentication
- Private Key — API private key for authentication
- Environment — production or sandbox
How to Find Your Braintree API Keys
Section titled “How to Find Your Braintree API Keys”- Log in to your Braintree Control Panel (production:
braintreegateway.com, sandbox:sandbox.braintreegateway.com). - Go to Settings > API.
- Find your Merchant ID at the top of the page.
- Under API Keys, click Generate New API Key.
- Copy the Public Key and Private Key.
Setup in OpsTower
Section titled “Setup in OpsTower”- Go to Connections > Payments > Add Connection.
- Select Braintree.
- Choose your Environment (production or sandbox).
- Enter your Merchant ID, Public Key, and Private Key.
- Click Test Connection to verify the credentials.
- Click Save.
What Agents Can Do
Section titled “What Agents Can Do”Once connected, agents have access to four tools:
- Query Transactions (GraphQL API) — search settled transactions for revenue analysis, filter by status, date range, and amount. Supports statuses: SETTLED, SUBMITTED_FOR_SETTLEMENT, AUTHORIZED, VOIDED, FAILED, PROCESSOR_DECLINED, GATEWAY_REJECTED
- Query Subscriptions (REST API) — list subscriptions by status (Active, Canceled, PastDue, Pending, Expired) with MRR calculation from active subscriptions
- Query Disputes (GraphQL API) — search disputes and chargebacks by status (OPEN, WON, LOST, ACCEPTED, EXPIRED) with reply deadlines and linked transaction details
- Query Customers (REST API) — search the customer vault by email, name, or date range with payment methods on file
Important: All monetary amounts from Braintree are in full currency units (dollars), not cents. A value of 10.00 means $10.00.
Use Cases
Section titled “Use Cases”- “How much revenue did we process in Braintree last month?”
- “Show me all settled transactions above $500 this week”
- “What disputes are currently open and when do we need to respond?”
- “How many active subscriptions do we have and what’s the MRR?”
- “Find customer john@example.com in the Braintree vault”
Troubleshooting
Section titled “Troubleshooting”- Authentication errors — Braintree GraphQL always returns HTTP 200; authentication errors appear in the response body. Verify all three credentials (Merchant ID, Public Key, Private Key) are correct
- Subscriptions not found — subscription search uses the Braintree REST API (not GraphQL) since GraphQL subscription search is not yet available
- Sandbox vs production — make sure your credentials match the selected environment