Connect to AI
Payments Basic Auth

Braintree REST API

Payment gateway for online and mobile commerce

Braintree is a full-stack payment platform that enables businesses to accept payments online and in mobile apps. It provides a single integration for credit cards, PayPal, Venmo, Apple Pay, Google Pay, and other payment methods. Developers use Braintree for its robust fraud protection, extensive payment method support, and seamless checkout experiences.

Base URL https://api.braintreegateway.com

API Endpoints

MethodEndpointDescription
POST/merchants/{merchant_id}/transactionsCreate a new transaction to process a payment
GET/merchants/{merchant_id}/transactions/{transaction_id}Retrieve details of a specific transaction, including status, amount, and payment method used.
POST/merchants/{merchant_id}/transactions/{transaction_id}/refundRefund a settled transaction, optionally specifying a partial amount to return.
POST/merchants/{merchant_id}/transactions/{transaction_id}/voidVoid an unsettled transaction, preventing it from being submitted for settlement.
POST/merchants/{merchant_id}/customersCreate a new customer record in the vault, optionally including payment methods.
GET/merchants/{merchant_id}/customers/{customer_id}Retrieve a customer and their stored payment methods
PUT/merchants/{merchant_id}/customers/{customer_id}Update customer information such as name, email, or associated payment methods.
DELETE/merchants/{merchant_id}/customers/{customer_id}Delete a customer from the vault, removing all associated payment methods.
POST/merchants/{merchant_id}/payment_methodsCreate a new payment method for a customer, requires customer_id and payment_method_nonce.
DELETE/merchants/{merchant_id}/payment_methods/{token}Delete a stored payment method using its unique token identifier.
POST/merchants/{merchant_id}/subscriptionsCreate a recurring subscription with a plan_id and payment_method_token.
PUT/merchants/{merchant_id}/subscriptions/{subscription_id}Update an existing subscription, such as changing the plan or payment method.
POST/merchants/{merchant_id}/subscriptions/{subscription_id}/cancelCancel a subscription immediately or at the end of the current billing period.
GET/merchants/{merchant_id}/disputes/{dispute_id}Retrieve details of a payment dispute, including status, reason, and evidence deadlines.
POST/merchants/{merchant_id}/client_tokenGenerate a client token for client-side authorization in Drop-in UI or hosted fields.

Code Examples

curl -X POST https://api.braintreegateway.com/merchants/your_merchant_id/transactions \
  -u public_key:private_key \
  -H 'Content-Type: application/xml' \
  -d '<?xml version="1.0" encoding="UTF-8"?>
<transaction>
  <type>sale</type>
  <amount>10.00</amount>
  <payment-method-nonce>fake-valid-nonce</payment-method-nonce>
  <options>
    <submit-for-settlement>true</submit-for-settlement>
  </options>
</transaction>'

Use Braintree from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for Braintree. Paste your Braintree API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Braintree directly with your credentials — no local install, works on mobile.

process_payment Process a one-time payment transaction with amount, payment method, and customer details
create_subscription Set up a recurring subscription with specified plan, payment method, and billing cycle
refund_transaction Issue a full or partial refund for a settled transaction
manage_customer_vault Create, update, or retrieve customer records and stored payment methods in the vault
handle_dispute Retrieve dispute information and submit evidence for chargebacks

Connect in 60 seconds

Paste your Braintree key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect Braintree to your AI →

Related APIs