×
Menu

Braintree Payment Gateway

 
This page details the inputs, secure inputs and outputs available for the Braintree Logic Item, how to complete each field, and an external link to the Braintree integration documentation.
 
PCI Pal must check any payment gateway integrations prior to going live.  The documentation disclaimer (which applies throughout this guide) should be read before commencing any configuration of payment gateways.
 

Inputs

Input Fields
Required
Character Limits/
Required Input
Description
Amount
Yes (TR)
N/A
The billing amount of the request. This value must be greater than 0, and must match the currency format of the merchant account. Can only contain numbers and one decimal point (e.g. x.xx). Can't be greater than the maximum allowed by the processor
BillingAddressCompany
No
15 chars
Company name
BillingAddressCountryCodeAlpha2
Yes
15 chars
The ISO 3166-1 alpha-2 country code specified in an address
BillingAddressCountryCodeAlpha3
No
40 chars
The ISO 3166-1 alpha-3 country code specified in an address
BillingAddressCountryCodeNumeric
No
0.01 to 100,000.00
The ISO 3166-1 numeric country code specified in an address
BillingAddressCountryName
No
3 chars
The country name specified in an address
BillingAddressExtendedAddress
No
100 chars
The extended address information—such as apartment or suite number
BillingAddressFirstName
No
50 chars
The first name
BillingAddressLastName
No
15 chars
The last name
BillingAddressLocality
No
38 chars
The locality/city
BillingAddressPostalCode
Yes
20 chars
The postal code. Postal code must be a string of 4-9 alphanumeric characters, optionally separated by a dash or a space. Spaces, hyphens, and all other special characters are ignored
BillingAddressRegion
No
20 chars
The state or province
BillingAddressStreetAddress
Yes
100 chars
The street address
BillingAddressId
No
100 chars
The two-letter value for an address associated with a specific customer ID
Channel
No
N/A
For Partners and shopping carts only
CardHolderName
No
175 Char
The name associated with the credit card
CustomerCompany
No
255 Char
Company name
CustomerEmail
No
255 Char
Email address composed of ASCII characters
CustomerFax
No
255 Char
Fax Number
CustomerFirstName
No
255 Char
The first name
CustomerId
Yes (PM)
36 Char
A string value representing an existing customer in your Vault that you want to charge
CustomerLastName
No
255 Char
The last name
CustomerPhone
No
14 Char
Phone Number
CustomerWebsite
No
255 Char
Website URL
DescriptorName
No
N/A
The value in the business name field of a customer's statement. The specific length/character requirements for this value depend on your processor
DescriptorPhone
No
14 Char
The value in the phone number field of a customer's statement
DescriptorUrl
No
13 Char
The value in the URL/web address field of a customer's statement
DeviceData
No
20 chars
Customer device information. Passing this value is strongly recommended when using Advanced Fraud Tools and adding credit card data to your Vault: provide the full string received from the Braintree client SDK
DeviceSessionId
No
N/A
This value will contain a Fraud Merchant ID as the unique, numeric identifier for a Kount account and a Device Session ID as the unique identifier for a customer device. For PayPal and Venmo transactions, this value will also include a PayPal Correlation ID. Provide the full string received from the Braintree client SDK
MerchantAccountId
Yes
N/A
The merchant account ID used to create a transaction. Currency is also determined by merchant account ID. If no merchant account ID is specified, we will use your default merchant account
AddBillingAddressToPaymentMethod
No
true/false
The option that determines whether the billing address information provided in the request should be added to the payment method specified. This option works only for new payment methods
HoldInEscrow
No
true/false
For Braintree Marketplace merchants only. This value specifies whether a transaction is held in escrow
SkipAdvancedFraudChecking
No
true/false
Prevents the transaction from being sent to Kount for evaluation as part of Advanced Fraud Tools checks. Use with caution – once you've skipped checks for a transaction, it is not possible to run them retroactively
SkipAvs
No
true/false
Skip AVS checks for the transaction. Will result in a processor response code of B for AvsPostalCodeResponseCode and AvsStreetAddressResponseCode, and nil for AvsErrorResponseCode. Use with caution – once you've skipped checks for a transaction, it is not possible to run them retroactively
SkipCvv
No
true/false
Skip CVV checks for the transaction. Will result in a processor response code of B for CvvResponseCode. Use with caution – once you've skipped checks for a transaction, it is not possible to run them retroactively
StoreInVault
No
true/false
The option that determines whether the payment method should be stored in the Vault, regardless of the transaction's success
StoreInVaultOnSuccess
No
true/false
The option that determines whether the payment method associated with the successful transaction should be stored in the Vault
StoreShippingAddressInVault
No
true/false
The option that determines whether the shipping address information provided with the transaction should be associated with the customer ID specified. When passed, the payment method will always be stored in the Vault
SubmitForSettle
No
true/false
The option that determines whether an authorized transaction is submitted for settlement
OrderId
No
255 Char
Use this field to pass additional information about the transaction. On PayPal transactions, this field maps to the PayPal invoice number. PayPal invoice numbers must be unique in your PayPal business account
PaymentMethodNonce
Yes
N/A
One-time-use reference to payment information provided by your customer, such as a credit card
PurchaseOrderNumber
No
17 Char
A Level 2 field that can be used to pass a purchase order identification value of up to 12 ASCII characters for AIB and 17 ASCII characters for all other processors
ServiceFeeAmount
No
N/A
The portion of a sub-merchant's transaction revenue that is routed to the master merchant account. If set, this value must be greater than or equal to 0, must match the appropriate currency format, and can't exceed the transaction amount
SharedBillingAddressId
No
N/A
For Shared Vault only
SharedPaymentMethodNonce
No
N/A
For Shared Vault only
SharedShippingAddressId
No
N/A
For Shared Vault only
ShippingAddressCompany
No
255 Char
Company name.
ShippingAddressCountryCodeAlpha2
No
2 Char
Address Country Code - 2 Code ISO Format, e.g. GB, US, FR.
ShippingAddressCountryCodeAlpha3
No
3 Char
The ISO 3166-1 alpha-3 country code specified in an address
ShippingAddressCountryCodeNumeric
No
N/A
The ISO 3166-1 numeric country code specified in an address
ShippingAddressCountryName
No
N/A
The country name specified in an address
ShippingAddressExtendedAddress
No
255 Char
The extended address information—such as apartment or suite number
ShippingAddressFirstName
No
255 Char
The first name
ShippingAddressLastName
No
255 Char
The last name
ShippingAddressLocality
No
255 Char
The locality/city
ShippingAddressPostalCode
No
9 AN
The postal code. Postal code must be a string of 4-9 alphanumeric characters, optionally separated by a dash or a space. Spaces, hyphens, and all other special characters are ignored
ShippingAddressRegion
No
255 Char
The state or province
ShippingAddressStreetAddress
No
255 Char
The street address
ShippingAddressId
No
50 Char
The two-letter value for an address associated with a specific customer ID
ShippingAmount
No
N/A
A Level 3 field that specifies the shipping cost on the entire transaction. It can't be negative, and it does not add to the total transaction amount
ShipsFromPostalCode
No
9 AN
A Level 3 field that specifies the postal code of the shipping location
TaxAmount
No
N/A
A Level 2 field that specifies the amount of tax that was included in the total transaction amount. The value can't be negative, and in most cases, it must be greater than zero in order to qualify for lower interchange rates. It does not add to the total transaction amount
TaxExempt
No
true/false
A Level 2 field that indicates whether or not the transaction should be considered eligible for tax exemption. This does not affect the total transaction amount.
TransactionType
No
N/A
For a Transaction Request, set this to 'payment'. For updating a current customers Payment Method, set this to 'paymentmethodupdate'. For creating a new Customer, set this to 'tokenise'
MerchantId
No
N/A
Merchant ID supplied to the merchant by Braintree
PublicKey
No
N/A
Public Key supplied to the merchant by Braintree
PrivateKey
No
N/A
Private Key supplied to the merchant by Braintree
Environment
No
N/A
Environment type, this can be set to:
  •  sandbox
  •  development
  •  production
  •  qa
