Create a braintree gateway

How to create a braintree gateway via API

To create a new braintree gateway, send a POST request to the /api/braintree_gateways endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/braintree_gateways

Arguments

Example

The following request creates a new braintree gateway:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/braintree_gateways' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "braintree_gateways",
    "attributes": {
      "name": "US payment gateway",
      "merchant_account_id": "xxxx-yyyy-zzzz",
      "merchant_id": "xxxx-yyyy-zzzz",
      "public_key": "xxxx-yyyy-zzzz",
      "private_key": "xxxx-yyyy-zzzz"
    }
  }
}'

Last updated