Configure Braintree

Last updated 7 months ago

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

The Braintree gateway object

Attributes
Sample 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

{
"data": {
"enabled": true,
"environment": "production",
"merchant_id": "xxx",
"name": "Braintree",
"private_key": "xxx",
"public_key": "xxx",
"slug": "braintree",
"type": "gateway"
}
}

put
Update Braintree settings

https://api.moltin.com
/v2/gateways/braintree
Request
Response
Headers
Authorization
required
string
The Bearer token to grant access to the API
Body Parameters
enabled
optional
boolean
true, false
environment
optional
string
production, sandbox
merchant_id
optional
string
Your Braintree merchant ID
private_key
optional
string
Your Braintree private key
public_key
optional
string
Your Braintree public key
200: OK
{
"data": {
"enabled": true,
"environment": "production",
"merchant_id": "xxx",
"name": "Braintree",
"private_key": "xxx",
"public_key": "xxx",
"slug": "braintree",
"type": "gateway"
}
}
cURL
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",
}
}'