OptionsFailOnDuplicatePaymentMethod
No
true/false
If this option is passed and the same payment method has already been added to the Vault for any customer, the request will fail
OptionsMakeDefault
No
true/false
This option makes the specified payment method the default for the customer
OptionsVerificationAmount
No
true/false
Specify a non-negative amount that you want to use to verify a card. If you do not pass this option, the gateway will automatically use a verification amount of $0 or $1, depending on the processor and/or card type
OptionsVerificationMerchantAccountId
No
true/false
Specify the merchant account ID that you want to use to verify a card
OptionsVerifyCard
No
true/false
If the payment method is a credit card, this option prompts the gateway to verify the card's number and expiration date. It also verifies the AVS and CVV information if you've enabled AVS and CVV rules
FirstName
Yes (CC)
255 Char
First Name of the Customer
LastName
Yes (CC)
255 Char
Last Name of the Customer
UpdateExisting
No
true/false
True or False depending on whether the customer is to be updated or not
 
(TR) - Required if the TransactionType is set to 'payment'.
(PM) - Required if the TransactionType is set to 'paymentmethodupdate'.
(CC) - Required if the TransactionType is set to 'tokenise'.
 
Secure Inputs
Input Fields
Required
Character Limits/
Required Input
Description
Number
Yes
19 chars
Secure Input of the Card Number
ExpirationDate
Yes
4 chars
Secure Input of the Card Expiry - in the format MMYY
Cvv
Yes
3 or 4 chars
Secure Input of the Card CVV, either three or four digits long depending on the card
 
