Collecting data from GoCardless

Customize your GoCardless integration to ensure Quaderno has all the information to automatically send your tax compliant invoices.

Customizing the customer billing info

If you’d like to customize the billing info in your invoices, you can do so using the metadata fields when you create the GoCardless Customer in your back-end system.
We’re a Rails house at Quaderno, so here’s how we’d do it in Ruby:
@client = GoCardlessPro::Client.new(
  access_token: ENV["GOCARDLESS_TOKEN"]
)

@client.customers.create(
  params: {
    given_name: 'Frank',
    family_name: 'Osborne',
    address_line_1: '27 Acer Road',
    address_line_2: 'Apt 2',
    city: 'London',
    postal_code: 'E8 3GX',
    country_code: 'GB',
    metadata: {
      vat_number: 'GB123456789'
    }
  }
)
Note that the GoCardless API only allows for three pieces of metadata to be included. For more on their API, check it out here.
We recommend that you at least include the country and postal code. This is the information Quaderno uses to determine your customer's location.

Customizing transactions

You can also customize the information sent to us for both charges and new subscriptions, setting the tax rates you want to apply and including the customer’s IP address (an important piece of location evidence).
If you need to calculate the taxes that you should apply to a charge or subscription, you can do so through our Tax API.
Here’s how we’d customize a transaction:
@client = GoCardlessPro::Client.new(
  access_token: ENV["GOCARDLESS_TOKEN"]
)

@client.payments.create(
  params: {
    amount: 100, # total amount (taxes included)
    currency: "GBP",
    links: {
      mandate: "MD123"
    },
    metadata: {
      ip_address: request.ip,
      sku: "product_code"
    }
  }
)

@client.subscriptions.create(
  params: {
    amount: 100, # total amount (taxes included)
    currency: "GBP",
    interval_unit: 'monthly',
    links: {
      mandate: "MD123"
    },
    metadata: {
      ip_address: request.ip,
      sku: "product_code"
    }
  }
)