Configure Braintree

You can configure Braintree programatically using the /gateways/braintree endpoint.

The Braintree gateway object

Attribute

Type

Description

merchant_id

string

Your Braintree merchant ID

public_key

string

Your Braintree public key

private_key

string

Your Braintree private key

name

string

The display name of the gateway

environment

string

production or sandbox

slug

string

A unique slug for this gateway

type

string

Always gateway

enabled

boolean

true or false that will enable the gateway

Update Braintree settings

PUT https://api.moltin.com/v2/gateways/braintree

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API

Request Body

NameTypeDescription

enabled

boolean

true, false

environment

string

production, sandbox

merchant_id

string

Your Braintree merchant ID

private_key

string

Your Braintree private key

public_key

string

Your Braintree public key

{
  "data": {
    "enabled": true,
    "environment": "production",
    "merchant_id": "xxx",
    "name": "Braintree",
    "private_key": "xxx",
    "public_key": "xxx",
    "slug": "braintree",
    "type": "gateway"
  }
}
curl -X PUT https://api.moltin.com/v2/gateways/braintree \
    -H "Authorization: Bearer XXXX" \
    -H "Content-Type: application/json" \
    -d $'{
      "data": {
        "enabled": true,
        "environment": "production",
        "merchant_id": "xxx",
        "private_key": "xxx",
        "public_key": "xxx",
      }
    }'

Last updated