braintree · Capability

Braintree Payments API

The Braintree Payments API is the core server-side interface for accepting and processing payments through Braintree's gateway. It enables developers to create and manage transactions, handle authorizations and captures, and process refunds and voids. The API supports a wide range of payment methods including credit and debit cards, PayPal, Apple Pay, Google Pay, and Venmo. Authentication uses HTTP Basic auth with the merchant's public key as the username and private key as the password. All requests and responses use XML or JSON depending on the SDK and endpoint variant used.

Run with Naftiko BraintreeAPI

What You Can Do

POST
Createtransaction — Create a transaction
/transactions
GET
Gettransaction — Get a transaction
/transactions/{transactionId}
PUT
Submittransactionforsettlement — Submit transaction for settlement
/transactions/{transactionId}/submit_for_settlement
PUT
Voidtransaction — Void a transaction
/transactions/{transactionId}/void
POST
Refundtransaction — Refund a transaction
/transactions/{transactionId}/refund
POST
Generateclienttoken — Generate a client token
/client_token
POST
Createcustomer — Create a customer
/customers
GET
Getcustomer — Get a customer
/customers/{customerId}
PUT
Updatecustomer — Update a customer
/customers/{customerId}
DELETE
Deletecustomer — Delete a customer
/customers/{customerId}
POST
Createpaymentmethod — Create a payment method
/payment_methods
GET
Getpaymentmethod — Get a payment method
/payment_methods/any/{paymentMethodToken}
PUT
Updatepaymentmethod — Update a payment method
/payment_methods/any/{paymentMethodToken}
DELETE
Deletepaymentmethod — Delete a payment method
/payment_methods/any/{paymentMethodToken}
GET
Listdisputes — List disputes
/disputes
GET
Getdispute — Get a dispute
/disputes/{disputeId}
PUT
Acceptdispute — Accept a dispute
/disputes/{disputeId}/accept

MCP Tools

createtransaction

Create a transaction

gettransaction

Get a transaction

read-only idempotent
submittransactionforsettlement

Submit transaction for settlement

idempotent
voidtransaction

Void a transaction

idempotent
refundtransaction

Refund a transaction

generateclienttoken

Generate a client token

createcustomer

Create a customer

getcustomer

Get a customer

read-only idempotent
updatecustomer

Update a customer

idempotent
deletecustomer

Delete a customer

idempotent
createpaymentmethod

Create a payment method

getpaymentmethod

Get a payment method

read-only idempotent
updatepaymentmethod

Update a payment method

idempotent
deletepaymentmethod

Delete a payment method

idempotent
listdisputes

List disputes

read-only idempotent
getdispute

Get a dispute

read-only idempotent
acceptdispute

Accept a dispute

idempotent

Capability Spec

