A record that includes all details of a transaction, including current status.

Returned directly or within a successful result object from the following requests:

Attributes
AddOns AddOn[]

The collection of add-ons associated with a subscription.

AdditionalProcessorResponse string

Optional additional processor response information, provided as further context for the primary processor response.

Amount Decimal

The billing amount of the request.

AndroidPayCard

If PaymentInstrumentType is "android_pay_card", these are the details of the credit card used for the transaction.

Bin string

The first 6 digits of the device-specific account number (DPAN), known as the Bank Identification Number. This BIN will differ from the BIN of the underlying card.

ExpirationMonth string

The expiration month of the credit card, formatted MM.

ExpirationYear string

The 2- or 4-digit year associated with the credit card, formatted YY or YYYY.

GoogleTransactionId string

A unique identifier provided by Google to track the payment method's transactions.

ImageUrl string

A URL that points to a payment method image resource (a PNG file) hosted by Braintree.

SourceCardLastFour string

The last 4 digits of the payment method tokenized by the network.

SourceCardType string

The type of the card tokenized by the network.

SourceDescription string

Indicates what type of payment method was tokenized by the network. Also includes an identifier for the account (e.g. last 4 digits if the payment method was a credit card).

Token string

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.

VirtualCardLastFour string

The last 4 digits of the device-specific account number (DPAN).

VirtualCardType string

The card type of the device-specific account number (DPAN).

ApplePayDetails

If PaymentInstrumentType is "apple_pay_card", these are the details of the credit card used for the transaction.

CardType string

The type of the credit card. Possible values:

  • Apple Pay - Visa
  • Apple Pay - MasterCard
  • Apple Pay - American Express
  • Apple Pay - Discover
CardholderName string

The cardholder name associated with the credit card.

ExpirationMonth string

The expiration month of the credit card, formatted MM.

ExpirationYear string

The 4-digit expiration year of the credit card, formatted YYYY.

LastFour string

The last 4 digits of the device-specific account number (DPAN).

PaymentInstrumentName string

A description of the payment method intended for display to the user, typically card type and last 4 digits of the physical card number stored by Wallet (formerly Passbook). We receive this description alongside the DPAN when processing an Apple Pay transaction.

SourceDescription string

Indicates what type of payment method was tokenized by the network. Also includes an identifier for the account (e.g. last 4 digits if the payment method was a credit card).

Token string

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 Apple Pay card.

AuthorizationAdjustments

A collection of authorization adjustments associated with the transaction.

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


If this value is null, you will see responses in both AvsPostalCodeResponseCode and AvsStreetAddressResponseCode.

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
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
BillingAddress

The billing address details used to process this transaction. If billing address was stored in the Vault, then the billing_details is a snapshot of the address in the Vault at the time the transaction was created.

Company string

The billing company name. See the transaction API requests section for details.

CountryCodeAlpha2 string

The 2-letter billing country code. See the transaction API requests section for details.

CountryCodeAlpha3 string

The 3-letter billing country code. See the transaction API requests section for details.

CountryCodeNumeric string

The numeric billing country code. See the transaction API requests section for details.

CountryName string

The billing country name. See the transaction API requests section for details.

ExtendedAddress string

The extended billing address. See the transaction API requests section for details.

FirstName string

The first name. See the transaction API requests section for details.

Id string

The billing details ID. A customer Vault record can contain up to 50 shipping and billing addresses, each with a unique ID. See the transaction API requests section for details.

LastName string

The last name. See the transaction API requests section for details.

Locality string

The locality/city. See the transaction API requests section for details.

PostalCode string

The postal code. See the transaction API requests section for details.

Region string

The state or province. See the transaction API requests section for details.

StreetAddress string

The street address. See the transaction API requests section for details.

Channel string

If the transaction request was created through a shopping cart provider or Braintree Partner, this field will have a string identifier for that shopping cart provider or Partner. For PayPal transactions, this maps to the PayPal account's bn_code.

CreatedAt DateTime

The date/time the object was created.

CreditCard

If PaymentInstrumentType is "credit_card", these are the details of the card used for the transaction. If the transaction was created using Vault tokens, then this attribute is a snapshot of the credit card in the Vault at the time the transaction was created.

Bin

The first 6 digits of the credit card, known as the Bank Identification Number.

CardType

The type of the credit card. Possible values:

  • American Express
  • Carte Blanche
  • China UnionPay
  • Diners Club
  • Discover
  • JCB
  • Laser
  • Maestro
  • MasterCard
  • Solo
  • Switch
  • Visa
  • Unknown
CardholderName string

The cardholder name associated with the credit card.

Commercial enum

Whether the card type is a commercial card and is capable of processing Level 2 transactions. Possible values:

  • Braintree.CreditCardCommercial.YES
  • Braintree.CreditCardCommercial.NO
  • Braintree.CreditCardCommercial.UNKNOWN
CountryOfIssuance string

The country that issued the credit card. Possible country values follow ISO 3166-1.

