Sending transaction details from Braintree
Quaderno automatically generates invoices and credit notes using the customer details received from Braintree, which in turn receives the information from the platform you use to manage your sales. This article covers how to customize that data — it's aimed at integrators and developers.
If details are missing from your documents, check Braintree's developer docs or contact your third-party platform's support team.
Customizing the customer billing info
You can customize the billing info in your invoices using the billing_address and custom_fields hashes when you create the Braintree Customer in your backend.
Always send the country and ip_address fields — this makes it easier to comply with EU VAT requirements. For B2B sales, also send your customer's tax_id in custom_fields.
Here's a Ruby example:
customer = Braintree::Customer.create(
first_name: 'Maurice',
last_name: 'Moss',
company: 'Reynholm Industries',
email: '[email protected]',
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 specify a description using custom_fields when creating the transaction:
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, configure the field names in your Braintree Control Panel and keep values under 255 characters. When creating a custom field, select Store and Pass Back — Quaderno needs these fields stored in your Braintree account.
Custom fields reference
All custom_fields fields are optional. Quaderno supports the following:
| Custom fields | Description |
|---|---|
tax_id |
Tax ID (customers only) |
ip_address |
Customer's IP address (customers only) |
transaction_description |
Description of the transaction (one-off transactions only) |
additional_evidence_country |
Evidence country code in ISO 3166-1 alpha-2 format (ES, FR, US, GB, etc.) |
additional_evidence_type |
Brief description of the evidence, max 255 characters. Required when providing additional evidence. |
sku |
Unique code of the product or service sold |