braintree-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Braintree Payments API
  description: The Braintree Payments API is the core server-side interface for accepting and processing payments through
    Braintree's gateway. It enables developers to create and manage transactions, handle authorizations and captures, and
    process refunds and voids. The API supports a wide range of payment methods including credit and debit cards, PayPal,
    Apple Pay, Google Pay, and Venmo. Authentication uses HTTP Basic auth with the merchant's public key as the username and
    private key as the password. All requests and responses use XML or JSON depending on the SDK and endpoint variant used.
  tags:
  - Braintree
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: braintree
    baseUri: https://api.braintreegateway.com/merchants/your_merchant_id
    description: Braintree Payments API HTTP API.
    authentication:
      type: basic
      username: '{{BRAINTREE_USERNAME}}'
      password: '{{BRAINTREE_PASSWORD}}'
    resources:
    - name: transactions
      path: /transactions
      operations:
      - name: createtransaction
        method: POST
        description: Create a transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: transactions-transactionid
      path: /transactions/{transactionId}
      operations:
      - name: gettransaction
        method: GET
        description: Get a transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: transactions-transactionid-submit-for-settlement
      path: /transactions/{transactionId}/submit_for_settlement
      operations:
      - name: submittransactionforsettlement
        method: PUT
        description: Submit transaction for settlement
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: transactions-transactionid-void
      path: /transactions/{transactionId}/void
      operations:
      - name: voidtransaction
        method: PUT
        description: Void a transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: transactions-transactionid-refund
      path: /transactions/{transactionId}/refund
      operations:
      - name: refundtransaction
        method: POST
        description: Refund a transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: client-token
      path: /client_token
      operations:
      - name: generateclienttoken
        method: POST
        description: Generate a client token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers
      path: /customers
      operations:
      - name: createcustomer
        method: POST
        description: Create a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-customerid
      path: /customers/{customerId}
      operations:
      - name: getcustomer
        method: GET
        description: Get a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatecustomer
        method: PUT
        description: Update a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletecustomer
        method: DELETE
        description: Delete a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: payment-methods
      path: /payment_methods
      operations:
      - name: createpaymentmethod
        method: POST
        description: Create a payment method
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: payment-methods-any-paymentmethodtoken
      path: /payment_methods/any/{paymentMethodToken}
      operations:
      - name: getpaymentmethod
        method: GET
        description: Get a payment method
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatepaymentmethod
        method: PUT
        description: Update a payment method
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletepaymentmethod
        method: DELETE
        description: Delete a payment method
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: disputes
      path: /disputes
      operations:
      - name: listdisputes
        method: GET
        description: List disputes
        inputParameters:
        - name: status
          in: query
          type: string
          description: Filter disputes by current status.
        - name: received_date
          in: query
          type: string
          description: Filter disputes received on or after this date in YYYY-MM-DD format.
        - name: page
          in: query
          type: integer
          description: Page number for paginated results, starting at 1.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: disputes-disputeid
      path: /disputes/{disputeId}
      operations:
      - name: getdispute
        method: GET
        description: Get a dispute
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: disputes-disputeid-accept
      path: /disputes/{disputeId}/accept
      operations:
      - name: acceptdispute
        method: PUT
        description: Accept a dispute
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: braintree-rest
    description: REST adapter for Braintree Payments API.
    resources:
    - path: /transactions
      name: createtransaction
      operations:
      - method: POST
        name: createtransaction
        description: Create a transaction
        call: braintree.createtransaction
        outputParameters:
        - type: object
          mapping: $.
    - path: /transactions/{transactionId}
      name: gettransaction
      operations:
      - method: GET
        name: gettransaction
        description: Get a transaction
        call: braintree.gettransaction
        outputParameters:
        - type: object
          mapping: $.
    - path: /transactions/{transactionId}/submit_for_settlement
      name: submittransactionforsettlement
      operations:
      - method: PUT
        name: submittransactionforsettlement
        description: Submit transaction for settlement
        call: braintree.submittransactionforsettlement
        outputParameters:
        - type: object
          mapping: $.
    - path: /transactions/{transactionId}/void
      name: voidtransaction
      operations:
      - method: PUT
        name: voidtransaction
        description: Void a transaction
        call: braintree.voidtransaction
        outputParameters:
        - type: object
          mapping: $.
    - path: /transactions/{transactionId}/refund
      name: refundtransaction
      operations:
      - method: POST
        name: refundtransaction
        description: Refund a transaction
        call: braintree.refundtransaction
        outputParameters:
        - type: object
          mapping: $.
    - path: /client_token
      name: generateclienttoken
      operations:
      - method: POST
        name: generateclienttoken
        description: Generate a client token
        call: braintree.generateclienttoken
        outputParameters:
        - type: object
          mapping: $.
    - path: /customers
      name: createcustomer
      operations:
      - method: POST
        name: createcustomer
        description: Create a customer
        call: braintree.createcustomer
        outputParameters:
        - type: object
          mapping: $.
    - path: /customers/{customerId}
      name: getcustomer
      operations:
      - method: GET
        name: getcustomer
        description: Get a customer
        call: braintree.getcustomer
        outputParameters:
        - type: object
          mapping: $.
    - path: /customers/{customerId}
      name: updatecustomer
      operations:
      - method: PUT
        name: updatecustomer
        description: Update a customer
        call: braintree.updatecustomer
        outputParameters:
        - type: object
          mapping: $.
    - path: /customers/{customerId}
      name: deletecustomer
      operations:
      - method: DELETE
        name: deletecustomer
        description: Delete a customer
        call: braintree.deletecustomer
        outputParameters:
        - type: object
          mapping: $.
    - path: /payment_methods
      name: createpaymentmethod
      operations:
      - method: POST
        name: createpaymentmethod
        description: Create a payment method
        call: braintree.createpaymentmethod
        outputParameters:
        - type: object
          mapping: $.
    - path: /payment_methods/any/{paymentMethodToken}
      name: getpaymentmethod
      operations:
      - method: GET
        name: getpaymentmethod
        description: Get a payment method
        call: braintree.getpaymentmethod
        outputParameters:
        - type: object
          mapping: $.
    - path: /payment_methods/any/{paymentMethodToken}
      name: updatepaymentmethod
      operations:
      - method: PUT
        name: updatepaymentmethod
        description: Update a payment method
        call: braintree.updatepaymentmethod
        outputParameters:
        - type: object
          mapping: $.
    - path: /payment_methods/any/{paymentMethodToken}
      name: deletepaymentmethod
      operations:
      - method: DELETE
        name: deletepaymentmethod
        description: Delete a payment method
        call: braintree.deletepaymentmethod
        outputParameters:
        - type: object
          mapping: $.
    - path: /disputes
      name: listdisputes
      operations:
      - method: GET
        name: listdisputes
        description: List disputes
        call: braintree.listdisputes
        outputParameters:
        - type: object
          mapping: $.
    - path: /disputes/{disputeId}
      name: getdispute
      operations:
      - method: GET
        name: getdispute
        description: Get a dispute
        call: braintree.getdispute
        outputParameters:
        - type: object
          mapping: $.
    - path: /disputes/{disputeId}/accept
      name: acceptdispute
      operations:
      - method: PUT
        name: acceptdispute
        description: Accept a dispute
        call: braintree.acceptdispute
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: braintree-mcp
    transport: http
    description: MCP adapter for Braintree Payments API for AI agent use.
    tools:
    - name: createtransaction
      description: Create a transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: braintree.createtransaction
      outputParameters:
      - type: object
        mapping: $.
    - name: gettransaction
      description: Get a transaction
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: braintree.gettransaction
      outputParameters:
      - type: object
        mapping: $.
    - name: submittransactionforsettlement
      description: Submit transaction for settlement
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: braintree.submittransactionforsettlement
      outputParameters:
      - type: object
        mapping: $.
    - name: voidtransaction
      description: Void a transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: braintree.voidtransaction
      outputParameters:
      - type: object
        mapping: $.
    - name: refundtransaction
      description: Refund a transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: braintree.refundtransaction
      outputParameters:
      - type: object
        mapping: $.
    - name: generateclienttoken
      description: Generate a client token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: braintree.generateclienttoken
      outputParameters:
      - type: object
        mapping: $.
    - name: createcustomer
      description: Create a customer
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: braintree.createcustomer
      outputParameters:
      - type: object
        mapping: $.
    - name: getcustomer
      description: Get a customer
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: braintree.getcustomer
      outputParameters:
      - type: object
        mapping: $.
    - name: updatecustomer
      description: Update a customer
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: braintree.updatecustomer
      outputParameters:
      - type: object
        mapping: $.
    - name: deletecustomer
      description: Delete a customer
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: braintree.deletecustomer
      outputParameters:
      - type: object
        mapping: $.
    - name: createpaymentmethod
      description: Create a payment method
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: braintree.createpaymentmethod
      outputParameters:
      - type: object
        mapping: $.
    - name: getpaymentmethod
      description: Get a payment method
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: braintree.getpaymentmethod
      outputParameters:
      - type: object
        mapping: $.
    - name: updatepaymentmethod
      description: Update a payment method
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: braintree.updatepaymentmethod
      outputParameters:
      - type: object
        mapping: $.
    - name: deletepaymentmethod
      description: Delete a payment method
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: braintree.deletepaymentmethod
      outputParameters:
      - type: object
        mapping: $.
    - name: listdisputes
      description: List disputes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: braintree.listdisputes
      with:
        status: tools.status
        received_date: tools.received_date
        page: tools.page
      inputParameters:
      - name: status
        type: string
        description: Filter disputes by current status.
      - name: received_date
        type: string
        description: Filter disputes received on or after this date in YYYY-MM-DD format.
      - name: page
        type: integer
        description: Page number for paginated results, starting at 1.
      outputParameters:
      - type: object
        mapping: $.
    - name: getdispute
      description: Get a dispute
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: braintree.getdispute
      outputParameters:
      - type: object
        mapping: $.
    - name: acceptdispute
      description: Accept a dispute
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: braintree.acceptdispute
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    BRAINTREE_USERNAME: BRAINTREE_USERNAME
    BRAINTREE_PASSWORD: BRAINTREE_PASSWORD