CustomerLocation enum

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. Possible values:

  • Braintree.CreditCardCustomerLocation.INTERNATIONAL
  • Braintree.CreditCardCustomerLocation.US
  • Braintree.CreditCardCustomerLocation.UNRECOGNIZED
Debit enum

Whether the card is a debit card. Possible values:

  • Braintree.CreditCardDebit.YES
  • Braintree.CreditCardDebit.NO
  • Braintree.CreditCardDebit.UNKNOWN
DurbinRegulated enum

A value indicating whether the issuing bank's card range is regulated by the Durbin Amendment due to the bank's assets. Possible values:

  • Braintree.CreditCardDurbinRegulated.YES
  • Braintree.CreditCardDurbinRegulated.NO
  • Braintree.CreditCardDurbinRegulated.UNKNOWN
ExpirationDate string

The expiration date, formatted MMYY or MMYYYY. May be used instead of expiration_month and expiration_year.

ExpirationMonth string

The expiration month of the credit card used, formatted MM.

ExpirationYear string

The expiration year of the credit card used, formatted YYYY.

Healthcare enum

Whether the card is a healthcare card. Possible values:

  • Braintree.CreditCardHealthCare.YES
  • Braintree.CreditCardHealthCare.NO
  • Braintree.CreditCardHealthCare.UNKNOWN
ImageUrl

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).

IssuingBank string

The bank that issued the credit card.

LastFour

The last 4 digits of the credit card number.

MaskedNumber

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.

Payroll enum

Whether the card is a payroll card. Possible values:

  • Braintree.CreditCardPayroll.YES
  • Braintree.CreditCardPayroll.NO
  • Braintree.CreditCardPayroll.UNKNOWN
Prepaid enum

Whether the card is a prepaid card. Possible values:

  • Braintree.CreditCardPrepaid.YES
  • Braintree.CreditCardPrepaid.NO
  • Braintree.CreditCardPrepaid.UNKNOWN
ProductId string

The code for the product type of the card (e.g. D (Visa Signature Preferred), G (Visa Business)). See Product ID codes below for possible values.

Token string

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.

UniqueNumberIdentifier

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.

CustomFields

A collection of custom field/value pairs.

Customer

The customer details used to process this transaction. If the transaction was created using Vault tokens, then the customer_details is a snapshot of the customer in the Vault at the time the transaction was created.

Company string

The customer company name. See the transaction API requests section for details.

Email string

The email address. See the transaction API requests section for details.

Fax string

The customer fax number. See the transaction API requests section for details.

FirstName string

The first name. See the transaction API requests section for details.

Id string

Reference value that is associated with the customer's Id at the time of the transaction.

LastName string

The last name. See the transaction API requests section for details.

Phone string

The customer phone number. See the transaction API requests section for details.

Website string

The customer website address. See the transaction API requests section for details.

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
Descriptor
Name string

The value in the business name field of a customer's statement.

Phone string

The value in the phone number field of a customer's statement.

Url string

The value in the URL/web address field of a customer's statement.

DisbursementDetails

Disbursement details contain information about how and when the transaction was disbursed, including timing and currency information. This detail is only available if you have an eligible merchant account.

DisbursementDate

The date that the funds associated with this transaction were disbursed. This attribute is only available if you have an eligible merchant account.

FundsHeld bool

A value indicating whether funds have been withheld from a disbursement to the merchant's bank account.

SettlementAmount Decimal

The amount of the transaction in the settlement currency. This attribute is only available if you have an eligible merchant account.

SettlementCurrencyExchangeRate

The exchange rate from the presentment currency to the settlement currency. This attribute is only available if you have an eligible merchant account.

SettlementCurrencyIsoCode

The settlement currency. See the ISO 4217 codes. This attribute is only available if you have an eligible merchant account.

Success

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.

Some of the most common reasons that funds are held from disbursement are risk reviews of the merchant's recent processing or as a result of ACH returns or rejects. If funds are held (for any reason) you will be notified with the proper steps to take.

Discounts Discount[]

A collection of discounts associated with this subscription.

Disputes

A collection of disputes associated with the transaction.

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"
MasterpassCardDetails

If PaymentInstrumentType is "masterpass_card", these are the details of the card used for the transaction. If the transaction was created using Vault tokens, then this attribute is a snapshot of the Masterpass card in the Vault at the time the transaction was created.

Bin

The first 6 digits of the credit card, known as the Bank Identification Number.

CardType

The type of the credit card. Possible values:

  • American Express
  • Diners Club
  • Discover
  • JCB
  • Maestro
  • MasterCard
  • Visa
CardholderName string

The cardholder name associated with the credit card.

Commercial enum

Whether the card type is a commercial card and is capable of processing Level 2 transactions. Possible values:

  • Braintree.CreditCardCommercial.YES
  • Braintree.CreditCardCommercial.NO
  • Braintree.CreditCardCommercial.UNKNOWN
CountryOfIssuance string

The country that issued the credit card. Possible country values follow ISO 3166-1.

