# Recurly

Recurly is a billing system designed to assist small and medium-sized enterprises in automating and managing their subscription and revenue workflows.

For more information about the API, see [Recurly Partner API (v2018-08-09)](https://partner-docs.recurly.com/v2018-08-09#section/Getting-Started).

See the [Schema](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#Schema) section for a list of objects available for replication.

## Preparing for authentication

To access your data, you need to authenticate the connection with your account credentials.

Information noteMake sure that the account you use has read access to the tables you want to fetch.

To generate the API key:

1. Make sure you have a role with the Integration permission in Recurly. You need it to generate the API key.
2. Log into your Recurly account.
3. Click Admin &gt; Users.
4. On the Users page, go to Integrations &gt; API Credentials.
5. Click Add Private API Key.
6. Fill in the fields:
   * Key Name: Enter a name for the API key. For example: Qlik.
   * Notes: Enter any notes you want about the API key.
7. Click Save Changes.
8. Copy the API key.

## Creating the connection

For more information, see [Connecting to SaaS applications](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/Landing/connecting-web-applications.htm).

1. Fill in the required connection properties.

2. Provide a name for the connection in Connection name.

3. Select Open connection metadata to define metadata for the connection when it has been created.

4. Click Create.

Connection settings

| Setting | Description |
| --- | --- |
| Data gateway | Select a Data Movement gateway if required by your use case.<br><br>Information note<br><br>This field is not available with the Qlik Talend Cloud Starter subscription, as it does not support Data Movement gateway. If you have another subscription tier and do not want to use Data Movement gateway, select None.<br><br>For information on the benefits of Data Movement gateway and use cases that require it, see [Qlik Data Gateway - Data Movement](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Gateways/replication-gateway.htm). |
| Start Date | Enter the date, in the format `MM/DD/YYYY`, from which the data must be replicated from your source to your target. |
| API Key | API key. |
| Subdomain | Enter your Recurly subdomain. If the full URL of the subdomain is `qlik.recurly.com`, enter qlik into this field. |
| Quota limit | Enter the percentage of the API rate limit you want to allocate to the integration. Example: 30. |

## Schema

Information note

Schemas and naming conventions can change from version to version. It is recommended to verify your version before continuing.

Depending on your destination, table and column names may not appear as they are outlined below.

### accounts

The `accounts` table contains info about the customer accounts in your Recurly account. Account objects store the history of the customer, billing info, etc.

### Custom fields

Recurly integration supports replicating custom fields for accounts objects.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly documentation](https://dev.recurly.com/Content/account-object)<br><br>[Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_accounts "Opens in new tab: Recurly API method") |

accounts table foreign keys

| Join accounts with | on |
| --- | --- |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>accounts.id = adjustments.account.id<br>```<br><br>```<br>accounts.parent_account_id = adjustments.account.id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = adjustments.account.id<br>```<br><br>```<br>accounts.id = adjustments.account.parent_account_id<br>```<br><br>```<br>accounts.parent_account_id = adjustments.account.parent_account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = adjustments.account.parent_account_id<br>``` |
| [billing_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#billing-info) | ```<br>accounts.id = billing_info.account_id<br>```<br><br>```<br>accounts.parent_account_id = billing_info.account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = billing_info.account_id<br>``` |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>accounts.id = coupon_redemptions.account_id<br>```<br><br>```<br>accounts.parent_account_id = coupon_redemptions.account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = coupon_redemptions.account_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>accounts.id = invoices.account.id<br>```<br><br>```<br>accounts.parent_account_id = invoices.account.id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = invoices.account.id<br>```<br><br>```<br>accounts.id = invoices.account.parent_account_id<br>```<br><br>```<br>accounts.parent_account_id = invoices.account.parent_account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = invoices.account.parent_account_id<br>```<br><br>```<br>accounts.id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>accounts.parent_account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>accounts.id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>accounts.parent_account_id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = invoices.line_items.data.shipping_addresses.account_id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>accounts.id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>accounts.parent_account_id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = subscriptions.shipping_address.account_id<br>``` |
| [transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#transactions) | ```<br>accounts.id = transactions.account.id<br>```<br><br>```<br>accounts.parent_account_id = transactions.account.id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = transactions.account.id<br>```<br><br>```<br>accounts.id = transactions.account.parent_account_id<br>```<br><br>```<br>accounts.parent_account_id = transactions.account.parent_account_id<br>```<br><br>```<br>accounts.shipping_addresses.account_id = transactions.account.parent_account_id<br>``` |

accounts table schema

| **address**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>city</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul> |
| --- |
| **bill\_to**<br><br><br>STRING |
| **billing\_info**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>account_id</b>: STRING</li><li><b>address</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>city</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul></li><li><b>company</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>first_name</b>: STRING</li><li><b>fraud</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>decision</b>: STRING</li><li><b>risk_rules_triggered</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>score</b>: INTEGER</li></ul></li></ul></li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>payment_info</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>card_type</b>: STRING</li><li><b>exp_month</b>: INTEGER</li><li><b>exp_year</b>: INTEGER</li><li><b>first_six</b>: STRING</li><li><b>last_four</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>updated_at</b>: DATE-TIME</li><li><b>updated_by</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>country</b>: STRING</li><li><b>ip</b>: STRING</li></ul></li><li><b>valid</b>: BOOLEAN</li><li><b>vat_number</b>: STRING</li></ul> |
| **cc\_emails**<br><br><br>STRING |
| **code**<br><br><br>STRING |
| **company**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **custom\_fields**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>name</b>: STRING</li><li><b>value</b>: STRING</li></ul> |
| **deleted\_at**<br><br><br>DATE-TIME |
| **email**<br><br><br>STRING |
| **exemption\_certificate**<br><br><br>STRING |
| **first\_name**<br><br><br>STRING |
| **hosted\_login\_token**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **last\_name**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **parent\_account\_id**<br><br><br>STRING |
| **preferred\_locale**<br><br><br>STRING |
| **shipping\_addresses**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>account_id</b>: STRING</li><li><b>city</b>: STRING</li><li><b>company</b>: STRING</li><li><b>country</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>nickname</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li><li><b>updated_at</b>: DATE-TIME</li><li><b>vat_number</b>: STRING</li></ul> |
| **state**<br><br><br>STRING |
| **tax\_exempt**<br><br><br>BOOLEAN |
| **updated\_at**<br><br><br>DATE-TIME |
| **username**<br><br><br>STRING |
| **vat\_number**<br><br><br>STRING |

### adjustments

The `adjustments` table contains info about adjustments, which are credits and charges associated with your customers.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly documentation](https://dev.recurly.com/Content/adjustment-object)<br><br>[Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_account_line_items "Opens in new tab: Recurly API method") |

adjustments table foreign keys

| Join adjustments with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) | ```<br>adjustments.account.id = accounts.id<br>```<br><br>```<br>adjustments.account.parent_account_id = accounts.id<br>```<br><br>```<br>adjustments.account.id = accounts.parent_account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = accounts.parent_account_id<br>```<br><br>```<br>adjustments.account.id = accounts.shipping_addresses.account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = accounts.shipping_addresses.account_id<br>``` |
| [billing_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#billing-info) | ```<br>adjustments.account.id = billing_info.account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = billing_info.account_id<br>``` |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>adjustments.account.id = coupon_redemptions.account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = coupon_redemptions.account_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>adjustments.account.id = invoices.account.id<br>```<br><br>```<br>adjustments.account.parent_account_id = invoices.account.id<br>```<br><br>```<br>adjustments.account.id = invoices.account.parent_account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = invoices.account.parent_account_id<br>```<br><br>```<br>adjustments.account.id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>adjustments.account.parent_account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>adjustments.account.id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>adjustments.invoice_id = invoices.id<br>```<br><br>```<br>adjustments.invoice_id = invoices.credit_payments.applied_to_invoice.id<br>```<br><br>```<br>adjustments.invoice_id = invoices.credit_payments.original_invoice.id<br>```<br><br>```<br>adjustments.invoice_id = invoices.credit_payments.refund_transaction.invoice.id<br>```<br><br>```<br>adjustments.invoice_id = invoices.credit_payments.refund_transaction.voided_by_invoice.id<br>```<br><br>```<br>adjustments.invoice_id = invoices.line_items.data.invoice_id<br>```<br><br>```<br>adjustments.invoice_id = invoices.subscription_ids<br>```<br><br>```<br>adjustments.plan_id = invoices.line_items.data.plan_id<br>```<br><br>```<br>adjustments.add_on_id = invoices.line_items.data.add_on_id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>adjustments.account.id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>adjustments.plan_id = subscriptions.pending_change.plan.id<br>```<br><br>```<br>adjustments.add_on_id = subscriptions.add_ons.add_on.id<br>``` |
| [transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#transactions) | ```<br>adjustments.account.id = transactions.account.id<br>```<br><br>```<br>adjustments.account.parent_account_id = transactions.account.id<br>```<br><br>```<br>adjustments.account.id = transactions.account.parent_account_id<br>```<br><br>```<br>adjustments.account.parent_account_id = transactions.account.parent_account_id<br>```<br><br>```<br>adjustments.invoice_id = transactions.invoice.id<br>```<br><br>```<br>adjustments.invoice_id = transactions.voided_by_invoice.id<br>``` |
| [plans](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans) | ```<br>adjustments.plan_id = plans.id<br>``` |
| [plans_add_ons](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans-add-ons) | ```<br>adjustments.plan_id = plans_add_ons.plan_id<br>```<br><br>```<br>adjustments.add_on_id = plans_add_ons.id<br>``` |

adjustments table schema

| **account**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul> |
| --- |
| **accounting\_code**<br><br><br>STRING |
| **add\_on\_code**<br><br><br>STRING |
| **add\_on\_id**<br><br><br>STRING |
| **amount**<br><br><br>NUMBER |
| **created\_at**<br><br><br>DATE-TIME |
| **credit\_applied**<br><br><br>NUMBER |
| **credit\_reason\_code**<br><br><br>STRING |
| **currency**<br><br><br>STRING |
| **description**<br><br><br>STRING |
| **discount**<br><br><br>NUMBER |
| **end\_date**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **invoice\_id**<br><br><br>STRING |
| **invoice\_number**<br><br><br>STRING |
| **legacy\_category**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **origin**<br><br><br>STRING |
| **original\_line\_item\_invoice\_id**<br><br><br>STRING |
| **plan\_code**<br><br><br>STRING |
| **plan\_id**<br><br><br>STRING |
| **previous\_line\_item\_id**<br><br><br>STRING |
| **product\_code**<br><br><br>STRING |
| **proration\_rate**<br><br><br>NUMBER |
| **quantity**<br><br><br>INTEGER |
| **refund**<br><br><br>BOOLEAN |
| **refunded\_quantity**<br><br><br>INTEGER |
| **shipping\_address**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>account_id</b>: STRING</li><li><b>city</b>: STRING</li><li><b>company</b>: STRING</li><li><b>country</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>nickname</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li><li><b>updated_at</b>: DATE-TIME</li><li><b>vat_number</b>: STRING</li></ul> |
| **start\_date**<br><br><br>DATE-TIME |
| **state**<br><br><br>STRING |
| **subscription\_id**<br><br><br>STRING |
| **subtotal**<br><br><br>NUMBER |
| **tax**<br><br><br>NUMBER |
| **tax\_code**<br><br><br>STRING |
| **tax\_exempt**<br><br><br>BOOLEAN |
| **tax\_info**<br><br><br>STRING |
| **taxable**<br><br><br>BOOLEAN |
| **type**<br><br><br>STRING |
| **unit\_amount**<br><br><br>NUMBER |
| **updated\_at**<br><br><br>DATE-TIME |
| **uuid**<br><br><br>STRING |

### billing\_info

The `billing_info` table contains info about the billing information for [`accounts`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts).

**Note**: To replicate this table, you must also have the [`accounts`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) table set to replicate.

### Custom fields

Recurly integration supports replicating custom fields for billing info objects.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | account\_id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/get_billing_info "Opens in new tab: Recurly API method") |

billing\_info table foreign keys

| Join billing\_info with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) | ```<br>billing_info.account_id = accounts.id<br>```<br><br>```<br>billing_info.account_id = accounts.parent_account_id<br>```<br><br>```<br>billing_info.account_id = accounts.shipping_addresses.account_id<br>``` |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>billing_info.account_id = adjustments.account.id<br>```<br><br>```<br>billing_info.account_id = adjustments.account.parent_account_id<br>``` |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>billing_info.account_id = coupon_redemptions.account_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>billing_info.account_id = invoices.account.id<br>```<br><br>```<br>billing_info.account_id = invoices.account.parent_account_id<br>```<br><br>```<br>billing_info.account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>billing_info.account_id = invoices.line_items.data.shipping_addresses.account_id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>billing_info.account_id = subscriptions.shipping_address.account_id<br>``` |
| [transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#transactions) | ```<br>billing_info.account_id = transactions.account.id<br>```<br><br>```<br>billing_info.account_id = transactions.account.parent_account_id<br>``` |

billing\_info table schema

| **account\_id**<br><br><br>STRING |
| --- |
| **address**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>city</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul> |
| **company**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **custom\_fields**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>name</b>: STRING</li><li><b>value</b>: STRING</li></ul> |
| **exemption\_certificate**<br><br><br>STRING |
| **first\_name**<br><br><br>STRING |
| **fraud**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>decision</b>: STRING</li><li><b>risk_rules_triggered</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>score</b>: INTEGER</li></ul></li></ul> |
| **id**<br><br><br>STRING |
| **last\_name**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **payment\_method**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>account_type</b>: STRING</li><li><b>card_type</b>: STRING</li><li><b>exp_month</b>: INTEGER</li><li><b>exp_year</b>: INTEGER</li><li><b>last_four</b>: STRING</li><li><b>object</b>: STRING</li><li><b>routing_number</b>: INTEGER</li><li><b>routing_number_banl</b>: STRING</li></ul> |
| **updated\_at**<br><br><br>DATE-TIME |
| **updated\_by**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>country</b>: STRING</li><li><b>ip</b>: STRING</li></ul> |
| **valid**<br><br><br>BOOLEAN |
| **vat\_number**<br><br><br>STRING |

### coupon\_redemptions

The `coupon_redemptions` table contains info about the coupons redeemed in your Recurly account.

**Note**: In order to replicate this table, you must also set the following tables to replicate:

* [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts)
* [subscription](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscription)
* [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices)

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | created\_at |
|  | accounts<br><br>subscription<br><br>invoices |
| **Useful links** | [Recurly API method](https://recurly.com/developers/api/v2018-08-09/index.html#operation/list_account_coupon_redemptions "Opens in new tab: Recurly API method") |

coupon\_redemptions table foreign keys

| Join coupon\_redemptions with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) | ```<br>coupon_redemptions.account_id = accounts.id<br>```<br><br>```<br>coupon_redemptions.account_id = accounts.parent_account_id<br>```<br><br>```<br>coupon_redemptions.account_id = accounts.shipping_addresses.account_id<br>``` |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>coupon_redemptions.account_id = adjustments.account.id<br>```<br><br>```<br>coupon_redemptions.account_id = adjustments.account.parent_account_id<br>``` |
| [billing_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#billing-info) | ```<br>coupon_redemptions.account_id = billing_info.account_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>coupon_redemptions.account_id = invoices.account.id<br>```<br><br>```<br>coupon_redemptions.account_id = invoices.account.parent_account_id<br>```<br><br>```<br>coupon_redemptions.account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>coupon_redemptions.account_id = invoices.line_items.data.shipping_addresses.account_id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>coupon_redemptions.account_id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>coupon_redemptions.coupon.id = subscriptions.coupon_redemptions.coupon.id<br>```<br><br>```<br>coupon_redemptions.id = subscriptions.coupon_redemptions.id<br>``` |
| [transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#transactions) | ```<br>coupon_redemptions.account_id = transactions.account.id<br>```<br><br>```<br>coupon_redemptions.account_id = transactions.account.parent_account_id<br>``` |
| [coupons](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupons) | ```<br>coupon_redemptions.coupon.id = coupons.id<br>``` |

coupon\_redemptions table schema

| **account**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul> |
| --- |
| **account\_id**<br><br><br>STRING |
| **coupon**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>applies_to_all_plans</b>: BOOLEAN</li><li><b>applies_to_non_plan_charges</b>: BOOLEAN</li><li><b>code</b>: STRING</li><li><b>coupon_type</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>discount</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>currencies</b>: ARRAY, which is also a nested data structure:                                                 <ul><li><b>amount</b>: NUMBER</li><li><b>currency</b>: STRING</li></ul></li><li><b>percent</b>: INTEGER</li><li><b>trial</b>: OBJECT, which is also a nested data structure:                                                 <ul><li><b>length</b>: INTEGER</li><li><b>unit</b>: STRING</li></ul></li></ul></li><li><b>type</b>: STRING</li><li><b>duration</b>: STRING</li><li><b>expired_at</b>: DATE-TIME</li><li><b>free_trial_amount</b>: INTEGER</li><li><b>free_trial_unit</b>: STRING</li><li><b>hosted_page_description</b>: STRING</li><li><b>id</b>: STRING</li><li><b>invoice_description</b>: STRING</li><li><b>max_redemptions</b>: INTEGER</li><li><b>max_redemptions_per_account</b>: INTEGER</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>plans</b>: STRING</li><li><b>plans_names</b>: ARRAY</li><li><b>redeem_by</b>: DATE-TIME</li><li><b>redemption_resource</b>: STRING</li><li><b>state</b>: STRING</li><li><b>temporal_amount</b>: INTEGER</li><li><b>temporal_unit</b>: STRING</li><li><b>unique_coupon_codes_count</b>: INTEGER</li><li><b>updated_at</b>: DATE-TIME</li></ul> |
| **created\_at**<br><br><br>DATE-TIME |
| **currency**<br><br><br>STRING |
| **discounted**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **removed\_at**<br><br><br>DATE-TIME |
| **state**<br><br><br>STRING |
| **unique\_code\_template**<br><br><br>STRING |
| **updated\_at**<br><br><br>DATE-TIME |

### coupons

The `coupons` table contains info about the coupons available in your Recurly account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_coupons "Opens in new tab: Recurly API method") |

coupons table foreign keys

| Join coupons with | on |
| --- | --- |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>coupons.id = coupon_redemptions.coupon.id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>coupons.id = subscriptions.coupon_redemptions.coupon.id<br>``` |

coupons table schema

| **applies\_to\_all\_plans**<br><br><br>BOOLEAN |
| --- |
| **applies\_to\_non\_plan\_charges**<br><br><br>BOOLEAN |
| **code**<br><br><br>STRING |
| **coupon\_type**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **discount**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>currencies</b>: ARRAY, which is also a nested data structure:                    <ul><li><b>amount</b>: NUMBER</li><li><b>currency</b>: STRING</li></ul></li><li><b>percent</b>: INTEGER</li><li><b>trial</b>: OBJECT, which is also a nested data structure:                    <ul><li><b>length</b>: INTEGER</li><li><b>unit</b>: STRING</li></ul></li><li><b>type</b>: STRING</li></ul> |
| **duration**<br><br><br>STRING |
| **expired\_at**<br><br><br>DATE-TIME |
| **free\_trial\_amount**<br><br><br>INTEGER |
| **free\_trial\_unit**<br><br><br>STRING |
| **hosted\_page\_description**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **invoice\_description**<br><br><br>STRING |
| **max\_redemptions**<br><br><br>INTEGER |
| **max\_redemptions\_per\_account**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **plans**<br><br><br>ARRAY, STRING<br><br>This is a nested data structure:<br><br><ul><li><b>code</b>: STRING</li><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li></ul> |
| **plans\_names**<br><br><br>ARRAY |
| **redeem\_by**<br><br><br>DATE-TIME |
| **redemption\_resource**<br><br><br>STRING |
| **state**<br><br><br>STRING |
| **temporal\_amount**<br><br><br>INTEGER |
| **temporal\_unit**<br><br><br>STRING |
| **unique\_coupon\_codes\_count**<br><br><br>INTEGER |
| **updated\_at**<br><br><br>DATE-TIME |

### invoices

The `invoices` table contains info about the invoices in your Recurly account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly API method](https://recurly.com/developers/api/v2018-08-09/index.html#operation/list_account_invoices "Opens in new tab: Recurly API method") |

invoices table foreign keys

| Join invoices with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) | ```<br>invoices.account.id = accounts.id<br>```<br><br>```<br>invoices.account.parent_account_id = accounts.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = accounts.id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = accounts.id<br>```<br><br>```<br>invoices.account.id = accounts.parent_account_id<br>```<br><br>```<br>invoices.account.parent_account_id = accounts.parent_account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = accounts.parent_account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = accounts.parent_account_id<br>```<br><br>```<br>invoices.account.id = accounts.shipping_addresses.account_id<br>```<br><br>```<br>invoices.account.parent_account_id = accounts.shipping_addresses.account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = accounts.shipping_addresses.account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = accounts.shipping_addresses.account_id<br>``` |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>invoices.account.id = adjustments.account.id<br>```<br><br>```<br>invoices.account.parent_account_id = adjustments.account.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = adjustments.account.id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = adjustments.account.id<br>```<br><br>```<br>invoices.account.id = adjustments.account.parent_account_id<br>```<br><br>```<br>invoices.account.parent_account_id = adjustments.account.parent_account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = adjustments.account.parent_account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = adjustments.account.parent_account_id<br>```<br><br>```<br>invoices.id = adjustments.invoice_id<br>```<br><br>```<br>invoices.credit_payments.applied_to_invoice.id = adjustments.invoice_id<br>```<br><br>```<br>invoices.credit_payments.original_invoice.id = adjustments.invoice_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.invoice.id = adjustments.invoice_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.voided_by_invoice.id = adjustments.invoice_id<br>```<br><br>```<br>invoices.line_items.data.invoice_id = adjustments.invoice_id<br>```<br><br>```<br>invoices.subscription_ids = adjustments.invoice_id<br>```<br><br>```<br>invoices.line_items.data.plan_id = adjustments.plan_id<br>```<br><br>```<br>invoices.line_items.data.add_on_id = adjustments.add_on_id<br>``` |
| [billing_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#billing-info) | ```<br>invoices.account.id = billing_info.account_id<br>```<br><br>```<br>invoices.account.parent_account_id = billing_info.account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = billing_info.account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = billing_info.account_id<br>``` |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>invoices.account.id = coupon_redemptions.account_id<br>```<br><br>```<br>invoices.account.parent_account_id = coupon_redemptions.account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = coupon_redemptions.account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = coupon_redemptions.account_id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>invoices.account.id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>invoices.account.parent_account_id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>invoices.line_items.data.plan_id = subscriptions.pending_change.plan.id<br>```<br><br>```<br>invoices.line_items.data.add_on_id = subscriptions.add_ons.add_on.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.subscription_ids = subscriptions.id<br>```<br><br>```<br>invoices.line_items.data.subscription_id = subscriptions.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.subscription_ids = subscriptions.add_ons.subscription_id<br>```<br><br>```<br>invoices.line_items.data.subscription_id = subscriptions.add_ons.subscription_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.subscription_ids = subscriptions.pending_change.add_ons.subscription_id<br>```<br><br>```<br>invoices.line_items.data.subscription_id = subscriptions.pending_change.add_ons.subscription_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.subscription_ids = subscriptions.pending_change.subscription_id<br>```<br><br>```<br>invoices.line_items.data.subscription_id = subscriptions.pending_change.subscription_id<br>``` |
| [transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#transactions) | ```<br>invoices.account.id = transactions.account.id<br>```<br><br>```<br>invoices.account.parent_account_id = transactions.account.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = transactions.account.id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = transactions.account.id<br>```<br><br>```<br>invoices.account.id = transactions.account.parent_account_id<br>```<br><br>```<br>invoices.account.parent_account_id = transactions.account.parent_account_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.account.id = transactions.account.parent_account_id<br>```<br><br>```<br>invoices.line_items.data.shipping_addresses.account_id = transactions.account.parent_account_id<br>```<br><br>```<br>invoices.id = transactions.invoice.id<br>```<br><br>```<br>invoices.credit_payments.applied_to_invoice.id = transactions.invoice.id<br>```<br><br>```<br>invoices.credit_payments.original_invoice.id = transactions.invoice.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.invoice.id = transactions.invoice.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.voided_by_invoice.id = transactions.invoice.id<br>```<br><br>```<br>invoices.line_items.data.invoice_id = transactions.invoice.id<br>```<br><br>```<br>invoices.subscription_ids = transactions.invoice.id<br>```<br><br>```<br>invoices.id = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.credit_payments.applied_to_invoice.id = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.credit_payments.original_invoice.id = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.invoice.id = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.voided_by_invoice.id = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.line_items.data.invoice_id = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.subscription_ids = transactions.voided_by_invoice.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.subscription_ids = transactions.subscription_ids<br>```<br><br>```<br>invoices.line_items.data.subscription_id = transactions.subscription_ids<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.id = transactions.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.original_transaction_id = transactions.id<br>```<br><br>```<br>invoices.transactions.id = transactions.id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.id = transactions.original_transaction_id<br>```<br><br>```<br>invoices.credit_payments.refund_transaction.original_transaction_id = transactions.original_transaction_id<br>```<br><br>```<br>invoices.transactions.id = transactions.original_transaction_id<br>``` |
| [plans](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans) | ```<br>invoices.line_items.data.plan_id = plans.id<br>``` |
| [plans_add_ons](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans-add-ons) | ```<br>invoices.line_items.data.plan_id = plans_add_ons.plan_id<br>```<br><br>```<br>invoices.line_items.data.add_on_id = plans_add_ons.id<br>``` |

invoices table schema

| **account**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul> |
| --- |
| **address**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>city</b>: STRING</li><li><b>company</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>name_on_account</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul> |
| **balance**<br><br><br>NUMBER |
| **closed\_at**<br><br><br>DATE-TIME |
| **collection\_method**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **credit\_payments**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>account</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>action</b>: STRING</li><li><b>amount</b>: NUMBER</li><li><b>applied_to_invoice</b>: OBJECT                                        <ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>created_at</b>: DATE-TIME</li><li><b>currency</b>: STRING</li><li><b>id</b>: STRING</li><li><b>object</b>: STRING</li><li><b>original_credit_payment_id</b>: STRING</li><li><b>original_invoice</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>refund_transaction</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>account</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>amount</b>: NUMBER</li><li><b>avs_check</b>: STRING</li><li><b>billing_address</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>city</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul></li><li><b>collected_at</b>: DATE-TIME</li><li><b>collection_method</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>currency</b>: STRING</li><li><b>customer_message</b>: STRING</li><li><b>customer_message_locale</b>: STRING</li><li><b>cvv_check</b>: STRING</li><li><b>gateway_approval_code</b>: STRING</li><li><b>gateway_message</b>: STRING</li><li><b>gateway_reference</b>: STRING</li><li><b>gateway_response_code</b>: STRING</li><li><b>gateway_response_time</b>: STRING</li><li><b>gateway_response_values</b>: OBJECT, which is also a nested data structure.</li><li><b>id</b>: STRING</li><li><b>invoice</b>:  OBJECT, which is also a nested data structure:                                                        <ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>ip_address_country</b>: STRING</li><li><b>ip_address_v4</b>: STRING</li><li><b>object</b>: STRING</li><li><b>origin</b>: STRING</li><li><b>original_transaction_id</b>: STRING</li><li><b>payment_gateway</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>payment_method</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>card_type</b>: STRING</li><li><b>exp_month</b>: INTEGER</li><li><b>exp_year</b>: INTEGER</li><li><b>first_six</b>: STRING</li><li><b>last_four</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>refunded</b>: BOOLEAN</li><li><b>status</b>: STRING</li><li><b>status_code</b>: STRING</li><li><b>status_message</b>: STRING</li><li><b>subscription_ids</b>: ARRAY, which is also a nested data structure.</li><li><b>success</b>: BOOLEAN</li><li><b>type</b>: STRING</li><li><b>uuid</b>: STRING</li><li><b>voided_at</b>: DATE-TIME</li><li><b>voided_by_invoice</b>: OBJECT                                                <ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul></li></ul></li><li><b>updated_at</b>: DATE-TIME</li><li><b>uuid</b>: STRING</li><li><b>voided_at</b>: DATE-TIME</li></ul> |
| **currency**<br><br><br>STRING |
| **customer\_notes**<br><br><br>STRING |
| **discount**<br><br><br>NUMBER |
| **due\_at**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **line\_items**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>data</b>: ARRAY, which is also a nested data structure:                                        <ul><li><b>account</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul></li><li><b>accounting_code</b>: STRING</li><li><b>add_on_code</b>: STRING</li><li><b>add_on_id</b>: STRING</li><li><b>amount</b>: NUMBER</li><li><b>created_at</b>: DATE-TIME</li><li><b>credit_applied</b>: NUMBER</li><li><b>credit_reason_code</b>: STRING</li><li><b>currency</b>: STRING</li><li><b>description</b>: STRING</li><li><b>discount</b>: NUMBER</li><li><b>end_date</b>: DATE-TIME</li><li><b>id</b>: STRING</li><li><b>invoice_id</b>: STRING</li><li><b>invoice_number</b>: STRING</li><li><b>legacy_category</b>: STRING</li><li><b>object</b>: STRING</li><li><b>origin</b>: STRING</li><li><b>original_line_item_invoice_id</b>: STRING</li><li><b>plan_code</b>: STRING</li><li><b>plan_id</b>: STRING</li><li><b>previous_line_item_id</b>: STRING</li><li><b>product_code</b>: STRING</li><li><b>proration_rate</b>: NUMBER</li><li><b>quantity</b>: INTEGER</li><li><b>refund</b>: BOOLEAN</li><li><b>refunded_quantity</b>: INTEGER</li><li><b>shipping_addresses</b>: ARRAY, which is also a nested data structure:                                                <ul><li><b>account_id</b>: STRING</li><li><b>city</b>: STRING</li><li><b>company</b>: STRING</li><li><b>country</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>nickname</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li><li><b>updated_at</b>: DATE-TIME</li><li><b>vat_number</b>: STRING</li></ul></li><li><b>start_date</b>: DATE-TIME</li><li><b>state</b>: STRING</li><li><b>subscription_id</b>: STRING</li><li><b>subtotal</b>: NUMBER</li><li><b>tax</b>: NUMBER</li><li><b>tax_code</b>: STRING</li><li><b>tax_exempt</b>: STRING</li><li><b>tax_info</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>rate</b>: NUMBER</li><li><b>region</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>taxable</b>: BOOLEAN</li><li><b>type</b>: STRING</li><li><b>unit_amount</b>: NUMBER</li><li><b>updated_at</b>: DATE-TIME</li><li><b>uuid</b>: STRING</li></ul></li><li><b>has_more</b>: BOOLEAN</li><li><b>next</b>: STRING</li><li><b>object</b>: STRING</li></ul> |
| **net\_terms**<br><br><br>NUMBER |
| **number**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **origin**<br><br><br>STRING |
| **paid**<br><br><br>NUMBER |
| **po\_number**<br><br><br>STRING |
| **previous\_invoice\_id**<br><br><br>STRING |
| **refundable\_amount**<br><br><br>NUMBER |
| **state**<br><br><br>STRING |
| **subscription\_ids**<br><br><br>ARRAY |
| **subtotal**<br><br><br>NUMBER |
| **tax**<br><br><br>NUMBER |
| **tax\_info**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>rate</b>: NUMBER</li><li><b>region</b>: STRING</li><li><b>type</b>: STRING</li></ul> |
| **terms\_and\_conditions**<br><br><br>STRING |
| **total**<br><br><br>NUMBER |
| **transactions**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>account</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul></li><li><b>amount</b>: NUMBER</li><li><b>avs_check</b>: STRING</li><li><b>billing_address</b>: OBJECT                                         <ul><li><b>city</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul></li><li><b>collected_at</b>: DATE-TIME</li><li><b>collection_method</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>currency</b>: STRING</li><li><b>customer_message</b>: STRING</li><li><b>customer_message_locale</b>: STRING</li><li><b>cvv_check</b>: STRING</li><li><b>gateway_approval_code</b>: STRING</li><li><b>gateway_message</b>: STRING</li><li><b>gateway_reference</b>: STRING</li><li><b>gateway_response_code</b>: STRING</li><li><b>gateway_response_time</b>: NUMBER</li><li><b>gateway_response_values</b>: OBJECT, which is also a nested data structure.</li><li><b>id</b>: STRING</li><li><b>invoice</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>ip_address_country</b>: STRING</li><li><b>ip_address_v4</b>: STRING</li><li><b>object</b>: STRING</li><li><b>origin</b>: STRING</li><li><b>original_transaction_id</b>: STRING</li><li><b>payment_gateway</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>type</b>: STRING</li></ul></li><li><b>payment_method</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>card_type</b>: STRING</li><li><b>exp_month</b>: INTEGER</li><li><b>exp_year</b>: INTEGER</li><li><b>first_six</b>: STRING</li><li><b>last_four</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>refunded</b>: BOOLEAN</li><li><b>status</b>: STRING</li><li><b>status_code</b>: STRING</li><li><b>status_message</b>: STRING</li><li><b>subscription_ids</b>: ARRAY</li><li><b>success</b>: BOOLEAN</li><li><b>type</b>: STRING</li><li><b>uuid</b>: STRING</li><li><b>voided_at</b>: DATE-TIME</li><li><b>voided_by_invoice</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul></li></ul> |
| **type**<br><br><br>STRING |
| **updated\_at**<br><br><br>DATE-TIME |
| **vat\_number**<br><br><br>STRING |
| **vat\_reverse\_charge\_notes**<br><br><br>STRING |

### plans

The `plans` table contains info about the plans in your Recurly account. A plan tells Recurly how much to charge customers.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_plans "Opens in new tab: Recurly API method") |

plans table foreign keys

| Join plans with | on |
| --- | --- |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>plans.id = adjustments.plan_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>plans.id = invoices.line_items.data.plan_id<br>``` |
| [plans_add_ons](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans-add-ons) | ```<br>plans.id = plans_add_ons.plan_id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>plans.id = subscriptions.pending_change.plan.id<br>``` |

plans table schema

| **accounting\_code**<br><br><br>STRING |
| --- |
| **auto\_renew**<br><br><br>BOOLEAN |
| **code**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **currencies**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>currency</b>: STRING</li><li><b>setup_free</b>: NUMBER</li><li><b>unit_amount</b>: NUMBER</li></ul> |
| **deleted\_at**<br><br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **hosted\_pages**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>bypass_confirmation</b>: BOOLEAN</li><li><b>cancel_url</b>: STRING</li><li><b>display_quantity</b>: BOOLEAN</li><li><b>success_url</b>: STRING</li></ul> |
| **id**<br><br><br>STRING |
| **interval\_length**<br><br><br>INTEGER |
| **interval\_unit**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **setup\_fee\_accounting\_code**<br><br><br>STRING |
| **state**<br><br><br>STRING |
| **tax\_code**<br><br><br>STRING |
| **tax\_exempt**<br><br><br>BOOLEAN |
| **total\_billing\_cycles**<br><br><br>INTEGER |
| **trial\_length**<br><br><br>INTEGER |
| **trial\_unit**<br><br><br>STRING |
| **updated\_at**<br><br><br>DATE-TIME |

### plans\_add\_ons

The `plans_add_ons` table contains info about the add-ons in your Recurly account. An add-on is a charge billed each billing period in addition to a subscription’s base charge.

**Note**: To replicate this table, you must also have the [`plans`](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans) table set to replicate.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_plan_add_ons "Opens in new tab: Recurly API method") |

plans\_add\_ons table foreign keys

| Join plans\_add\_ons with | on |
| --- | --- |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>plans_add_ons.plan_id = adjustments.plan_id<br>```<br><br>```<br>plans_add_ons.id = adjustments.add_on_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>plans_add_ons.plan_id = invoices.line_items.data.plan_id<br>```<br><br>```<br>plans_add_ons.id = invoices.line_items.data.add_on_id<br>``` |
| [plans](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans) | ```<br>plans_add_ons.plan_id = plans.id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>plans_add_ons.plan_id = subscriptions.pending_change.plan.id<br>```<br><br>```<br>plans_add_ons.id = subscriptions.add_ons.add_on.id<br>``` |

plans\_add\_ons table schema

| **accounting\_code**<br><br><br>STRING |
| --- |
| **code**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **currencies**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>currency</b>: STRING</li><li><b>unit_amount</b>: NUMBER</li></ul> |
| **default\_quantity**<br><br><br>INTEGER |
| **deleted\_at**<br><br><br>DATE-TIME |
| **display\_quantity**<br><br><br>BOOLEAN |
| **id**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **plan\_id**<br><br><br>STRING |
| **state**<br><br><br>STRING |
| **tax\_code**<br><br><br>STRING |
| **updated\_at**<br><br><br>DATE-TIME |

### subscriptions

The `subscriptions` table contains info about the subscriptions in your Recurly account. Subscriptions are created when your customers subscribe to one of your plans. The customer’s subscription tells Recurly when and how much to bill the customer.

### Custom fields

Recurly integration supports replicating custom fields for subscription objects.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | updated\_at |
| **Useful links** | [Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_subscriptions "Opens in new tab: Recurly API method") |

subscriptions table foreign keys

| Join subscriptions with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) | ```<br>subscriptions.shipping_address.account_id = accounts.id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = accounts.parent_account_id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = accounts.shipping_addresses.account_id<br>``` |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>subscriptions.shipping_address.account_id = adjustments.account.id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = adjustments.account.parent_account_id<br>```<br><br>```<br>subscriptions.pending_change.plan.id = adjustments.plan_id<br>```<br><br>```<br>subscriptions.add_ons.add_on.id = adjustments.add_on_id<br>``` |
| [billing_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#billing-info) | ```<br>subscriptions.shipping_address.account_id = billing_info.account_id<br>``` |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>subscriptions.shipping_address.account_id = coupon_redemptions.account_id<br>```<br><br>```<br>subscriptions.coupon_redemptions.coupon.id = coupon_redemptions.coupon.id<br>```<br><br>```<br>subscriptions.coupon_redemptions.id = coupon_redemptions.id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>subscriptions.shipping_address.account_id = invoices.account.id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = invoices.account.parent_account_id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>subscriptions.pending_change.plan.id = invoices.line_items.data.plan_id<br>```<br><br>```<br>subscriptions.add_ons.add_on.id = invoices.line_items.data.add_on_id<br>```<br><br>```<br>subscriptions.id = invoices.credit_payments.refund_transaction.subscription_ids<br>```<br><br>```<br>subscriptions.add_ons.subscription_id = invoices.credit_payments.refund_transaction.subscription_ids<br>```<br><br>```<br>subscriptions.pending_change.add_ons.subscription_id = invoices.credit_payments.refund_transaction.subscription_ids<br>```<br><br>```<br>subscriptions.pending_change.subscription_id = invoices.credit_payments.refund_transaction.subscription_ids<br>```<br><br>```<br>subscriptions.id = invoices.line_items.data.subscription_id<br>```<br><br>```<br>subscriptions.add_ons.subscription_id = invoices.line_items.data.subscription_id<br>```<br><br>```<br>subscriptions.pending_change.add_ons.subscription_id = invoices.line_items.data.subscription_id<br>```<br><br>```<br>subscriptions.pending_change.subscription_id = invoices.line_items.data.subscription_id<br>``` |
| [transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#transactions) | ```<br>subscriptions.shipping_address.account_id = transactions.account.id<br>```<br><br>```<br>subscriptions.shipping_address.account_id = transactions.account.parent_account_id<br>```<br><br>```<br>subscriptions.id = transactions.subscription_ids<br>```<br><br>```<br>subscriptions.add_ons.subscription_id = transactions.subscription_ids<br>```<br><br>```<br>subscriptions.pending_change.add_ons.subscription_id = transactions.subscription_ids<br>```<br><br>```<br>subscriptions.pending_change.subscription_id = transactions.subscription_ids<br>``` |
| [coupons](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupons) | ```<br>subscriptions.coupon_redemptions.coupon.id = coupons.id<br>``` |
| [plans](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans) | ```<br>subscriptions.pending_change.plan.id = plans.id<br>``` |
| [plans_add_ons](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#plans-add-ons) | ```<br>subscriptions.pending_change.plan.id = plans_add_ons.plan_id<br>```<br><br>```<br>subscriptions.add_ons.add_on.id = plans_add_ons.id<br>``` |

subscriptions table schema

| **account**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul> |
| --- |
| **activated\_at**<br><br><br>DATE-TIME |
| **add\_ons**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>add_on</b>: OBJECT                                        <ul><li><b>accounting_code</b>: STRING</li><li><b>code</b>: STRING</li><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>created_at</b>: DATE-TIME</li><li><b>expired_at</b>: DATE-TIME</li><li><b>id</b>: STRING</li><li><b>object</b>: STRING</li><li><b>quantity</b>: NUMBER</li><li><b>subscription_id</b>: STRING</li><li><b>unit_amount</b>: NUMBER</li><li><b>updated_at</b>: DATE-TIME</li></ul> |
| **add\_ons\_total**<br><br><br>NUMBER |
| **auto\_renew**<br><br><br>BOOLEAN |
| **bank\_account\_authorized\_at**<br><br><br>DATE-TIME |
| **canceled\_at**<br><br><br>DATE-TIME |
| **collection\_method**<br><br><br>STRING |
| **coupon\_redemptions**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>coupon</b>: OBJECT, which is also a nested data structure:                                        <ul><li><b>code</b>: STRING</li><li><b>coupon_type</b>: STRING</li><li><b>discount</b>: OBJECT, which is also a nested data structure:                                                <ul><li><b>currencies</b>: ARRAY, which is also a nested data structure:                                                        <ul><li><b>amount</b>: NUMBER</li><li><b>currency</b>: STRING</li></ul></li><li><b>percent</b>: INTEGER</li><li><b>discount</b>: OBJECT, which is also a nested data structure:                                                        <ul><li><b>trial</b>: OBJECT, , which is also a nested data structure:                                                                <ul><li><b>length</b>: NUMBER</li><li><b>unit</b>: STRING</li></ul></li><li><b>type</b>: STRING</li></ul></li></ul></li><li><b>expired_at</b>: DATE-TIME</li><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li></ul></li><li><b>created_at</b>: DATE-TIME</li><li><b>discounted</b>: STRING</li><li><b>id</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li></ul> |
| **created\_at**<br><br><br>DATE-TIME |
| **currency**<br><br><br>STRING |
| **current\_period\_ends\_at**<br><br><br>DATE-TIME |
| **current\_period\_started\_at**<br><br><br>DATE-TIME |
| **current\_term\_ends\_at**<br><br><br>DATE-TIME |
| **current\_term\_started\_at**<br><br><br>DATE-TIME |
| **custom\_fields**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li><b>name</b>: STRING</li><li><b>value</b>: STRING</li></ul> |
| **customer\_notes**<br><br><br>STRING |
| **expiration\_reason**<br><br><br>STRING |
| **expires\_at**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **net\_terms**<br><br><br>INTEGER |
| **object**<br><br><br>STRING |
| **paused\_at**<br><br><br>DATE-TIME |
| **pending\_change**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>activate_at</b>: DATE-TIME</li><li><b>activated</b>: BOOLEAN</li><li><b>add_ons</b>: ARRAY, which is also a nested data structure:                                        <ul><li><b>add_on</b>: OBJECT, which is also a nested data structure:                                                 <ul><li><b>accounting_code</b>: STRING</li><li><b>code</b>: STRING</li><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>created_at</b>: DATE-TIME</li><li><b>expired_at</b>: DATE-TIME</li><li><b>id</b>: STRING</li><li><b>object</b>: STRING</li><li><b>quantity</b>: NUMBER</li><li><b>subscription_id</b>: STRING</li><li><b>unit_amount</b>: NUMBER</li><li><b>updated_at</b>: DATE-TIME</li></ul></li><li><b>created_at</b>: DATE-TIME</li><li><b>deleted_at</b>: BOOLEAN</li><li><b>id</b>: STRING</li><li><b>object</b>: STRING</li><li><b>plan</b>: OBJECT, which is also a nested data structure:                                                 <ul><li><b>code</b>: STRING</li><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li></ul></li><li><b>quantity</b>: NUMBER</li><li><b>subscription_id</b>: STRING</li><li><b>unit_amount</b>: NUMBER</li><li><b>updated_at</b>: DATE-TIME</li></ul> |
| **plan**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>code</b>: STRING</li><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li></ul> |
| **po\_number**<br><br><br>STRING |
| **quantity**<br><br><br>INTEGER |
| **remaining\_billing\_cycles**<br><br><br>INTEGER |
| **remaining\_pause\_cycles**<br><br><br>INTEGER |
| **renewal\_billing\_cycles**<br><br><br>INTEGER |
| **shipping\_address**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>account_id</b>: STRING</li><li><b>city</b>: STRING</li><li><b>company</b>: STRING</li><li><b>country</b>: STRING</li><li><b>created_at</b>: DATE-TIME</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>nickname</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li><li><b>updated_at</b>: DATE-TIME</li><li><b>vat_number</b>: STRING</li></ul> |
| **state**<br><br><br>STRING |
| **subtotal**<br><br><br>NUMBER |
| **terms\_and\_conditions**<br><br><br>STRING |
| **total\_billing\_cycles**<br><br><br>INTEGER |
| **trial\_ends\_at**<br><br><br>DATE-TIME |
| **trial\_started\_at**<br><br><br>DATE-TIME |
| **unit\_amount**<br><br><br>NUMBER |
| **updated\_at**<br><br><br>DATE-TIME |
| **uuid**<br><br><br>STRING |

### transactions

The `transactions` table contains info about the transactions in your Recurly account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Key** | id |
| **Replication Key** | collected\_at |
| **Useful links** | [Recurly API method](https://partner-docs.recurly.com/v2018-08-09#operation/list_transactions "Opens in new tab: Recurly API method") |

transactions table foreign keys

| Join transactions with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#accounts) | ```<br>transactions.account.id = accounts.id<br>```<br><br>```<br>transactions.account.parent_account_id = accounts.id<br>```<br><br>```<br>transactions.account.id = accounts.parent_account_id<br>```<br><br>```<br>transactions.account.parent_account_id = accounts.parent_account_id<br>```<br><br>```<br>transactions.account.id = accounts.shipping_addresses.account_id<br>```<br><br>```<br>transactions.account.parent_account_id = accounts.shipping_addresses.account_id<br>``` |
| [adjustments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#adjustments) | ```<br>transactions.account.id = adjustments.account.id<br>```<br><br>```<br>transactions.account.parent_account_id = adjustments.account.id<br>```<br><br>```<br>transactions.account.id = adjustments.account.parent_account_id<br>```<br><br>```<br>transactions.account.parent_account_id = adjustments.account.parent_account_id<br>```<br><br>```<br>transactions.invoice.id = adjustments.invoice_id<br>```<br><br>```<br>transactions.voided_by_invoice.id = adjustments.invoice_id<br>``` |
| [billing_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#billing-info) | ```<br>transactions.account.id = billing_info.account_id<br>```<br><br>```<br>transactions.account.parent_account_id = billing_info.account_id<br>``` |
| [coupon_redemptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#coupon-redemptions) | ```<br>transactions.account.id = coupon_redemptions.account_id<br>```<br><br>```<br>transactions.account.parent_account_id = coupon_redemptions.account_id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#invoices) | ```<br>transactions.account.id = invoices.account.id<br>```<br><br>```<br>transactions.account.parent_account_id = invoices.account.id<br>```<br><br>```<br>transactions.account.id = invoices.account.parent_account_id<br>```<br><br>```<br>transactions.account.parent_account_id = invoices.account.parent_account_id<br>```<br><br>```<br>transactions.account.id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>transactions.account.parent_account_id = invoices.credit_payments.refund_transaction.account.id<br>```<br><br>```<br>transactions.account.id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>transactions.account.parent_account_id = invoices.line_items.data.shipping_addresses.account_id<br>```<br><br>```<br>transactions.invoice.id = invoices.id<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.id<br>```<br><br>```<br>transactions.invoice.id = invoices.credit_payments.applied_to_invoice.id<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.credit_payments.applied_to_invoice.id<br>```<br><br>```<br>transactions.invoice.id = invoices.credit_payments.original_invoice.id<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.credit_payments.original_invoice.id<br>```<br><br>```<br>transactions.invoice.id = invoices.credit_payments.refund_transaction.invoice.id<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.credit_payments.refund_transaction.invoice.id<br>```<br><br>```<br>transactions.invoice.id = invoices.credit_payments.refund_transaction.voided_by_invoice.id<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.credit_payments.refund_transaction.voided_by_invoice.id<br>```<br><br>```<br>transactions.invoice.id = invoices.line_items.data.invoice_id<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.line_items.data.invoice_id<br>```<br><br>```<br>transactions.invoice.id = invoices.subscription_ids<br>```<br><br>```<br>transactions.voided_by_invoice.id = invoices.subscription_ids<br>```<br><br>```<br>transactions.subscription_ids = invoices.credit_payments.refund_transaction.subscription_ids<br>```<br><br>```<br>transactions.subscription_ids = invoices.line_items.data.subscription_id<br>```<br><br>```<br>transactions.id = invoices.credit_payments.refund_transaction.id<br>```<br><br>```<br>transactions.original_transaction_id = invoices.credit_payments.refund_transaction.id<br>```<br><br>```<br>transactions.id = invoices.credit_payments.refund_transaction.original_transaction_id<br>```<br><br>```<br>transactions.original_transaction_id = invoices.credit_payments.refund_transaction.original_transaction_id<br>```<br><br>```<br>transactions.id = invoices.transactions.id<br>```<br><br>```<br>transactions.original_transaction_id = invoices.transactions.id<br>``` |
| [subscriptions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Recurly.htm#subscriptions) | ```<br>transactions.account.id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>transactions.account.parent_account_id = subscriptions.shipping_address.account_id<br>```<br><br>```<br>transactions.subscription_ids = subscriptions.id<br>```<br><br>```<br>transactions.subscription_ids = subscriptions.add_ons.subscription_id<br>```<br><br>```<br>transactions.subscription_ids = subscriptions.pending_change.add_ons.subscription_id<br>```<br><br>```<br>transactions.subscription_ids = subscriptions.pending_change.subscription_id<br>``` |

transactions table schema

| **account**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>bill_to</b>: STRING</li><li><b>code</b>: STRING</li><li><b>company</b>: STRING</li><li><b>email</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>id</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>parent_account_id</b>: STRING</li></ul> |
| --- |
| **amount**<br><br><br>NUMBER |
| **avs\_check**<br><br><br>STRING |
| **billing\_address**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>city</b>: STRING</li><li><b>country</b>: STRING</li><li><b>first_name</b>: STRING</li><li><b>last_name</b>: STRING</li><li><b>phone</b>: STRING</li><li><b>postal_code</b>: STRING</li><li><b>region</b>: STRING</li><li><b>street1</b>: STRING</li><li><b>street2</b>: STRING</li></ul> |
| **collected\_at**<br><br><br>DATE-TIME |
| **collection\_method**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **currency**<br><br><br>STRING |
| **customer\_message**<br><br><br>STRING |
| **customer\_message\_locale**<br><br><br>STRING |
| **cvv\_check**<br><br><br>STRING |
| **gateway\_approval\_code**<br><br><br>STRING |
| **gateway\_message**<br><br><br>STRING |
| **gateway\_reference**<br><br><br>STRING |
| **gateway\_response\_code**<br><br><br>STRING |
| **gateway\_response\_time**<br><br><br>NUMBER |
| **gateway\_response\_values**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>amount</b>: NUMBER</li><li><b>amount_refunded</b>: NUMBER</li><li><b>card_fingerprint</b>: STRING</li><li><b>card_type</b>: STRING</li><li><b>currency</b>: STRING</li><li><b>description</b>: STRING</li><li><b>livemode</b>: STRING</li></ul> |
| **id**<br><br><br>STRING |
| **invoice**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul> |
| **ip\_address\_country**<br><br><br>STRING |
| **ip\_address\_v4**<br><br><br>STRING |
| **object**<br><br><br>STRING |
| **origin**<br><br><br>STRING |
| **original\_transaction\_id**<br><br><br>STRING |
| **payment\_gateway**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>id</b>: STRING</li><li><b>name</b>: STRING</li><li><b>object</b>: STRING</li><li><b>type</b>: STRING</li></ul> |
| **payment\_method**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>card_type</b>: STRING</li><li><b>exp_month</b>: INTEGER</li><li><b>exp_year</b>: INTEGER</li><li><b>first_six</b>: STRING</li><li><b>last_four</b>: STRING</li><li><b>object</b>: STRING</li></ul> |
| **refunded**<br><br><br>BOOLEAN |
| **status**<br><br><br>STRING |
| **status\_code**<br><br><br>STRING |
| **status\_message**<br><br><br>STRING |
| **subscription\_ids**<br><br><br>ARRAY |
| **success**<br><br><br>BOOLEAN |
| **type**<br><br><br>STRING |
| **uuid**<br><br><br>STRING |
| **voided\_at**<br><br><br>DATE-TIME |
| **voided\_by\_invoice**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li><b>id</b>: STRING</li><li><b>number</b>: STRING</li><li><b>object</b>: STRING</li><li><b>state</b>: STRING</li><li><b>type</b>: STRING</li></ul> |