Help Center

Stripe: How to automate Xero tracking codes from Stripe metadata

Set up tracking categories in Xero, add matching metadata in Stripe, then map it in ScaleXP so the tracking codes are set on imported invoices automatically.


1. Set up tracking categories in Xero

  1. If you've not set up the desired categories of data in your accounting system, set them up in Xero. See this article from Xero: Set up Xero tracking categories.

Once set up, these fields will be automatically added to the invoices generated in your accounting system and synced with ScaleXP reporting.


2. Add the metadata to Stripe

  1. Add the metadata to Stripe at line item level in any of the following ways:
    • Add subscription metadata in Stripe.
    • Add metadata to the price or line item on the invoice.
Stripe price with the metadata key tracking_category set to Type One

See this Stripe article on Metadata parameters.


3. Map the new fields in ScaleXP

  1. In ScaleXP, go to Load Data (top bar) > Connections (left sidebar) > Stripe card > Configure. In the Mapping section, click Edit next to Tracking codes.
  2. Type in the name of the Stripe metadata category, exactly as you set it up in Stripe.
Stripe Mapping section with the Edit button next to Tracking codes circled

Invoices will include metadata fields from the time the mapping is complete, using the data associated with the price you have invoiced in Stripe.

Example invoice (Xero):

Xero invoice showing a New Test Tracking Categories column with the value Type One