CustomerLocation enum

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. Possible values:

  • Braintree.CreditCardCustomerLocation.INTERNATIONAL
  • Braintree.CreditCardCustomerLocation.US
  • Braintree.CreditCardCustomerLocation.UNRECOGNIZED
Debit enum

Whether the card is a debit card. Possible values:

  • Braintree.CreditCardDebit.YES
  • Braintree.CreditCardDebit.NO
  • Braintree.CreditCardDebit.UNKNOWN
DurbinRegulated enum

A value indicating whether the issuing bank's card range is regulated by the Durbin Amendment due to the bank's assets. Possible values:

  • Braintree.CreditCardDurbinRegulated.YES
  • Braintree.CreditCardDurbinRegulated.NO
  • Braintree.CreditCardDurbinRegulated.UNKNOWN
ExpirationDate string

The expiration date, formatted MMYY or MMYYYY. May be used instead of expiration_month and expiration_year.

ExpirationMonth string

The expiration month of the credit card used, formatted MM.

ExpirationYear string

The expiration year of the credit card used, formatted YYYY.

Healthcare enum

Whether the card is a healthcare card. Possible values:

  • Braintree.CreditCardHealthCare.YES
  • Braintree.CreditCardHealthCare.NO
  • Braintree.CreditCardHealthCare.UNKNOWN
ImageUrl

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).

IssuingBank string

The bank that issued the credit card.

LastFour

The last 4 digits of the credit card number.

MaskedNumber

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.

Payroll enum

Whether the card is a payroll card. Possible values:

  • Braintree.CreditCardPayroll.YES
  • Braintree.CreditCardPayroll.NO
  • Braintree.CreditCardPayroll.UNKNOWN
Prepaid enum

Whether the card is a prepaid card. Possible values:

  • Braintree.CreditCardPrepaid.YES
  • Braintree.CreditCardPrepaid.NO
  • Braintree.CreditCardPrepaid.UNKNOWN
ProductId string

The code for the product type of the card (e.g. D (Visa Signature Preferred), G (Visa Business)). See Product ID codes below for possible values.

Token string

The Vault token for the Masterpass 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 MasterpassCardDetails.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.

MerchantAccountId string

The merchant account ID used to create a transaction. Currency is also determined by merchant account ID.

OrderId string

The order ID of the transaction. On PayPal transactions, this field maps to the PayPal invoice number. PayPal invoice numbers are unique in your PayPal business account.

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"
PayPalDetails

If PaymentInstrumentType is "paypal_account", these are the details of the PayPal account used for the transaction.

AuthorizationId string

The identification value of the authorization within PayPal's API.

CaptureId string

PayPal id for a transaction.

CustomField string

Custom field/value pairs.

ImageUrl string

A URL that points to a PayPal image resource (a PNG file) hosted by Braintree.

PayerEmail string

The email address associated with the PayPal account that was used to create the request. This field will not be populated if the PayPal transaction declines and the payment method was not previously stored in the Vault.

PayerFirstName string

The first name associated with the PayPal account used to create the request.

PayerId string

The identifier for the PayPal account used in the request.

PayerLastName string

The last name associated with the PayPal account used to create the request.

PayerStatus string

The status of the PayPal account used to create the request.

PaymentId string

The identification value of the payment within PayPal's API.

RefundId string

PayPal id for a refund.

SellerProtectionStatus string

Indicates whether a transaction qualifies for PayPal Seller Protection.

TaxId string

Payer's tax id. Only returned for payments from Brazilian accounts.

TaxIdType string

Payer's tax id type. Only returned for payments from Brazilian accounts. Allowed values BR_CPF or BR_CNPJ.

Token string

An alphanumeric value that references a specific payment method stored in your Vault. Length and format of gateway-generated tokens and IDs may change at any time.

TransactionFeeAmount string

The transaction fee amount of the PayPal transaction.

A transaction fee of 1 will always be returned in sandbox integrations.

TransactionFeeCurrencyIsoCode string

The currency of the associated transaction fee.

PlanId string

The plan identifier.

ProcessorAuthorizationCode

The authorization code returned by the processor.

ProcessorResponseCode string

The processor response code. See the list of possible processor authorization responses.

ProcessorResponseText string

The processor response text. See the list of possible processor authorization responses.

ProcessorSettlementResponseCode string

The status of the request to capture the funds. See the list of possible processor settlement responses.

ProcessorSettlementResponseText string

The text explanation of the above processor settlement response code.

PurchaseOrderNumber string

A Level II 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.

RefundIds

The transaction refund ID(s) associated with a sale transaction. See the transaction API requests section for details.

RefundedTransactionId string

The sale transaction ID associated with a refund transaction. See the transaction API requests section for details.

RiskData

Risk data on credit card transactions. The data includes the risk identifier and the risk decision, which can provide further context on how a transaction was scored by Braintree.

Decision string

The risk decision. Possible values:

  • Not Evaluated
  • Approve
  • Review
  • Decline
Id string

The risk data identifier.

ServiceFeeAmount Decimal

