Customising your GoCardless integration

In this article we explain how to customise your  GoCardless integration to ensure Quaderno has all the information to automatically send your VAT compliant invoices.

Customising the customer billing info

If you'd like to customise 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 to be EU VAT compliant.

Customising transactions

You can also customise 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 confirmation 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 customise 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
    }
  }
)

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