Outputs
Output Fields
Description
errorMessage
PCI Pal Specific Error Message.  If anything goes wrong in the sending of a request, our internal error handling will respond with a message on the output of the flow
MerchantAccountId
The merchant account ID used to create a transaction
AdditionalProcessorResponse
Optional additional processor response information, provided as further context for the primary processor response
Amount
The billing amount of the request
AuthAdjustmentAmount
The difference between the authorized amount and the amount submitted for settlement. Negative values indicate the authorized amount was adjusted down
AuthAdjustmentSuccess
A boolean value indicating if the adjustment was successful
AuthAdjustmentTimeStamp
The date/time when the adjustment was performed
AvsErrorResponseCode
This field is populated if there was an error when checking AVS or the processing bank does not support AVS. Possible values:
 
S = Issuing bank does not support AVS
E = AVS system error
AvsPostalCodeResponseCode
This is populated if the processor supports the address verification system (AVS). Possible values:
 
M = Matches
N = Does not match
U = Not verified
I = Not provided
A = Not applicable
B = Bypass
AvsStreetAddressResponseCode
This is populated if the processor supports the address verification system (AVS). Possible values:
 
M = Matches
N = Does not match
U = Not verified
I = Not provided
A = Not applicable
B = Bypass
BillingAddressCompany
Billing Company if specified on the request
BillingAddressCountryCodeAlpha2
Billing Country Code if specified on the request
BillingAddressCountryCodeAlpha3
Billing Country Code if specified on the request
BillingAddressCountryCodeNumeric
Billing Country Code if specified on the request
BillingAddressCountryName
Billing Country Name if specified on the request
BillingAddressExtendedAddress
Billing Extended Address if specified on the request
BillingAddressFirstName
Billing First Name if specified on the request
BillingAddressId
Billing Address ID if specified on the request
BillingAddressLastName
Billing Last Name if specified on the request
BillingAddressLocality
Billing Address Locality/City if specified on the request
BillingAddressPostalCode
Billing Postcode if specified on the request
BillingAddressRegion
Billing Region if specified on the request
BillingAddressStreetAddress
Billing Street Address if specified on the request
BillingAddressCustomerId
Billing Customer ID if specified on the request
Channel
If the transaction request was performed through a shopping cart provider or Braintree Partner, this field will have a string identifier for that shopping cart provider or Partner
CreatedAt
Timestamp of when the original request was sent in at
CreditCardBin
Credit Card BIN
CreditCardCardType
Credit Card Type - e.g. VISA
CreditCardCardholderName
Credit Card Holder Name as sent in on the request
CreditCardCommercial
Whether the card type is a commercial card and is capable of processing Level 2 transactions. Possible values:
CreditCardCountryOfIssuance
The country that issued the credit card. Possible country values follow ISO 3166-1
CreditCardCustomerLocation
This is "US" if the billing address is in the US or if a country is not specified. The location is "International" if the billing country passed is not the US
CreditCardDebit
Whether the card is a debit card
CreditCardDurbinRegulated
A value indicating whether the issuing bank's card range is regulated by the Durbin Amendment due to the bank's assets
CreditCardExpirationDate
The expiration date, formatted MMYY or MMYYYY. May be used instead of expiration_month and expiration_year
CreditCardExpirationMonth
The expiration month of the credit card used, formatted MM
CreditCardExpirationYear
The expiration year of the credit card used, formatted YYYY
CreditCardHealthcare
Whether the card is a healthcare card
CreditCardImageUrl
A URL that points to an image resource (a PNG file) hosted by Braintree, which represents the issuing card network (Visa, Mastercard, American Express, Discover, JCB)
CreditCardIssuingBank
The bank that issued the credit card
CreditCardLastFour
The last 4 digits of the credit card number
CreditCardMaskedNumber
A value comprising the bank identification number (BIN), 6 asterisks blocking out the middle numbers (regardless of the number of digits present), and the last 4 digits of the card number. This complies with PCI security standards
CreditCardPayroll
Whether the card is a payroll card
CreditCardPrepaid
Whether the card is a prepaid card
CreditCardToken
The Vault token for the credit card. Unlike other attributes in this details map, this attribute is not a snapshot – if you update the payment method token after creating a transaction, the CreditCard.Token attribute will return the new value rather than the value associated with the transaction at the time it was created. See the transaction API requests section for additional details
CreditCardUniqueNumberIdentifier
A randomly-generated string that uniquely identifies a credit card number in the Vault. If the same credit card is added to a merchant's Vault multiple times, each Vault entry will have the same unique identifier. This value is randomly generated by merchant gateway account, so it will be different for each merchant's Vault
CurrencyIsoCode
The currency for the transaction (e.g. "USD" for US dollars). See the ISO 4217 codes
CustomerCompany
The customer company name
CustomerEmail
The email address
CustomerFax
The customer fax number
CustomerFirstName
The first name
CustomerId
Reference value that is associated with the customer's Id at the time of the transaction
CustomerLastName
The last name
CustomerPhone
The customer phone number
CustomerWebsite
The customer website address
CvvResponseCode
The processing bank's response to the card verification value (CVV) provided by the customer. Possible values:
  •  M = Matches
  •  N = Does not match
  •  U = Not verified
  •  I  = Not provided
  •  S = Issuer does not participate
  •  A = Not applicable
  •  B = Bypass