The portion of a sub-merchant's transaction revenue that was routed to the master merchant account.

Available to Braintree Marketplace merchants and Partners. See Creating Transactions with Service Fees for more details.

SettlementBatchId string

The identification value of the settlement batch in which the transaction was processed. The format may change at any time but is currently YYYY-MM-DD_m_d where m is the merchant account token without special characters and d is an alphanumeric string to guarantee uniqueness.

ShippingAddress

The shipping address details used to process this transaction. If shipping address was stored in the Vault, then the shipping_details is a snapshot of the address in the Vault at the time the transaction was created.

Company string

The shipping company name. See the transaction API requests section for details.

CountryCodeAlpha2 string

The 2-letter shipping country code. See the transaction API requests section for details.

CountryCodeAlpha3 string

The 3-letter shipping country code. See the transaction API requests section for details.

CountryCodeNumeric string

The numeric shipping country code. See the transaction API requests section for details.

CountryName string

The shipping country name. See the transaction API requests section for details.

ExtendedAddress string

The extended shipping address. See the transaction API requests section for details.

FirstName string

The first name. See the transaction API requests section for details.

Id string

The shipping details ID. A customer Vault record can contain up to 50 shipping and billing addresses, each with a unique ID. See the transaction API requests section for details.

LastName string

The last name. See the transaction API requests section for details.

Locality string

The locality/city. See the transaction API requests section for details.

PostalCode string

The postal code. See the transaction API requests section for details.

Region string

The state or province. See the transaction API requests section for details.

StreetAddress string

The street address. See the transaction API requests section for details.

Status string

Possible values:

  • "authorization_expired"
  • "authorized"
  • "authorizing"
  • "settlement_pending"
  • "settlement_confirmed"
  • "settlement_declined"
  • "failed"
  • "gateway_rejected"
  • "processor_declined"
  • "settled"
  • "settling"
  • "submitted_for_settlement"
  • "voided"

See the transaction status explanations for details.

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"
Subscription
BillingPeriodEndDate

The end date for the current billing period, regardless of subscription status. Automatic retries on past due subscriptions do not change the start and end dates of the current billing period.

BillingPeriodStartDate

The start date for the current billing period, regardless of subscription status. Automatic retries on past due subscriptions do not change the start and end dates of the current billing period.

SubscriptionId string

The value used to identify a specific subscription.

TaxAmount Decimal

A Level II data field that specifies the amount of tax that was included in the total transaction amount. It is never negative, and it does not add to the total transaction amount.

TaxExempt bool

A Level II data field that indicates whether or not the transaction should be considered eligible for tax exemption. This does not affect the total transaction amount.

ThreeDSecureInfo

The 3D Secure information for this transaction.

Enrolled string

Indicates whether a card is enrolled in a 3D Secure program or not. Possible values:

  • Y = Yes
  • N = No
  • U = Unavailable
  • B = Bypass
  • E = RequestFailure
LiabilityShiftPossible bool

Indicates whether a liability shift is possible.

LiabilityShifted bool

Indicates whether the liability shifted or not.

Status string

The 3D Secure status value. For a list of all possible statuses and their liability shifts, see the 3D Secure guide.

Type string

The value that defines whether a transaction is a sale or credit.

UpdatedAt DateTime

The date/time the object was last updated.

VenmoAccount

If PaymentInstrumentType is "venmo_account", these are the details of the Venmo account used for the transaction.

Venmo payments are currently in a limited release and are only available to select merchants. See the Venmo guide for details.

ImageUrl string

A URL that points to a payment method image resource (a PNG file) hosted by Braintree.

SourceDescription string

A short description of the payment method, including the Venmo username.

Token string

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 Venmo account.

Username string

The Venmo username of the Venmo account.

VenmoUserId string

The Venmo user ID of the Venmo account.

VisaCheckoutCardDetails

If PaymentInstrumentType is "visa_checkout_card", these are the details of the card used for the transaction. If the transaction was created using Vault tokens, then this attribute is a snapshot of the Visa Checkout card in the Vault at the time the transaction was created.

Bin

The first 6 digits of the credit card, known as the Bank Identification Number.

CallId string

The Visa assigned identifier of the transaction.

CardType

The type of the credit card. Possible values:

  • American Express
  • Discover
  • MasterCard
  • Visa
CardholderName string

The cardholder name associated with the credit card.

Commercial enum

Whether the card type is a commercial card and is capable of processing Level 2 transactions. Possible values:

  • Braintree.CreditCardCommercial.YES
  • Braintree.CreditCardCommercial.NO
  • Braintree.CreditCardCommercial.UNKNOWN
CountryOfIssuance string

The country that issued the credit card. Possible country values follow ISO 3166-1.

CustomerLocation enum

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. Possible values:

  • Braintree.CreditCardCustomerLocation.INTERNATIONAL
  • Braintree.CreditCardCustomerLocation.US
  • Braintree.CreditCardCustomerLocation.UNRECOGNIZED
Debit enum

