Camel Components

Braintree

Since Camel 2.17

Only producer is supported

The Braintree component provides access to Braintree Payments through their Java SDK.

All client applications need API credential to process payments. To use camel-braintree with your account, you’ll need to create a new Sandbox or Production account.

Maven users will need to add the following dependency to their pom.xml for this component:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-braintree</artifactId>
    <version>${camel-version}</version>
</dependency>

Configuring Options

Camel components are configured on two separate levels:

  • component level

  • endpoint level

Configuring Component Options

At the component level, you set general and shared configurations that are, then, inherited by the endpoints. It is the highest configuration level.

For example, a component may have security settings, credentials for authentication, urls for network connection and so forth.

Some components only have a few options, and others may have many. Because components typically have pre-configured defaults that are commonly used, then you may often only need to configure a few options on a component; or none at all.

You can configure components using:

  • the Component DSL.

  • in a configuration file (application.properties, *.yaml files, etc).

  • directly in the Java code.

Configuring Endpoint Options

You usually spend more time setting up endpoints because they have many options. These options help you customize what you want the endpoint to do. The options are also categorized into whether the endpoint is used as a consumer (from), as a producer (to), or both.

Configuring endpoints is most often done directly in the endpoint URI as path and query parameters. You can also use the Endpoint DSL and DataFormat DSL as a type safe way of configuring endpoints and data formats in Java.

A good practice when configuring options is to use Property Placeholders.

Property placeholders provide a few benefits:

  • They help prevent using hardcoded urls, port numbers, sensitive information, and other settings.

  • They allow externalizing the configuration from the code.

  • They help the code to become more flexible and reusable.

The following two sections list all the options, firstly for the component followed by the endpoint.

Component Options

The Braintree component supports the following options which are listed below.

Name Description Default Type

lazyStartProducer (producer)

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

boolean

autowiredEnabled (advanced)

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

boolean

configuration (advanced)

Component configuration.

BraintreeConfiguration

Endpoint Options

The Braintree endpoint is configured using URI syntax:

braintree:apiName/methodName

With the following path and query parameters:

Path Parameters

Name Description Default Type

apiName (producer)

Required The Braintree API to use, such as transaction, customer or paymentMethod. Each API is a gateway of the Braintree Java SDK, for example transaction is the TransactionGateway.

Enum values:

  • ADD_ON

  • ADDRESS

  • CLIENT_TOKEN

  • CREDIT_CARD_VERIFICATION

  • CUSTOMER

  • DISCOUNT

  • DISPUTE

  • DOCUMENT_UPLOAD

  • MERCHANT_ACCOUNT

  • PAYMENT_METHOD

  • PAYMENT_METHOD_NONCE

  • OAUTH

  • PLAN

  • REPORT

  • SETTLEMENT_BATCH_SUMMARY

  • SUBSCRIPTION

  • TRANSACTION

  • US_BANK_ACCOUNT

  • WEBHOOK_NOTIFICATION

BraintreeApiName

methodName (producer)

Required The method of the selected API to call, such as sale or find for the transaction API.

Enum values:

  • accept

  • addFileEvidence

  • addTextEvidence

  • cancel

  • cancelRelease

  • cloneTransaction

  • create

  • createForCurrency

  • credit

  • delete

  • fetchMerchantAccounts

  • finalize

  • find

  • generate

  • grant

  • holdInEscrow

  • parse

  • refund

  • releaseFromEscrow

  • removeEvidence

  • retryCharge

  • revoke

  • sale

  • search

  • submitForPartialSettlement

  • submitForSettlement

  • transactionLevelFees

  • update

  • updateDetails

  • verify

  • voidTransaction

String

Query Parameters

Name Description Default Type

environment (producer)

The Braintree environment to connect to: sandbox for testing or production (development is for Braintree internal development). Not case-sensitive. Required unless accessToken is set; with an access token the environment is taken from the token.

String

inBody (producer)

Sets the name of a parameter to be passed in the exchange In Body.

String

merchantId (producer)

The merchant ID of the Braintree account, used together with publicKey and privateKey. Required unless accessToken is set.

String

lazyStartProducer (producer (advanced))

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

boolean

httpReadTimeout (advanced)

The read timeout of the HTTP calls to Braintree, in milliseconds. When not set or 0, the Braintree SDK uses 60000 (60 seconds).

Integer

httpLogLevel (logging)