DescriptorName
The value in the business name field of a customer's statement
DescriptorPhone
The value in the phone number field of a customer's statement
DescriptorUrl
The value in the URL/web address field of a customer's statement
DisbursementDetailsDisbursementDate
The date that the funds associated with this transaction were disbursed. This attribute is only available if you have an eligible merchant account
DisbursementDetailsSettlementCurrencyExchangeRate
The exchange rate from the presentment currency to the settlement currency. This attribute is only available if you have an eligible merchant account
DisbursementDetailsSettlementCurrencyIsoCode
The settlement currency. See the ISO 4217 codes. This attribute is only available if you have an eligible merchant account
DisbursementDetailsSettlementAmount
The amount of the transaction in the settlement currency. This attribute is only available if you have an eligible merchant account
DisbursementDetailsSuccess
A value indicating whether the funds were disbursed successfully. This value can change over time if we receive an exception and then retry the disbursement. This attribute is only available on eligible merchant accounts
DisbursementDetailsFundsHeld
A value indicating whether funds have been withheld from a disbursement to the merchant's bank account
DiscountAmount
The data field that specifies the discount amount that was included in the total transaction amount. It can't be negative, and it does not add to the total transaction amount. If Braintree has approved your merchant account for Level 3 processing, we will pass this field to the processor on your behalf
EscrowStatus
This attribute is only available to Braintree Marketplace merchants. See Holding funds in escrow to learn more. Possible values:
 