Whether the card is a debit card. Possible values:

  • Braintree.CreditCardDebit.YES
  • Braintree.CreditCardDebit.NO
  • Braintree.CreditCardDebit.UNKNOWN
DurbinRegulated enum

A value indicating whether the issuing bank's card range is regulated by the Durbin Amendment due to the bank's assets. Possible values:

  • Braintree.CreditCardDurbinRegulated.YES
  • Braintree.CreditCardDurbinRegulated.NO
  • Braintree.CreditCardDurbinRegulated.UNKNOWN
ExpirationDate string

The expiration date, formatted MMYY or MMYYYY. May be used instead of expiration_month and expiration_year.

ExpirationMonth string

The expiration month of the credit card used, formatted MM.

ExpirationYear string

The expiration year of the credit card used, formatted YYYY.

Healthcare enum

Whether the card is a healthcare card. Possible values:

  • Braintree.CreditCardHealthCare.YES
  • Braintree.CreditCardHealthCare.NO
  • Braintree.CreditCardHealthCare.UNKNOWN
ImageUrl

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).

IssuingBank string

The bank that issued the credit card.

LastFour

The last 4 digits of the credit card number.

MaskedNumber

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.

Payroll enum

Whether the card is a payroll card. Possible values:

  • Braintree.CreditCardPayroll.YES
  • Braintree.CreditCardPayroll.NO
  • Braintree.CreditCardPayroll.UNKNOWN
Prepaid enum

Whether the card is a prepaid card. Possible values:

  • Braintree.CreditCardPrepaid.YES
  • Braintree.CreditCardPrepaid.NO
  • Braintree.CreditCardPrepaid.UNKNOWN
ProductId string

The code for the product type of the card (e.g. D (Visa Signature Preferred), G (Visa Business)). See Product ID codes below for possible values.

Token string

The Vault token for the Visa Checkout 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 VisaCheckoutCardDetails.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.

VoiceReferralNumber

The value passed by the merchant with a voice-authorized transaction.

Result object

Read more about result objects.

Successful result

If the result is successful, the transaction will have either an authorized status, or (if the Options.SubmitForSettlement option was used) a submitted for settlement status.

C♯
Click to copy
Copied
if (result.IsSuccess())
{
    Transaction transaction = result.Target;
    TransactionStatus status = transaction.Status;
    // TransactionStatus.AUTHORIZED
}

Additionally, you may inspect the result to determine if the transaction was created using a specific payment method type (e.g. PayPal account or a credit card), using the provided format.

C♯
Click to copy
Copied
Transaction transaction = result.Target;
transaction.PaymentInstrumentType == PaymentInstrumentType.PAYPAL_ACCOUNT;
// false
transaction.PaymentInstrumentType == PaymentInstrumentType.CREDIT_CARD;
// true

Unsuccessful result

Success will return false if:

C♯
Click to copy
Copied
if (!result.IsSuccess())
{
    ValidationErrors errors = result.Errors;
}

Validation errors

If any parameters are invalid, then the success call will return false and the result object will contain one or more validation errors indicating which parameters were invalid.

When receiving a validation error, a Transaction object will not be present on the result object.

Processor declined

If the processor declines the transaction during the authorization, the processor response will be available on the transaction object.

C♯
Click to copy
Copied
if (!result.IsSuccess())
{
    Transaction transaction = result.Transaction;
    if (transaction.Status == TransactionStatus.PROCESSOR_DECLINED)
    {
        Console.WriteLine(transaction.ProcessorResponseCode);
        // e.g. "2001"
        Console.WriteLine(transaction.ProcessorResponseText);
        // e.g. "Insufficient Funds"
    }
}

As a supplement to the standardized processor response codes, we will return bank-specific Additional Processor Responses on the transaction object. The standardized code is what you should use when handling the result object, but the Additional Processor Response might provide further context.

C♯
Click to copy
Copied
Console.WriteLine(transaction.AdditionalProcessorReponse);
# e.g. "05 : NOT AUTHORISED"

Processor settlement declined

If the processor declines the transaction at the settlement stage, the processor response will be available on the transaction object.

C♯
Click to copy
Copied
if (!result.IsSuccess())
{
    Transaction transaction = result.Transaction;
    if (transaction.Status == TransactionStatus.SETTLEMENT_DECLINED)
    {
        Console.WriteLine(transaction.ProcessorSettlementResponseCode);
        // e.g. "4001"
        Console.WriteLine(transaction.ProcessorSettlementResponseText);
        // e.g. "Settlement Declined"
    }
}

Gateway rejection

If the transaction is rejected by the gateway based on your account settings, you can check for the transaction status and gateway rejection reason.

C♯
Click to copy
Copied
if (!result.IsSuccess())
{
    Transaction transaction = result.Transaction;
    if (transaction.Status == TransactionStatus.GATEWAY_REJECTED)
    {
        Console.WriteLine("Gateway rejected.");
        Console.WriteLine(transaction.GatewayRejectionReason);
        // e.g. "avs"
    }
}