The java.util.logging level of the logger of the HTTP calls to Braintree. At INFO the Braintree SDK logs the method and URL of each call, at FINE also the status code and the request and response bodies, with the CVV and the middle digits of card numbers masked. When not set, the level is not changed (the SDK sets its Braintree logger to INFO).

Enum values:

  • OFF

  • SEVERE

  • WARNING

  • INFO

  • CONFIG

  • FINE

  • FINER

  • FINEST

  • ALL

String

httpLogName (logging)

The name of the java.util.logging logger for the HTTP calls to Braintree. Braintree is the logger of the Braintree SDK. The SDK keeps one logger for all gateways in the JVM, so the gateway created last decides which logger is used.

Braintree

String

logHandlerEnabled (logging)

Whether to add a handler to the logger of the HTTP calls that forwards its records to SLF4J. Set it to false when a java.util.logging to SLF4J bridge is already installed, otherwise each record is logged twice. The handlers that were on the logger are always removed.

true

boolean

proxyHost (proxy)

The host name of the HTTP proxy to use for the calls to Braintree. Used only when proxyPort is set too.

String

proxyPort (proxy)

The port of the HTTP proxy to use for the calls to Braintree. Used only when proxyHost is set too.

Integer

accessToken (security)

The OAuth access token that a merchant granted to process transactions on its behalf. When set, it is used instead of merchantId, publicKey and privateKey, and the environment and merchant ID are taken from the token.

String

privateKey (security)

The private key of the Braintree API key, used together with merchantId and publicKey. Required unless accessToken is set.

String

publicKey (security)

The public key of the Braintree API key, used together with merchantId and privateKey. Required unless accessToken is set.

String

API Parameters (17 APIs)

The Braintree endpoint is an API-based component and has additional parameters based on which API name and API method is used. The API name and API method is located in the endpoint URI as the apiName/methodName path parameters:

braintree:apiName/methodName

There are 17 API names as listed in the table below:

API Name Type Description

address

Producer

Provides methods to create, delete, find, and update Address objects

clientToken

Producer

Generates client tokens, which are used to authenticate requests made directly on behalf of merchants This class does not need to be instantiated directly

creditCardVerification

Producer

Provides methods to create, find and search credit card verifications

customer

Producer

Provides methods to create, delete, find, and update Customer objects

dispute

Producer

Provides methods to interact with Dispute objects

documentUpload

Producer

API to upload evidence documents

merchantAccount

Producer

Provides methods to create a merchant account for a currency, find a merchant account and list the merchant accounts

oauth

Producer

Provides methods to build the OAuth connect URL and to create and revoke OAuth access tokens

paymentMethod

Producer

Provides methods to create, delete, find, update, grant and revoke payment methods

paymentMethodNonce

Producer

Provides methods to create and find payment method nonces

plan

Producer

Provides methods to create, find, update and list subscription plans

report

Producer

Provides methods to interact with reports

settlementBatchSummary

Producer

Generates the settlement batch summary of a settlement date

subscription

Producer

Provides methods to interact with Subscriptions

transaction

Producer

Provides methods to interact with Transactions

usBankAccount

Producer

Provides methods to find a US bank account and to create a sale transaction with it

webhookNotification

Producer

Parses webhook notifications and answers webhook verification challenges

Each API is documented in the following sections to come.

API: address

Only producer is supported

The address API is defined in the syntax as follows:

braintree:address/methodName?[parameters]

The 4 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

create

Creates an Address for a Customer

delete

Deletes a Customer’s Address

find

Finds a Customer’s Address

update

