These developer docs are now deprecated and will not contain updated information that you may need to reference, including latest release versions. If you wish to see the current developer docs, please visit developers.braintreepayments.com.

Transaction Details with Python

transaction.id

Transaction IDs are made up of alpha-numeric characters and are at least 6 characters in length. Example: “gy46fg”

transaction.avs_error_response_code

The AVS error response code will be populated if there was an error when checking AVS. If this is not set then you will have an avs_postal_code_response_code and an avs_street_address_response_code.

S = Issuing bank does not support AVS

E = AVS system error

A = Not Applicable

transaction.avs_postal_code_response_code

If there was an error processing AVS this will not be set and instead you will have an avs_error_response_code. Otherwise this will populated as one of the following values.

M = Matches

N = Does not Match

U = Not Verified

I = Not Provided

A = Not Applicable

transaction.avs_street_address_response_code

If there was an error processing AVS this will not be set and instead you will have an avs_error_response_code. Otherwise this will populated as one of the following values.

M = Matches

N = Does not Match

U = Not Verified

I = Not Provided

A = Not Applicable

transaction.amount

A BigDecimal object for the transaction amount. If you settle a different amount than what was authorized, this will return the amount settled.

transaction.channel

If the transaction was created through a shopping card provider or other Braintree partner, this is a string identifier for that shopping cart provider or partner.

transaction.created_at

Date/time the transaction was created.

transaction.credit_card_details

The credit card details used to process this transaction. If the transaction was created using Vault tokens, then the credit_card_details is a snapshot of the credit card in the Vault at the time the transaction was created. So if the credit card in the Vault is updated after the transaction is created, transaction.credit_card_details.masked_number will return the previous number that was used to process the transaction, while transaction.vault_credit_card.masked_number will return the current masked number for the token that was used to create the transaction.

transaction.credit_card_details.bin

The first 6 digits of the credit card number.

transaction.credit_card_details.card_type

The type of the credit card.

American Express

Carte Blanche

China UnionPay

Diners Club

Discover

JCB

Laser

Maestro

MasterCard

Solo

Switch

Visa

Unknown

transaction.credit_card_details.cardholder_name

transaction.credit_card_details.customer_location

“US” if the billing address is in the US or not specified. “International” if the billing country is not in the US.

transaction.credit_card_details.expiration_month

Formatted as MM.

transaction.credit_card_details.expiration_year

Formatted as YYYY.

transaction.credit_card_details.expiration_date

Formatted as MM/YYYY.

transaction.credit_card_details.last_4

The last four digits of the credit card number.

transaction.credit_card_details.token

The Vault token for the credit card. This is the only attribute that is not a snapshot. If you update your Vault tokens after creating a transaction, this attribute will return the new token rather than what the token was at the time the transaction was created.

transaction.credit_card_details.masked_number

The credit card number with middle digits masked, e.g. 510510******5100. Currently we always return six asterisks in the middle, even if the actual credit card number isn’t 16-digits long.

transaction.customer_details

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. So if the customer in the Vault is updated after the transaction is created, transaction.customer_details.first_name will return the previous first name that was used to process the transaction, while transaction.vault_customer.first_name will return the current first name for the customer that was used to create the transaction.

transaction.currency_iso_code

The currency for the transaction. “USD” for US dollars. See the ISO 4217 codes.

transaction.custom_fields

A hash of custom fields stored on the transaction.

transaction.cvv_response_code

M = Matches

N = Does not Match

U = Not Verified

I = Not Provided

A = Not Applicable

transaction.disputes

Collection of disputes for a transaction. If transaction has not be disputed, this will be an empty collection. See Disputes for details.

transaction.gateway_rejection_reason

Indicates why the transaction was rejected. Only set if the status is gateway rejected.

avs

avs_and_cvv

cvv

duplicate

fraud

Note: This was added in version 2.4.0

transaction.merchant_account_id

transaction.order_id

transaction.billing_details

The billing address details used to process this transaction. If billing address was stored in the Vault, then the billing_address_details is a snapshot of the address in the Vault at the time the transaction was created. So if the address in the Vault is updated after the transaction is created, transaction.billing_address_details.postal_code will return the previous postal code that was used to process the transaction, while transaction.vault_billing_address.postal_code will return the current postal code for the address in the Vault.

The address details are similar to those found on the address details page.

transaction.billing_details.company

transaction.billing_details.country_code_alpha2

transaction.billing_details.country_code_alpha3

transaction.billing_details.country_code_numeric

transaction.billing_details.country_name

transaction.billing_details.extended_address

transaction.billing_details.first_name

transaction.billing_details.last_name

transaction.billing_details.locality

transaction.billing_details.postal_code

transaction.billing_details.region

transaction.billing_details.street_address

transaction.disbursement_details

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.

transaction.disbursement_details.disbursement_date

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

transaction.disbursement_details.success

Whether the funds were disbursed successfully or not. This value can change over time if we receive an exception and then retry the disbursement. This detail is only available if you have an eligible merchant account.

transaction.disbursement_details.settlement_amount

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

transaction.disbursement_details.settlement_currency_iso_code

The settlement currency. This detail is only available if you have an eligible merchant account.

transaction.disbursement_details.settlement_currency_exchange_rate

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

US & Canada

Europe

UK

Australia

Add the following text to your marketplace's Terms of Service. Don't forget to replace [MSP] with your marketplace's name.

[MSP NAME] uses Braintree, a division of PayPal, Inc. (Braintree) for payment processing services. By using the Braintree payment processing services you agree to the Braintree Payment Services Agreement available at https://www.braintreepayments.com/legal/gateway-agreement, and the applicable bank agreement available at https://www.braintreepayments.com/legal/cea-wells. If you have questions regarding the MSA, please contact Braintree at 877.434.2894.