Risk data

We will also return the risk data on all credit card transactions. The data includes the risk identifier and the risk decision, which can provide further context on how a transaction was scored by Braintree.

C♯
Click to copy
Copied
Transaction transaction = result.Transaction;
Console.WriteLine(transaction.RiskData.Id);
# "1SG23YHM4BT5"
Console.WriteLine(transaction.RiskData.Decision);
# "Decline"

The possible values of the risk decision are:

  • "Not Evaluated"
  • "Approve"
  • "Review"
  • "Decline"

Params retrieval

See our documentation on result objects.

Examples

Currencies

Each merchant account can only process transactions for a single currency. Setting which merchant account to use will also determine which currency the transaction is processed with.

C♯
Click to copy
Copied
Transaction transaction = result.Target;
string currencyIsoCode = transaction.CurrencyIsoCode; // USD

Settlement status

Check the result for success, and if it has failed, then first check for validation errors. If there are no validation errors, inspect the processorSettlementResponseCode on the transaction, which will indicate if the processor declined the request.

C♯
Click to copy
Copied
if (result.IsSuccess()) {
    // transaction successfully submitted for settlement
} else if (result.Errors.DeepCount > 0) {
    foreach (ValidationError error in result.Errors.DeepAll()) {
        Console.WriteLine(error.Message);
    }
} else {
    Console.WriteLine(result.Transaction.ProcessorSettlementResponseCode);
    Console.WriteLine(result.Transaction.ProcessorSettlementResponseText);
}

Processor settlement declined

If the settlement request is declined by the processor, the processor response will be available on the transaction object.

C♯
Click to copy
Copied
if (!result.IsSuccess())
{
    Transaction transaction = result.Transaction;
    if (transaction.Status == TransactionStatus.SETTLEMENT_DECLINED)
    {
        Console.WriteLine(transaction.ProcessorSettlementResponseCode);
        // e.g. "4001"
        Console.WriteLine(transaction.ProcessorSettlementResponseText);
        // e.g. "Settlement Declined"
    }
}

Voiding settlement

If you submit a transaction for settlement and then decide you actually don't want to settle it, you can void it before it's settled. After it's settled, you'll need to refund it instead.

To check if the transaction has been settled, find the transaction and check the status.

C♯
Click to copy
Copied
Transaction transaction = gateway.Transaction.Find("the_transaction_id");

if (transaction.Status == TransactionStatus.SUBMITTED_FOR_SETTLEMENT)
{
    // can void
}
else if (transaction.Status == TransactionStatus.SETTLED)
{
    // will have to refund it
}
else
{
    // this example only expected one of the two above statuses
}

Disputes objects

When a customer issues a chargeback, the original transaction will have a collection of disputes associated with it.

Dispute Detail Description
Amount Amount customer requested when disputing the transaction. This can be any amount up to the full amount of the original transaction.
CurrencyIsoCode The currency of the amount.
DateOpened The date the dispute was opened.
DateWon The date the dispute was won. Only available on disputes that were won.
Id A unique ID for each dispute.
Kind The kind of dispute. Possible values:
  • "chargeback"
  • "pre_arbitration"
  • "retrieval"
For more information see the article on dispute kinds.
ReceivedDate The date we received the dispute.
ReplyByDate The date a reply with evidence is due.
Reason The reason the dispute was created. Possible values:
  • "cancelled_recurring_transaction" - The cardholder was billed for a recurring charge they canceled or attempted to cancel.
  • "credit_not_processed" - The cardholder was told they were to receive a credit and did not.
  • "duplicate" - The individual charge was submitted more than once.
  • "fraud" - The cardholder is claiming this transaction to be fraudulent.
  • "general" - A generic response was provided by the card-issuing bank.
  • "invalid_account" - Card was expired, had an invalid account number, or had an account number that did not match the card number of the original transaction.
  • "not_recognized" - The cardholder claims they do not recognize/did not participate in this charge.
  • "product_not_received" - The cardholder did not receive (or only partially received) the goods/services they paid for.
  • "product_unsatisfactory" - The cardholder received the goods/services, but the product was defective, different than described, or otherwise did not meet expectations.
  • "transaction_amount_differs" - The cardholder claims the charge the merchant submitted was different than what the cardholder agreed to pay.
Status The latest status of the dispute. Possible values:
  • "open" - Dispute has been opened by the customer and funds have been debited from your account
  • "lost" - The bank has reviewed evidence and declined to reverse the dispute or you didn't provide evidence
  • "won" - The bank has reversed the dispute and funds have been credited to your account

Authorization adjustments

When submitting a transaction for settlement, if you specify a settlement amount that is different than the authorized amount, an authorization adjustment may be performed automatically.

For each adjustment performed, an authorization adjustment object will be associated with the original transaction. These adjustment objects will include the following details:

Adjustment Detail Description
Amount The difference between the authorized amount and the amount submitted for settlement. Negative values indicate the authorized amount was adjusted down.
Success A boolean value indicating if the adjustment was successful.
Timestamp The date/time when the adjustment was performed.