"hold_pending"
"held"
"release_pending"
"released"
"refunded"
GatewayRejectionReason
This value will only be set if the transaction status is gateway_rejected. Possible values:
 
"application_incomplete"
"avs"
"avs_and_cvv"
"cvv"
"duplicate"
"fraud"
"three_d_secure"
"token_issuance"
TransactionId
The unique transaction identifier
OrderId
The order ID of the transaction
PaymentInstrumentType
The method of payment used to process the transaction. Possible values:
 
"android_pay_card"
"apple_pay_card"
"credit_card"
"masterpass_card"
"paypal_account"
"venmo_account"
"visa_checkout_card"
PlanId
The plan identifier
ProcessorAuthorizationCode
The processor auth code
ProcessorResponseText
The processor response text
ProcessorSettlementResponseCode
The processor response code
ProcessorSettlementResponseText
The processor response text
PurchaseOrderNumber
A Level 2 data field that can be used to store a purchase order identification value
Recurring
A value indicating whether the transaction was passed with a recurring ecommerce indicator (ECI) flag
RefundedTransactionId
The sale transaction ID associated with a refund transaction
RiskDataDecision
The risk decision. Possible values:
 
Not Evaluated
Approve
Review
Decline
RiskDataId
The risk data identifier
RiskDataDeviceDataCaptured
Flag indicating whether device session data was successfully captured and processed by Kount. Currently available in the Python, .NET, Node and PHP client libraries
ServiceFeeAmount
The portion of a sub-merchant's transaction revenue that was routed to the master merchant account
ShippingAmount
The data field that specifies the shipping cost on the entire transaction. It can't be negative, and it does not add to the total transaction amount. If Braintree has approved your merchant account for Level 3 processing, we will pass this field to the processor on your behalf
ShippingAddressCompany
The shipping company name
ShippingAddressCountryCodeAlpha2
The 2-letter shipping country code
ShippingAddressCountryCodeAlpha3
The 3-letter shipping country code
ShippingAddressCountryCodeNumeric
The numeric shipping country code
ShippingAddressCountryName
The shipping country name
ShippingAddressExtendedAddress
The extended shipping address
ShippingAddressFirstName
The first name
ShippingAddressId
The shipping details ID. A customer Vault record can contain up to 50 shipping and billing addresses, each with a unique ID
ShippingAddressLastName
The last name
ShippingAddressLocality
The locality/city
ShippingAddressPostalCode
The postal code
ShippingAddressRegion
The state or province
ShippingAddressStreetAddress
The street address
ShipsFromPostalCode
The data field that specifies the postal code of the shipping location. If Braintree has approved your merchant account for Level 3 processing, we will pass this field to the processor on your behalf
Status
Possible values:
 
