braintree Client Tokens API

Operations for generating client tokens used to initialize Braintree client SDKs on web and mobile.

Operations 1

POST /client_token Generate a client token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/braintree-client-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

braintree-client-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Braintree Payments Client Tokens API
  description: The Braintree Payments API is the core server-side interface for accepting and processing payments through Braintree's gateway.
  version: '1.0'
  contact:
    name: Braintree Developer Support
    url: https://developer.paypal.com/braintree/docs/
  termsOfService: https://www.braintreepayments.com/legal
servers:
- url: https://api.braintreegateway.com/merchants/{merchantId}
  description: Production Server
  variables:
    merchantId:
      description: The unique identifier for the merchant account.
      default: your_merchant_id
- url: https://api.sandbox.braintreegateway.com/merchants/{merchantId}
  description: Sandbox Server
  variables:
    merchantId:
      description: The unique identifier for the sandbox merchant account.
      default: your_merchant_id
security:
- basicAuth: []
tags:
- name: Client Tokens
  description: Operations for generating client tokens used to initialize Braintree client SDKs on web and mobile.
paths:
  /client_token:
    post:
      operationId: generateClientToken
      summary: Generate a client token
      description: Generates a time-limited client token used to initialize the Braintree client-side SDK on web or mobile. The client token contains all authorization and configuration information the client SDK needs to communicate with Braintree. An optional customer_id may be provided to include that customer's vaulted payment methods in the Drop-in UI or to facilitate returning customer flows.
      tags:
      - Client Tokens
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: string
                  description: Existing customer identifier to include the customer's vaulted payment methods in the generated token. Enables returning customer payment selection flows.
                  maxLength: 36
                merchant_account_id:
                  type: string
                  description: The merchant account to use when generating this token. If omitted, the default merchant account is used.
                version:
                  type: integer
                  description: The version of the client token format. Defaults to 2.
                  enum:
                  - 1
                  - 2
                  default: 2
      responses:
        '201':
          description: Client token generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  client_token:
                    type: string
                    description: A Base64-encoded client token string used to initialize the Braintree client SDK.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Unauthorized. Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      description: Standard error response returned by the Braintree API.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
        errors:
          type: object
          description: Nested object containing field-level validation errors organized by resource type.
          additionalProperties: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication using the merchant's public API key as the username and private API key as the password, Base64-encoded per RFC 7617.
externalDocs:
  description: Braintree Payments API Reference
  url: https://developer.paypal.com/braintree/docs/guides/overview