Product ID codes

The Braintree gateway returns the following product IDs for credit and debit card payment methods. The product ID is generally 1-3 characters and indicates the specific credit product that was issued to the customer.

Product ID code Product name
001 Discover Consumer Credit – Rewards
002 Discover Commercial Credit
003 Discover Consumer Debit
004 Discover Commercial Debit
005 Discover Prepaid Gift
006 Discover Prepaid ID known
007 Discover Consumer Credit – Premium
008 Discover Consumer Credit - Core
009 Discover Private Label Credit
010 Discover Commercial Credit – Executive Business
011 Discover Consumer Credit – Premium Plus
012 Discover Commercial Prepaid – Non-Reloadable
A Visa Traditional
B Visa Traditional Rewards
C Visa Signature
CIR MasterCard Cirrus
D Visa Signature Preferred
DAG Global Debit MasterCard Salary
DAP Platinum Debit MasterCard Salary
DAS Standard Debit MasterCard Salary
DLG Debit MasterCard Gold Delayed Debit
DLH Debit MasterCard World Embossed Delayed Debit
DLP Debit MasterCard Platinum Delayed Debit
DLS Debit MasterCard Card Delayed Debit
DOS Standard Debit MasterCard Social
E Visa Proprietary ATM
F Visa Classic
G Visa Business
G1 Visa Signature Business
G3 Visa Business Enhanced (US only)
I Visa Infinite
I2 Visa UHNW
IB American Express Non-US
IR American Express Non-US Reloadable
IS American Express Non-US Stored Value
J3 Visa Healthcare
K Visa Corporate T&E
K1 Visa GSA Corporate T&E
L Visa Electron
MAB World Elite MasterCard for Business Card
MAC MasterCard World Elite Corporate Card
MAP MasterCard Commercial Payments Account
MBB MasterCard Prepaid Consumer
MBC MasterCard Prepaid Voucher
MBE MasterCard Electronic Business Card
MBF Prepaid MC Food
MBK MasterCard Black Card
MBM Prepaid MC Meal
MBP MasterCard Corporate Prepaid
MBT MasterCard Corporate Prepaid Travel
MCB MasterCard BusinessCard Card
MCC MasterCard Credit Card (mixed BIN)
MCD Debit MasterCard Card
MCE MasterCard Electronic Card
MCF MasterCard Fleet Card
MCG Gold MasterCard Card
MCH MasterCard Premium Charge
MCO MasterCard Corporate (Meeting) Card
MCP MasterCard Purchasing Card
MCS (Unembossed) Standard MasterCard Card
MCT Titanium MasterCard Card
MCV Merchant-Branded Program
MCW World MasterCard Card
MDB Debit MasterCard BusinessCard Card
MDG Gold Debit MasterCard Card
MDH World Debit Embossed MasterCard Card
MDJ Debit MasterCard (Enhanced)
MDL MasterCard Business Debit Other Embossed
MDO MasterCard Debit Other
MDP Premium Debit MasterCard Card
MDW World Elite Debit MasterCard
MEB MasterCard Executive BusinessCard Card
MEC MasterCard Electronic Commercial
MEF MasterCard Electronic Payment Account
MEO MasterCard Corporate Executive Card
MFB MasterCard Flex World Elite
MFD MasterCard Flex Platinum
MFE MasterCard Flex Charge World Elite
MFH MasterCard Flex World
MFL MasterCard Flex Charge Platinum
MFW MasterCard Flex World Charge
MGF MasterCard Government Commercial Card
MHA MasterCard Healthcare Prepaid Non-Tax
MHB MasterCard HSA Substantiated (Debit MasterCard)
MHH MasterCard HSA Non-Substantiated (Debit MasterCard)
MIA Prepaid MasterCard Unembossed Student Card
MIK Prepaid MasterCard Electronic Student (Non-US) Card
MIL Unembossed MasterCard Student Card (Non-US)
MIP Prepaid Debit MasterCard Student Card
MIU Debit MasterCard Unembossed (Non-US)
MLF MasterCard Agro Card
MNW MasterCard World Card
MOC Standard Maestro Social
MOG Maestro Gold Card
MOP Maestro Platinum
MOW World Maestro
MPA Prepaid Debit Standard Payroll
MPF MasterCard Prepaid Debit Standard Gift
MPG Debit MasterCard Standard Prepaid General Spend
MPJ Prepaid Debit MasterCard Card Gold
MPK MasterCard Prepaid Government Commercial Card
MPL Platinum MasterCard Card
MPM MasterCard Prepaid Debit Standard Consumer Incentive
MPN MasterCard Prepaid Debit Standard Insurance
MPO MasterCard Prepaid Debit Standard Offer
MPP MasterCard Prepaid Card – Commercial Reward Funding
MPQ MasterCard Prepaid Debit Standard Government Disaster
MPR MasterCard Prepaid Debit Standard Travel
MPT MasterCard Prepaid Debit Standard Teen
MPV MasterCard Prepaid Debit Standard Government
MPW Debit MasterCard Business Card Prepaid Workplace Business
MPX MasterCard Prepaid Debit Standard Flex Benefit
MPY MasterCard Prepaid Debit Standard Employee Incentive
MPZ MasterCard Prepaid Debit Standard Government Consumer
MRB MasterCard Prepaid Electronic Business Card (Non-US)
MRC Prepaid MasterCard Electronic Card (Non-US)
MRG MasterCard Prepaid Card (Non-US)
MRH MasterCard Platinum Prepaid Travel (US)
MRJ Prepaid MasterCard Gold Card
MRK Prepaid MasterCard Public Sector Commercial Card
MRL Prepaid MasterCard Electronic Commercial Card (Non-US)
MRO MasterCard Rewards Only
MRP Standard Retailer Centric Payments
MRS Prepaid MasterCard ISIC Student Card
MRW Prepaid MasterCard Business Card (Non-US)
MSA Prepaid Maestro Payroll Card
MSB Maestro Small Business Card
MSF Prepaid Maestro Gift Card
MSG Prepaid Maestro Consumer Reloadable Card
MSI Maestro Student Card
MSJ Prepaid Maestro Gold
MSM Prepaid Maestro Consumer Promotion Card
MSN Prepaid Maestro Insurance Card
MSO Prepaid Maestro Other Card
MSQ Unknown MasterCard
MSR Prepaid Maestro Travel Card
MST Prepaid Maestro Teen Card
MSV Prepaid Maestro Government Benefit Card
MSW Prepaid Maestro Corporate (Reloadable) Card
MSX Prepaid Maestro Flex Benefit Card
MSY Prepaid Maestro Employee Incentive Card
MSZ Prepaid Maestro Emergency Assistance Card
MTP MasterCard Platinum Prepaid Travel (UK and Brazil)
MUS Prepaid Unembossed MasterCard Card
MUW MasterCard World Domestic Affluent
MWB World Elite MasterCard Business Card
MWD World Deferred MasterCard
MWE World Elite MasterCard Card
MWO World Elite MasterCard Corporate Card
MWR MasterCard World Retailer Centric Payments
N Visa Platform
N1 Visa Rewards
OLB Maestro Small Business Delayed Debit
OLG Maestro Gold Delayed Debit
OLP Maestro Platinum Delayed Debit
OLS Maestro (Student Card) Delayed Debit
OLW World Maestro Delayed Debit
P Visa Gold
PMC MasterCard Proprietary Credit Card (Swedish domestic)
PMD MasterCard Proprietary Debit Card (Swedish domestic)
PSC MasterCard Common Proprietary Swedish Credit Card
PSD MasterCard Common Proprietary Swedish Debit Card
PVA MasterCard Private Label A
PVB MasterCard Private Label B
PVC MasterCard Private Label C
PVD MasterCard Private Label D
PVE MasterCard Private Label E
PVF MasterCard Private Label F
PVG MasterCard Private Label G
PVH MasterCard Private Label H
PVI MasterCard Private Label I
PVJ MasterCard Private Label J
PVL MasterCard Private Label K
Q Visa Private Label
R Visa Proprietary
RP American Express US Reloadable
S Visa Purchasing
S1 Visa Purchasing with Fleet
S2 Visa GSA Purchasing
S3 Visa GSA Purchasing with Fleet
S4 Visa Government Services Loan
S5 Visa Commercial Transport (EBT)
S6 Visa Business Loan
S7 Visa Distribution
SAG Gold MasterCard Salary Immediate Debit
SAL Standard Maestro Salary
SAP Platinum MasterCard Salary Immediate Debit
SAS Standard MasterCard Salary Immediate Debit
SOS Standard MasterCard Social Immediate Debit
SUR Prepaid Unembossed MasterCard Card (Non-US)
SV American Express US Stored Value
TBE MasterCard Electronic Business Immediate Debit
TCB MasterCard Corporate Immediate Debit
TCC MasterCard (mixed BIN) Immediate Debit
TCE MasterCard (Electronic) Student Card Immediate Debit
TCF MasterCard Fleet Card Immediate Debit
TCG Gold MasterCard Card Immediate Debit
TCO MasterCard (Corporate) Immediate Debit
TCP MasterCard Purchasing Card Immediate Debit
TCS MasterCard Standard (Unembossed) Card Immediate Debit
TCW MasterCard World Signia Immediate Debit
TEB MasterCard Executive BusinessCard Card Immediate Debit
TEC MasterCard Electronic Commercial Immediate Debit
TEO MasterCard Corporate Executive Card Immediate Debit
TNF MasterCard Public Sector Commercial Card Immediate Debit
TNW MasterCard New World Immediate Debit
TPB MasterCard Preferred Business Card Immediate Debit
TPL Platinum MasterCard Immediate Debit
U Visa Travel Money
V Visa V Pay
WBE World MasterCard Black Edition

See also

Still have questions?

If you can’t find an answer, contact our Support team.