Collecting data from Braintree

In this article, we’ll show you how to customize the information that Braintree sends to Quaderno to generate your invoices and tax reports.

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 when you create the Braintree Customer in your back-end system.
We recommend, when creating a customer in Braintree, that you always send the country and IP address. This will make it easier to be EU VAT compliant.
We’re a Rails house at Quaderno, so here’s how we’d do it in Ruby:
customer = Braintree::Customer.create(
  
You can use two custom fields  ('custom_fields') to specify your customer’s IP address and Tax ID. Both fields are optional.

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(
 
Use 'transaction_description' freely
⚠️
Remember, 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 are optional. Quaderno can handle the following:
Custom fields in Braintree
custom_fields field
Description
Tax ID (only for customers)
Customer’s IP Address (only for customers)
Description of the transaction (only for one-off transactions)
Code for the evidence country in standard format: ISO 3166-1 alpha-2 (ES, FR, US, GB, etc.)
Brief description (max 255 characters) of the evidence. Required field for additional evidence.
Unique code of the product or service sold.