Sending transaction details from Braintree

Quaderno automatically generates your invoices and credit notes with the customer details received from Braintree, which in turn receives the information collected by the platform you are using to manage your sales.

This article reviews how to customize the information that Braintree sends to Quaderno. This information is useful for integrators and developers.

For cases where some details are missing from your documents, please check Braintree's developers docs or contact your third party platform’s support team to ask them for help fixing these issues.

Customizing the customer billing info

If you’d like to customize the billing info in your invoices, you can do so using the billing_address and custom_fields hashes when you create the Braintree Customer in your backend system.

When creating a customer in Braintree we always recommend sending the country and IP address. This will make it easier to be EU VAT compliant.

For B2B sales, you should also send your customer's tax_id in the custom_fields field.


We’re a Rails house at Quaderno, so here’s how we’d do it in Ruby:

customer = Braintree::Customer.create(

first_name: 'Maurice',

last_name: 'Moss',

company: 'Reynholm Industries',

email: 'moss.m@reynholm.com',

payment_method_nonce: 'nonce-from-the-client',

credit_card: {

billing_address: {

street_address: '123 Carenden Road',

locality: 'London',

postal_code: 'EC5M 8AJ',

country_code_alpha2: 'GB'

}

},

custom_fields: {

tax_id: 'GB184089977',

ip_address: request.ip

}

)

Customizing the transaction info

For one-off transactions, you can also specify the description of the transaction with custom_fields when creating the transaction in Braintree. For example:

transaction = Braintree::Transaction.sale(

amount: '10.00',

payment_method_nonce: nonce_from_the_client,

custom_fields: {

transaction_description: 'The Neverending Story, Michael Ende (EPUB)'

}

)

Before using any custom field, custom field names must be configured in your Braintree Control Panel, and values must be less than 255 characters.


Please select the option Store and Pass Back when you create a custom field. Quaderno needs these fields to be stored in your Braintree account.

Custom fields

All custom_fields fields are optional. Quaderno can handle the following:

custom_fields field Description
tax_id Tax ID (only for customers)
ip_address Customer’s IP Address (only for customers)
transaction_description Description of the transaction (only for one-off transactions)
additional_evidence_country Code for the evidence country in standard format: ISO 3166-1 alpha-2 (ES, FR, US, GB, etc.)
additional_evidence_type Brief description (max 255 characters) of the evidence. Required field for additional evidence.
sku Unique code of the product or service sold.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us