AUTHORIZATION_EXPIRED
AUTHORIZED
AUTHORIZING
SETTLEMENT_PENDING
SETTLEMENT_DECLINED
FAILED
GATEWAY_REJECTED
PROCESSOR_DECLINED
SETTLED
SETTLING
SUBMITTED_FOR_SETTLEMENT
VOIDED
StatusHistory
This value is a record of the statuses that a transaction has progressed through. Possible values:
 
AUTHORIZATION_EXPIRED
AUTHORIZED
AUTHORIZING
SETTLEMENT_PENDING
SETTLEMENT_CONFIRMED
SETTLEMENT_DECLINED
FAILED
GATEWAY_REJECTED
PROCESSOR_DECLINED
SETTLED
SETTLING
SUBMITTED_FOR_SETTLEMENT
VOIDED
SubscriptionBillingPeriodEndDate
The end date for the current billing period, regardless of subscription status
SubscriptionBillingPeriodStartDate
The start date for the current billing period, regardless of subscription status
SubscriptionId
The value used to identify a specific subscription
TaxExempt
A Level 2 data field that indicates whether or not the transaction should be considered eligible for tax exemption. This does not affect the total transaction amount
Type
The value that defines whether a transaction is a sale or credit
UpdatedAt
The date/time the object was last updated
VoiceReferralNumber
The value passed by the merchant with a voice-authorized transaction
Token
An alphanumeric value that references a specific payment method stored in your Vault. Value will be nil if the transaction was not created from a vaulted Android Pay card
ImageUrl
A URL that points to a payment method image resource (a PNG file) hosted by Braintree
VerificationId
Additional Verification Response
ProcessorResponseCode
The processor response code
VerificationStatus
Additional Verification Response
AddressCompany
Company name.
AddressCountryCodeAlpha2
The ISO 3166-1 alpha-2 country code specified in an address
AddressCountryCodeAlpha3
The ISO 3166-1 alpha-3 country code specified in an address
AddressCountryCodeNumeric
The ISO 3166-1 numeric country code specified in an address
AddressCountryName
The country name specified in an address
AddressCustomerId
A string value representing an existing customer in your Vault that owns this address
AddressExtendedAddress
The extended address information—such as apartment or suite number
AddressFirstName
The first name
AddressId
The two-letter value for an address associated with a specific customer ID
AddressLastName
The last name
AddressLocality
The locality/city
AddressPostalCode
The postal code
AddressRegion
The state or province
AddressCreatedAt
The date/time the object was created
AddressUpdatedAt
The date/time the object was last updated
Company
Company name
Email
The email address
Fax
The customer fax number
FirstName
The first name
Id
Reference value that is associated with the customer's Id at the time of the transaction
LastName
The last name
Phone
The customer phone number
Website
The customer website address
BraintreeErrorMsg
Error message from Braintree
 
Braintree Logic Item
The Braintree Logic Item contains the following properties:
 
Braintree Payment Gateway
 
1

Merchant Account ID

 The unique merchant account id given to the client by Braintree.  This can be coded in this field, and set as a variable.  By placing here security measures are added as this will not be shown on the request.
2

Merchant ID

 The unique merchant id given to the client by Braintree which relates to the Merchant Account ID.  This can be coded in this field, and set as a variable.  By placing here security measures are added as this will not be                 shown on the request.
3

Public Key

 Public Key which relates to the Merchant Account which can be found on the clients Brainteee Portal.
4

Private Key

Private Key which relates to the Merchant Account which can be found on the clients Braintee Portal.
5

Environment Type

   For added security the Braintree endpoints have been hardcoded into the integration.  Sandbox, QA, Development or Live needs to be selected from the Environment Type drop down list, depending on the        
transaction being conducted.

Success Code

6  Each gateway has its own unique selection of status codes on a request back from the gateway - for Braintree, this is: Approved
 
                This must be set in order for our internal logging processes to notice that the payment has come back with the expected response.
 
Further information can be found by viewing the integration documentation: Braintree Integration Documentation
The help manual was created with Dr.Explain