Updates a Customer’s Address

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Address> create(String customerId, com.braintreegateway.AddressRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

customerId

The id of the Customer

String

request

The request with the attributes of the address, such as the street address, the locality and the postal code

AddressRequest

Method delete

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Address> delete(String customerId, String id);

The braintree/delete API method has the parameters listed in the table below:

Parameter Description Type

customerId

The id of the Customer

String

id

The id of the Address to delete

String

Method find

Signatures:

  • com.braintreegateway.Address find(String customerId, String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

customerId

The id of the Customer

String

id

The id of the Address

String

Method update

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Address> update(String customerId, String id, com.braintreegateway.AddressRequest request);

The braintree/update API method has the parameters listed in the table below:

Parameter Description Type

customerId

The id of the Customer

String

id

The id of the Address

String

request

The request with the attributes of the address to update

AddressRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: clientToken

Only producer is supported

The clientToken API is defined in the syntax as follows:

braintree:clientToken/methodName?[parameters]

The 1 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

generate

Generates a client token, which a client SDK uses to authenticate with Braintree

Method generate

Signatures:

  • String generate();

  • String generate(com.braintreegateway.ClientTokenRequest request);

The braintree/generate API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the options of the client token, such as the customer ID, the merchant account ID and the version; when not set, a client token without options is generated

ClientTokenRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: creditCardVerification

Only producer is supported

The creditCardVerification API is defined in the syntax as follows:

braintree:creditCardVerification/methodName?[parameters]

The 3 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

create

Verifies a credit card without storing it in the Vault

find

Finds a credit card verification by ID

search

Finds the credit card verifications that match the query

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.CreditCardVerification> create(com.braintreegateway.CreditCardVerificationRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the credit card or the payment method nonce to verify and the options of the verification

CreditCardVerificationRequest

Method find

Signatures:

  • com.braintreegateway.CreditCardVerification find(String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the credit card verification

String

Signatures:

  • com.braintreegateway.ResourceCollection<com.braintreegateway.CreditCardVerification> search(com.braintreegateway.CreditCardVerificationSearchRequest query);

The braintree/search API method has the parameters listed in the table below:

Parameter Description Type

query

The search query of the credit card verifications

CreditCardVerificationSearchRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: customer

Only producer is supported

The customer API is defined in the syntax as follows:

braintree:customer/methodName?[parameters]

The 6 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

all

Finds all customers; the returned ResourceCollection fetches the customers in pages while it is iterated

create

Creates a Customer

delete

Deletes a Customer by id

find

Finds a Customer by id

search

Finds the customers that match the query; the returned ResourceCollection fetches them in pages while it is iterated

update

Updates a Customer

Method all

Signatures:

  • com.braintreegateway.ResourceCollection<com.braintreegateway.Customer> all();

The braintree/all API method has the parameters listed in the table below:

Parameter Description Type

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Customer> create(com.braintreegateway.CustomerRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the attributes of the customer, such as the name, the email and optionally a payment method nonce

CustomerRequest

Method delete

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Customer> delete(String id);

The braintree/delete API method has the parameters listed in the table below:

Parameter Description Type

id

The id of the Customer

String

Method find

Signatures:

  • com.braintreegateway.Customer find(String id);

  • com.braintreegateway.Customer find(String id, String associationFilterId);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

associationFilterId

The association filter ID that leaves associated data out of the customer: f8124ed8 excludes the subscriptions, 353f78cc the addresses, custom fields, payment methods and subscriptions

String

id

The id of the Customer

String

Signatures:

  • com.braintreegateway.ResourceCollection<com.braintreegateway.Customer> search(com.braintreegateway.CustomerSearchRequest query);

The braintree/search API method has the parameters listed in the table below:

Parameter Description Type

query

The search query of the customers

CustomerSearchRequest

Method update

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Customer> update(String id, com.braintreegateway.CustomerRequest request);

The braintree/update API method has the parameters listed in the table below:

Parameter Description Type

id

The id of the Customer

String

request

The request with the attributes of the customer to update

CustomerRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: dispute

Only producer is supported

The dispute API is defined in the syntax as follows:

braintree:dispute/methodName?[parameters]

The 7 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

accept

Accepts an open dispute, so the merchant does not contest it

addFileEvidence

Adds a document uploaded with the documentUpload API as evidence to a dispute

addTextEvidence

Adds text evidence to a dispute

finalize

Finalizes an open dispute, which submits its evidence to the banks

find

Finds a dispute by ID

removeEvidence

Removes evidence from a dispute

search

Finds the disputes that match the query; the returned PaginatedCollection fetches them in pages while it is iterated

Method accept

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Dispute> accept(String id);

The braintree/accept API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the dispute to accept

String

Method addFileEvidence

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addFileEvidence(String disputeId, String documentId);

  • com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addFileEvidence(String disputeId, com.braintreegateway.FileEvidenceRequest fileEvidenceRequest);

The braintree/addFileEvidence API method has the parameters listed in the table below:

Parameter Description Type

disputeId

The ID of the dispute to add the file evidence to

String

documentId

The ID of the document uploaded with the documentUpload API

String

fileEvidenceRequest

The request with the ID of the uploaded document and the category of the evidence

FileEvidenceRequest

Method addTextEvidence

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addTextEvidence(String id, String content);

  • com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addTextEvidence(String id, com.braintreegateway.TextEvidenceRequest textEvidenceRequest);

The braintree/addTextEvidence API method has the parameters listed in the table below:

Parameter Description Type

content

The content of the text evidence for the dispute

String

id

The ID of the dispute to add the text evidence to

String

textEvidenceRequest

The request with the content, the category and the sequence number of the text evidence

TextEvidenceRequest

Method finalize

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Dispute> finalize(String id);

The braintree/finalize API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the dispute to finalize

String

Method find

Signatures:

  • com.braintreegateway.Dispute find(String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the dispute

String

Method removeEvidence

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Dispute> removeEvidence(String disputeId, String evidenceId);

The braintree/removeEvidence API method has the parameters listed in the table below:

Parameter Description Type

disputeId

The ID of the dispute to remove the evidence from

String

evidenceId

The ID of the evidence to remove

String

Signatures:

  • com.braintreegateway.PaginatedCollection<com.braintreegateway.Dispute> search(com.braintreegateway.DisputeSearchRequest query);

The braintree/search API method has the parameters listed in the table below:

Parameter Description Type

query

The search query of the disputes

DisputeSearchRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: documentUpload

Only producer is supported

The documentUpload API is defined in the syntax as follows:

braintree:documentUpload/methodName?[parameters]

The 1 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

create

Uploads a document to use as evidence of a dispute

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.DocumentUpload> create(com.braintreegateway.DocumentUploadRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the kind of the document (evidence_document) and the file to upload

DocumentUploadRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: merchantAccount

Only producer is supported

The merchantAccount API is defined in the syntax as follows:

braintree:merchantAccount/methodName?[parameters]

The 4 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

all

Lists all the merchant accounts of the merchant, fetching the pages as needed

createForCurrency

Creates a merchant account for a currency; only for merchants using Braintree Auth

fetchMerchantAccounts

Gets one page of the merchant accounts of the merchant

find

Finds a merchant account by ID

Method all

Signatures:

  • com.braintreegateway.PaginatedCollection<com.braintreegateway.MerchantAccount> all();

The braintree/all API method has the parameters listed in the table below:

Parameter Description Type

Method createForCurrency

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.MerchantAccount> createForCurrency(com.braintreegateway.MerchantAccountCreateForCurrencyRequest currencyRequest);

The braintree/createForCurrency API method has the parameters listed in the table below:

Parameter Description Type

currencyRequest

The request with the currency (ISO 4217 code) and the ID of the new merchant account

MerchantAccountCreateForCurrencyRequest

Method fetchMerchantAccounts

Signatures:

  • com.braintreegateway.PaginatedResult<com.braintreegateway.MerchantAccount> fetchMerchantAccounts(int page);

The braintree/fetchMerchantAccounts API method has the parameters listed in the table below:

Parameter Description Type

page

The number of the page to get, starting at 1

Integer

Method find

Signatures:

  • com.braintreegateway.MerchantAccount find(String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the merchant account

String

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: oauth

Only producer is supported

The oauth API is defined in the syntax as follows:

braintree:oauth/methodName?[parameters]

The 4 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

connectUrl

Builds the URL of the Braintree OAuth connect page, where a merchant grants access to the application; it needs the OAuth client ID, which the component cannot configure today, so the URL has no client ID

createTokenFromCode

Exchanges an OAuth authorization code for an access token and a refresh token; it needs the OAuth client ID and client secret, which the component cannot configure today, so the call fails

createTokenFromRefreshToken

Creates a new OAuth access token from a refresh token; it needs the OAuth client ID and client secret, which the component cannot configure today, so the call fails

revokeAccessToken

Revokes an OAuth access token; it needs the OAuth client ID and client secret, which the component cannot configure today, so the call fails

Method connectUrl

Signatures:

  • String connectUrl(com.braintreegateway.OAuthConnectUrlRequest connectRequest);

The braintree/connectUrl API method has the parameters listed in the table below:

Parameter Description Type

connectRequest

The request with the parameters of the connect URL, such as the redirect URI, the scope and the state

OAuthConnectUrlRequest

Method createTokenFromCode

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.OAuthCredentials> createTokenFromCode(com.braintreegateway.OAuthCredentialsRequest request);

The braintree/createTokenFromCode API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the authorization code that Braintree returned to the redirect URI, and optionally the scope

OAuthCredentialsRequest

Method createTokenFromRefreshToken

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.OAuthCredentials> createTokenFromRefreshToken(com.braintreegateway.OAuthCredentialsRequest request);

The braintree/createTokenFromRefreshToken API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the refresh token, and optionally the scope

OAuthCredentialsRequest

Method revokeAccessToken

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.OAuthResult> revokeAccessToken(String accessToken);

The braintree/revokeAccessToken API method has the parameters listed in the table below:

Parameter Description Type

accessToken

The OAuth access token to revoke

String

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: paymentMethod

Only producer is supported

The paymentMethod API is defined in the syntax as follows:

braintree:paymentMethod/methodName?[parameters]

The 6 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

create

Creates a payment method in the Vault, usually from a payment method nonce

delete

Deletes a payment method from the Vault; the subscriptions of the payment method are canceled

find

Finds a payment method by its token

grant

Grants another merchant access to a payment method and returns a payment method nonce for that merchant

revoke

Revokes the grant of a payment method to another merchant

update

Updates a payment method

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> create(com.braintreegateway.PaymentMethodRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the customer ID, the payment method nonce and the options of the payment method

PaymentMethodRequest

Method delete

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> delete(String token);

  • com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> delete(String token, com.braintreegateway.PaymentMethodDeleteRequest deleteRequest);

The braintree/delete API method has the parameters listed in the table below:

Parameter Description Type

deleteRequest

The delete options: revokeAllGrants also revokes the grants of the payment method to other merchants (default false)

PaymentMethodDeleteRequest

token

The token of the payment method

String

Method find

Signatures:

  • com.braintreegateway.PaymentMethod find(String token);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

token

The token of the payment method

String

Method grant

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> grant(String token);

  • com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> grant(String token, com.braintreegateway.PaymentMethodGrantRequest grantRequest);

The braintree/grant API method has the parameters listed in the table below:

Parameter Description Type

grantRequest

The grant options, such as allowVaulting, includeBillingPostalCode and revokeAfter

PaymentMethodGrantRequest

token

The token of the payment method

String

Method revoke

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> revoke(String token);

The braintree/revoke API method has the parameters listed in the table below:

Parameter Description Type

token

The token of the payment method

String

Method update

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> update(String token, com.braintreegateway.PaymentMethodRequest request);

The braintree/update API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the attributes of the payment method to update

PaymentMethodRequest

token

The token of the payment method

String

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: paymentMethodNonce

Only producer is supported

The paymentMethodNonce API is defined in the syntax as follows:

braintree:paymentMethodNonce/methodName?[parameters]

The 2 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

create

Creates a payment method nonce from a payment method in the Vault

find

Finds a payment method nonce

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> create(String paymentMethodToken);

  • com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> create(com.braintreegateway.PaymentMethodNonceRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

paymentMethodToken

The token of the payment method to create the nonce for

String

request

The request with the payment method token, and optionally the merchant account ID and the authentication insight options

PaymentMethodNonceRequest

Method find

Signatures:

  • com.braintreegateway.PaymentMethodNonce find(String paymentMethodNonce);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

paymentMethodNonce

The payment method nonce to find

String

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: plan

Only producer is supported

The plan API is defined in the syntax as follows:

braintree:plan/methodName?[parameters]

The 4 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

all

Lists all the subscription plans

create

Creates a subscription plan

find

Finds a subscription plan by ID

update

Updates a subscription plan

Method all

Signatures:

  • java.util.List<com.braintreegateway.Plan> all();

The braintree/all API method has the parameters listed in the table below:

Parameter Description Type

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Plan> create(com.braintreegateway.PlanRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the attributes of the plan, such as the name, the price and the billing frequency

PlanRequest

Method find

Signatures:

  • com.braintreegateway.Plan find(String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the plan

String

Method update

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Plan> update(String id, com.braintreegateway.PlanRequest request);

The braintree/update API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the plan

String

request

The request with the attributes of the plan, such as the name, the price and the billing frequency

PlanRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: report

Only producer is supported

The report API is defined in the syntax as follows:

braintree:report/methodName?[parameters]

The 1 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

transactionLevelFees

Gets the transaction-level fee report of a date

Method transactionLevelFees

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.TransactionLevelFeeReport> transactionLevelFees(com.braintreegateway.TransactionLevelFeeReportRequest request);

The braintree/transactionLevelFees API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the date of the report, and optionally the merchant account ID

TransactionLevelFeeReportRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: settlementBatchSummary

Only producer is supported

The settlementBatchSummary API is defined in the syntax as follows:

braintree:settlementBatchSummary/methodName?[parameters]

The 1 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

generate

Generates the settlement batch summary of a settlement date, with the totals of the sales and credits of each batch

Method generate

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary> generate(java.util.Calendar settlementDate);

  • com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary> generate(java.util.Calendar settlementDate, String groupByCustomField);

The braintree/generate API method has the parameters listed in the table below:

Parameter Description Type

groupByCustomField

The name of a custom field of the transactions to group the summary by

String

settlementDate

The settlement date; only the date is sent, as yyyy-MM-dd in the time zone of the Calendar

Calendar

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: subscription

Only producer is supported

The subscription API is defined in the syntax as follows:

braintree:subscription/methodName?[parameters]

The 7 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

cancel

Cancels a subscription; a canceled subscription cannot be reactivated

create

Creates a Subscription

delete

Deletes a subscription by ID; not in the Braintree API reference, use cancel to stop a subscription

find

Finds a Subscription by id

retryCharge

Retries the charge of a past due subscription and returns the transaction

search

Finds the subscriptions that match the query; the returned ResourceCollection fetches them in pages while it is iterated

update

Updates a Subscription

Method cancel

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Subscription> cancel(String id);

The braintree/cancel API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the subscription to cancel

String

Method create

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Subscription> create(com.braintreegateway.SubscriptionRequest request);

The braintree/create API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the plan ID, the payment method token and the other attributes of the subscription

SubscriptionRequest

Method delete

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Subscription> delete(String customerId, String id);

The braintree/delete API method has the parameters listed in the table below:

Parameter Description Type

customerId

Not used: the SDK sends only the ID of the subscription

String

id

The ID of the subscription to delete

String

Method find

Signatures:

  • com.braintreegateway.Subscription find(String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

id

The id of the Subscription

String

Method retryCharge

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId, Boolean submitForSettlement);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId, java.math.BigDecimal amount);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId, java.math.BigDecimal amount, Boolean submitForSettlement);

The braintree/retryCharge API method has the parameters listed in the table below:

Parameter Description Type

amount

The amount to charge; when not set, the balance of the subscription is charged

BigDecimal

submitForSettlement

Whether to submit the transaction for settlement when the retry succeeds

Boolean

subscriptionId

The ID of the past due subscription

String

Signatures:

  • com.braintreegateway.ResourceCollection<com.braintreegateway.Subscription> search(com.braintreegateway.SubscriptionSearchRequest searchRequest);

The braintree/search API method has the parameters listed in the table below:

Parameter Description Type

searchRequest

The search query of the subscriptions

SubscriptionSearchRequest

Method update

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Subscription> update(String id, com.braintreegateway.SubscriptionRequest request);

The braintree/update API method has the parameters listed in the table below:

Parameter Description Type

id

The id of the Subscription

String

request

The request with the attributes of the subscription to update

SubscriptionRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: transaction

Only producer is supported

The transaction API is defined in the syntax as follows:

braintree:transaction/methodName?[parameters]

The 16 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

adjustAuthorization

Adjusts the amount of an authorized transaction, up by an incremental authorization or down by a partial reversal

cancelRelease

Cancels the pending release of a transaction from escrow

cloneTransaction

Creates a new transaction with the attributes of an existing transaction and a new amount

credit

Creates a credit Transaction

find

Finds a Transaction by id

packageTracking

Adds the tracking details of a shipped package to a transaction

refund

Refunds all or part of a previous sale Transaction

releaseFromEscrow

Releases a transaction held in escrow

reverse

Reverses a transaction: voids it when it can still be voided, otherwise creates a full refund

sale

Creates a sale Transaction

search

Finds the transactions that match the query; the returned ResourceCollection fetches them in pages while it is iterated

submitForPartialSettlement

Settles part of the amount of an authorized transaction, as a new child transaction

submitForSettlement

Submits an authorized transaction for settlement

updateCustomFields

Updates the custom fields of a transaction

updateDetails

Updates details for a transaction that has been submitted for settlement

voidTransaction

Voids the transaction with the given id

Method adjustAuthorization

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> adjustAuthorization(String id, com.braintreegateway.TransactionRequest request);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> adjustAuthorization(String id, java.math.BigDecimal amount);

The braintree/adjustAuthorization API method has the parameters listed in the table below:

Parameter Description Type

amount

The new authorized amount

BigDecimal

id

The ID of the authorized transaction to adjust

String

request

The request with the new authorized amount

TransactionRequest

Method cancelRelease

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> cancelRelease(String id);

The braintree/cancelRelease API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the transaction whose release from escrow to cancel

String

Method cloneTransaction

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> cloneTransaction(String id, com.braintreegateway.TransactionCloneRequest cloneRequest);

The braintree/cloneTransaction API method has the parameters listed in the table below:

Parameter Description Type

cloneRequest

The request with the amount, the channel and the option to submit the new transaction for settlement

TransactionCloneRequest

id

The ID of the transaction to clone

String

Method credit

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> credit(com.braintreegateway.TransactionRequest request);

The braintree/credit API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the amount and the payment method of the credit

TransactionRequest

Method find

Signatures:

  • com.braintreegateway.Transaction find(String id);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

id

The id of the Transaction

String

Method packageTracking

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> packageTracking(String id, com.braintreegateway.PackageTrackingRequest packageTrackingRequest);

The braintree/packageTracking API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the transaction to add the package tracking details to

String

packageTrackingRequest

The request with the carrier, the tracking number and the line items of the package

PackageTrackingRequest

Method refund

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> refund(String id);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> refund(String id, com.braintreegateway.TransactionRefundRequest refundRequest);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> refund(String id, java.math.BigDecimal amount);

The braintree/refund API method has the parameters listed in the table below:

Parameter Description Type

amount

The amount to refund; when not set, the full amount of the transaction is refunded

BigDecimal

id

The ID of the sale transaction to refund

String

refundRequest

The request with the amount, the order ID and the merchant account ID of the refund

TransactionRefundRequest

Method releaseFromEscrow

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> releaseFromEscrow(String id);

The braintree/releaseFromEscrow API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the transaction to release from escrow

String

Method reverse

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> reverse(String id);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> reverse(String id, com.braintreegateway.TransactionReverseRequest reverseRequest);

The braintree/reverse API method has the parameters listed in the table below:

Parameter Description Type

id

The id of the transaction to reverse

String

reverseRequest

The optional request with an API request key, for idempotency

TransactionReverseRequest

Method sale

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> sale(com.braintreegateway.TransactionRequest request);

The braintree/sale API method has the parameters listed in the table below:

Parameter Description Type

request

The request with the amount, the payment method nonce or token, and the options of the sale

TransactionRequest

Signatures:

  • com.braintreegateway.ResourceCollection<com.braintreegateway.Transaction> search(com.braintreegateway.TransactionSearchRequest query);

The braintree/search API method has the parameters listed in the table below:

Parameter Description Type

query

The search query

TransactionSearchRequest

Method submitForPartialSettlement

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> submitForPartialSettlement(String id, com.braintreegateway.TransactionRequest request);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> submitForPartialSettlement(String id, java.math.BigDecimal amount);

The braintree/submitForPartialSettlement API method has the parameters listed in the table below:

Parameter Description Type

amount

The amount of the partial settlement

BigDecimal

id

The ID of the authorized transaction to settle in part

String

request

The request with the amount and the other attributes of the partial settlement

TransactionRequest

Method submitForSettlement

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> submitForSettlement(String id);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> submitForSettlement(String id, com.braintreegateway.TransactionRequest request);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> submitForSettlement(String id, java.math.BigDecimal amount);

The braintree/submitForSettlement API method has the parameters listed in the table below:

Parameter Description Type

amount

The amount to settle, at most the authorized amount; when not set, the authorized amount is settled

BigDecimal

id

The ID of the transaction to submit for settlement

String

request

The request with the amount and the other attributes of the settlement, such as the order ID

TransactionRequest

Method updateCustomFields

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> updateCustomFields(String id, com.braintreegateway.TransactionRequest request);

The braintree/updateCustomFields API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the transaction to update

String

request

The request with the custom fields to update

TransactionRequest

Method updateDetails

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> updateDetails(String id, com.braintreegateway.TransactionRequest request);

The braintree/updateDetails API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the transaction to update

String

request

The request with the amount, the order ID and the descriptor to update

TransactionRequest

Method voidTransaction

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> voidTransaction(String id);

  • com.braintreegateway.Result<com.braintreegateway.Transaction> voidTransaction(String id, com.braintreegateway.TransactionVoidRequest voidRequest);

The braintree/voidTransaction API method has the parameters listed in the table below:

Parameter Description Type

id

The ID of the transaction to void

String

voidRequest

The optional request with an API request key, for idempotency

TransactionVoidRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: usBankAccount

Only producer is supported

The usBankAccount API is defined in the syntax as follows:

braintree:usBankAccount/methodName?[parameters]

The 2 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

find

Finds a US bank account payment method by its token

sale

Creates a sale transaction with a US bank account payment method and submits it for settlement

Method find

Signatures:

  • com.braintreegateway.UsBankAccount find(String token);

The braintree/find API method has the parameters listed in the table below:

Parameter Description Type

token

The token of the US bank account payment method

String

Method sale

Signatures:

  • com.braintreegateway.Result<com.braintreegateway.Transaction> sale(String token, com.braintreegateway.TransactionRequest transactionRequest);

The braintree/sale API method has the parameters listed in the table below:

Parameter Description Type

token

The token of the US bank account payment method to charge

String

transactionRequest

The request with the amount and the other attributes of the transaction; the SDK changes this request, setting the payment method token and submitForSettlement to true

TransactionRequest

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

API: webhookNotification

Only producer is supported

The webhookNotification API is defined in the syntax as follows:

braintree:webhookNotification/methodName?[parameters]

The 3 method(s) is(are) listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)

Method Alias Description

parse

Verifies the signature of a webhook notification and parses its payload

parseWithoutSignatureVerification

Parses the payload of a webhook notification without verifying its signature, so the payload is not authenticated; only for select merchants, use parse instead

verify

Answers the verification challenge that Braintree sends to a webhook URL, and returns the response to send back

Method parse

Signatures:

  • com.braintreegateway.WebhookNotification parse(String signature, String payload);

The braintree/parse API method has the parameters listed in the table below:

Parameter Description Type

payload

The bt_payload value of the webhook notification, Base64-encoded XML

String

signature

The bt_signature value of the webhook notification

String

Method parseWithoutSignatureVerification

Signatures:

  • com.braintreegateway.WebhookNotification parseWithoutSignatureVerification(String payload);

The braintree/parseWithoutSignatureVerification API method has the parameters listed in the table below:

Parameter Description Type

payload

The bt_payload value of the webhook notification, Base64-encoded XML

String

Method verify

Signatures:

  • String verify(String challenge);

The braintree/verify API method has the parameters listed in the table below:

Parameter Description Type

challenge

The bt_challenge value that Braintree sends to the webhook URL, 20 to 32 hexadecimal characters

String

In addition to the parameters above, the braintree API can also use any of the Query Parameters.

Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.parameter. The inBody parameter overrides message header, i.e., the endpoint parameter inBody=myParameterNameHere would override a CamelBraintree.myParameterNameHere header.

Message Headers

The Braintree component supports the following message header(s), which is/are listed below:

Name Description Default Type

CamelBraintree. (producer)

Constant: PROPERTY_PREFIX

The prefix of the headers that carry the parameters of the API method: the header CamelBraintree.customerId holds the customerId parameter. The name without the dot, such as CamelBraintreeCustomerId, works too.

Object

Message Body

The message body at each side of the Braintree component: Consumer is the body of the messages the consumer creates, Consumer reply the bodies a consumer that answers its caller can reply with, Producer input the bodies the producer can send or write, and Producer output the body after the producer.

Side Body Description

Producer input

any

The body is used only when inBody names a parameter of the method, and must then be of the type of that parameter: a request object such as the TransactionRequest for request of transaction/sale, or text for an id. A Map or JSON or XML text is not turned into a request: build it first. Without inBody the arguments come from the options and the CamelBraintree. headers.

Not known when inBody is set.

Producer output

pojo, iterator, list or text

The return value of the method: a Result for the methods that change data, such as transaction/sale, which does not fail the exchange when Braintree rejects the request: isSuccess() is then false and the errors are in the Result; the model object of a find, such as a Customer; a ResourceCollection for search and customer/all, which fetches the records while it is iterated; a List for plan/all; text for clientToken/generate, oauth/connectUrl and webhookNotification/verify.

The bodies are the ones with the default options. A side that is not listed is not known, and tooling does not guess it. The carriers, the sides and the tools that use them are described in Message Body Types.

This is an API-based component, so per-call parameters can be supplied through Camel-prefixed exchange headers in addition to the endpoint options. If the route consumes messages from untrusted producers, strip these internal headers at the trust boundary — for example with removeHeaders("Camel*") — before the message reaches this component, so that a sender cannot override the API call. See the Camel security model for details.

Examples

  • Java

  • XML

  • YAML

from("direct://GENERATE")
    .to("braintree://clientToken/generate");
<route>
  <from uri="direct://GENERATE"/>
  <to uri="braintree://clientToken/generate"/>
</route>
- route:
    from:
      uri: direct:GENERATE
      steps:
        - to:
            uri: braintree:clientToken/generate

More Information

For more information on the endpoints and options see Braintree references at https://developers.braintreepayments.com/reference/overview