/
Stripe data mapping
  • Final
  • Stripe data mapping

    Table of contents

    Overview

    Once you set up your Stripe integration, Leapfin will retrieve and process raw billing and payment data from Stripe and map that data as accounting records. These accounting records are used to create accounting rules to codify your accounting policy and ultimately create journal entries based on your specific requirements.

    Data sources

    Leapfin leverages Stripe’s API to retrieve financial data from the following Stripe objects:

    For organizations using Stripe Connect, Leapfin retrieves the following additional Stripe objects to support marketplace transactions:

    Depending on the scenario, Leapfin uses one of the following methods to retrieve data from the Stripe objects listed above:

    Scenario

    Data retrieval method

    Scenario

    Data retrieval method

    Backfilling historical data

    Leapfin calls object-specific API endpoints to pull each Stripe object in bulk. For example, Leapfin uses the List all invoices endpoint to pull all historical Stripe invoices.

    Processing daily incremental data

    Leapfin calls Stripe's Events endpoints to pull newly created or updated Stripe objects.

    Data mapping

    Once Leapfin retrieves your financial data from the applicable Stripe objects, it maps this data as Leapfin accounting records. Data mapping is a crucial step in your accounting process, as it converts raw data into a standard, usable format for your general ledger.

    The Stripe data mapping flow is as follows:

    Stripe object

    Imported into Leapfin as (source)

    Leapfin accounting records created (target)

    Stripe object

    Imported into Leapfin as (source)

    Leapfin accounting records created (target)

    Invoices

    stripe-invoice

    Note: Line items, issuance credits, and one type of application credit are mapped from the line.data array of the invoice object.

    Charges

    stripe-charge

    Note: Leapfin creates charges using both stripe-charge and stripe-balance transaction.

    Refunds

    stripe-refund

    Note: Leapfin creates refunds using both stripe-charge and stripe-balance transaction.

    Disputes

    stripe-dispute

    Note: Leapfin creates disputes using both stripe-charge and stripe-balance transaction.

    Payouts

    stripe-payout

    Note: Leapfin creates payouts using both stripe-charge and stripe-balance transaction.

    Credit notes

    stripe-credit-note

    Note: Leapfin creates credit notes using both stripe-credit-note and stripe-customer-balance-transaction.

    Balance transactions

    stripe-balance-transaction

    Leapfin usesstripe-balance-transaction together with stripe-charge, stripe-refund, stripe-dispute, and stripe-payout to create the accounting records associated with each of those sources.

    Customer balance transactions

    stripe-customer-balance-transaction

    Leapfin usesstripe-customer-balance-transaction together with stripe-credit-note to create a credit-issuance record.

    Application fees

    stripe-application-fee

    Leapfin usesstripe-application-fee together withstripe-balance-transaction and stripe-fee-refund to create a refund record.

    Application fee refunds

    stripe-fee-refund

    • Refund (LeapfinRefund)

      • Leapfin creates this record using stripe-balance-transaction, stripe-application-fee, and stripe-fee-refund.

    Transfers

    stripe-transfer

    Transfer reversals

    stripe-transfer-reversal

    Currency and date-time format conversion:

    Leapfin applies data format conversions on all currency amounts and date-time values from Stripe.

    • Currency amounts from Stripe are integers in the smallest currency unit. For example, USD 1.03 is stored as 103. JPY 710 is stored as 710.

    • Date-time values from Stripe are in Unix epoch formation. For example, epoch value 1665441318 is 2022-10-10 03:35:18PM PST.

    Exchange rates for zero-decimal currencies:

    The exchange rate value on Stripe's balance transaction object can be confusing in the case of zero-decimal currencies. For example, assume a charge of JPY 100 is settled as USD 1.00. The exchange rate should be 1/100 (JPY to USD). However, the actual exchange_rate value stored in Stripe's balance transaction is 1. This is because Stripe stores all currency amounts as integers in the smallest currency unit, so both JPY 100 and USD 1.00 are stored as 100.

    When mapping exchange rates, Leapfin adjusts the exchange rate values based on zero-decimal currencies.

    Invoices

    Leapfin imports each Stripe invoice object as a stripe-invoice record, which contains many pieces of data such as line items, credit application, credit issuance, and tax. When mapping, Leapfin creates separate financial records for each piece of data contained on the invoice.

    It is important to note that although the invoice object is the primary source, Leapfin uses the lines.data array of the invoice object to map line items, issuance credits, and one type of application credit. This is an important distinction, as the Stripe ID for these objects will be in the format of ii_xxxx:

    image-20240131-212959.png

    As opposed to objects mapped directly from the invoice object, which are in the format of in_xxxx:

    image-20240131-213057.png

    Invoice mapping

    • Creation condition: Leapfin creates an invoice record for each stripe-invoice.

    • Target: LeapfinInvoice (schema)

    • Source: stripe-invoice (schema)

    Target

    Source

    Target

    Source

    objectType

    "invoice"

    id

    stripe-invoice.id

    total

    stripe-invoice.total

    subtotal

    stripe-invoice.subtotal

    currencyCode

    stripe-invoice.currency

    status

    stripe-invoice.status

    date

    stripe-invoice.created

    issueDate

    stripe-invoice.status_transitions.finalized_at

    uncollectibleDate

    stripe-invoice.status_transitions.marked_uncollectible_at

    paidDate

    stripe-invoice.status_transitions.paid_at

    dueDate

    stripe-invoice.due_date

    exchangeRates

    None

    customFields

    Leapfin adds the stripeMetaData = stripe-invoice.metadata field from the source record.

    links

    None

    Line item mapping

    • Creation condition: Leapfin creates a line item record for each stripe-invoice.lines.data listed on the invoice with a positive amount.

    • Target: LeapfinLineItem (schema)

    • Source: stripe-invoice (schema)

      • Line items are mapped from the stripe-invoice.lines.data array of the invoice object.

    Target

    Source

    Target

    Source

    objectType

    "line-item"

    id

    stripe-invoice.lines.data[].id

    amount

    stripe-invoice.lines.data[].amount

    currencyCode

    stripe-invoice.lines.data[].currency

    date

    stripe-invoice.lines.data[].created

    quantity

    stripe-invoice.lines.data[].quantity

    Null value is converted to 1.

    discountAmount

    The sum of all amount within stripe-invoice.lines.data[].discount_amounts[]

    Null value is converted to 0.

    description

    stripe-invoice.lines.data[].description

    startDate

    stripe-invoice.lines.data[].period.start

    endDate

    stripe-invoice.lines.data[].period.end

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaData = stripe-invoice.lines.data[].metadata

    • stripePrice.planId = stripe-invoice.lines.data[].price.id

    • stripePrice.productId = stripe-invoice.lines.data[].price.product

    • stripePrice.planName = stripe-invoice.lines.data[].price.nickname

    links

    Leapfin adds a link to the invoice record with:

    • objectType = "invoice"

    • id = stripe-invoice.id

    Credit mapping (issuance)

    • Creation condition: Leapfin creates an issuance credit record for each stripe-invoice.lines.data listed on the invoice with a negative amount.

    • Target: LeapfinCredit (schema)

    • Source: Primary source: stripe-invoice (schema)

      • Issuance credits are mapped from the stripe-invoice.lines.data array of the invoice object.

    Target

    Source

    Target

    Source

    objectType

    "credit"

    id

    stripe-invoice.lines.data[].id

    amount

    Negative stripe-invoice.lines.data[].amount

    currencyCode

    stripe-invoice.lines.data[].currency

    date

    stripe-invoice.lines.data[].created

    type

    "issuance"

    description

    stripe-invoice.lines.data[].description

    startDate

    stripe-invoice.lines.data[].period.start

    endDate

    stripe-invoice.lines.data[].period.end

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaDate = stripe-invoice.lines.data[].metadata

    • stripePrice.planId = stripe-invoice.lines.data[].price.id

    • stripePrice.productId = stripe-invoice.lines.data[].price.product

    • stripePrice.planName = stripe-invoice.lines.data[].price.nickname

    links

    • Leapfin adds a link to the invoice record with:

      • objectType = "invoice"

      • id = stripe-invoice.id

    • For subscription amendments (upgrades and downgrades) Leapfin uses the creditedlineitems field to link the issuance credit back to the original line item.

    Credit mapping (application)

    • Creation condition: Leapfin creates an application credit record for each stripe-invoice.lines.data listed on the invoice if the amount is negative and proration = true.

    • Target: LeapfinCredit (schema)

    • Source: stripe-invoice (schema)

      • This type of application credit is mapped from the stripe-invoice.lines.data array of the invoice object.

    Target

    Source

    Target

    Source

    objectType

    "credit"

    id

    stripe-invoice.lines.data[].id

    amount

    absolute(stripe-invoice.lines.data[].amount) - absolute (stripe-invoice.ending_balance)

    If the sum of this calculation is negative, then amount equals stripe-invoice.lines.data[].amount.

    currencyCode

    stripe-invoice.lines.data[].currency

    date

    stripe-invoice.status_transitions.paid_at

    type

    "application"

    description

    stripe-line-item.data.description

    startDate

    None

    endDate

    None

    exchangeRates

    None

    customFields

    None

    links

    Leapfin adds a link to the invoice record with:

    • objectType = "invoice"

    • id = stripe-invoice.id

    Credit mapping (application)

    • Creation condition: stripe-invoice.starting_balance < stripe-invoice.ending_balance and stripe-invoice.status = "paid"

    • Target: LeapfinCredit (schema)

    • Source: stripe-invoice (schema)

    Target

    Source

    Target

    Source

    objectType

    "credit"

    id

    stripe-invoice.id

    amount

    stripe-invoice.ending_balance - stripe-invoice.starting_balance

    currencyCode

    stripe-invoice.currency

    date

    stripe-invoice.status_transitions.paid_at

    type

    "application"

    description

    ""

    startDate

    None

    endDate

    None

    exchangeRates

    None

    customFields

    None

    links

    Leapfin adds a link to the invoice record with:

    • objectType = "invoice"

    • id = stripe-invoice.id

    Tax mapping

    • Creation condition: Leapfin creates a single tax record if stripe-invoice.tax > 0 on the invoice.

    • Target: LeapfinTax (schema)

    • Source: stripe-invoice (schema)

    Target

    Source

    Target

    Source

    objectType

    "tax"

    id

    Leapfin uses stripe-invoice.tax as the id and the numeric index of the tax item within tax- + tax_amounts[] as the suffix. This suffix is required to distinguish different tax items.

    amount

    stripe-invoice.tax

    currencyCode

    stripe-invoice.currency

    date

    stripe-invoice.created

    description

    ""

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • taxPercent = stripe-invoice.tax_precent

    • connectedStripeAccountId = stripe-invoice.connected_account_id

    links

    Leapfin adds a link to the invoice record with:

    • leapfinId.externalId = stripe-invoice.id

    • leapfinId.integration = stripe-invoice.integration_id

    • leapfinId.leapfindataType = LeapfinInvoice

    • leapfinId.rawDataType = stripe-invoice

    Charges

    Leapfin imports each Stripe charge object as a stripe-charge record and then maps it as a LeapfinPayment record. Leapfin also creates separate fee records for Stripe fees associated with the stripe-charge. Stripe fees are contained in the stripe-balance-transaction record associated with the stripe-charge record.

    Application fee mapping:

    An application fee is always collected as part of a charge on Stripe. Although a separate application fee object is created, the same information is also included in the balance transaction object of the Stripe charge. Leapfin stores the application fee as customField.applicationFeeAmount on the payment record.

    Payment mapping

    • Creation condition: Leapfin creates a payment record for each stripe-charge.

    • Target: LeapfinPayment (schema)

    • Source: stripe-charge (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "payment"

    id

    stripe-charge.id

    amount

    stripe-charge.amount

    currencyCode

    stripe-charge.currency (This is the presentment currency of the charge.) Corresponding settlement currency is in stripe-balance-transaction)

    date

    stripe-charge.created

    status

    stripe-charge.status

    succeededDate

    When pulling incremental data from Stripe Event API, Leapfin maps the event object as succeededDate if type = "charge.succeeded".
    When backfilling historical data or if the event information above is not available, Leapfin maps stripe-charge.created as succeededDate.

    description

    stripe-charge.description

    exchangeRates

    Leapfin maps exchangeRates from the associated stripe-balance-transaction record of the stripe-charge record.

    • rate = stripe-balance-transaction.exchange_rate

    • currencyCode = stripe-balance-transaction.currency

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaData = stripe-charge.metadata

    • settlementAmount = stripe-balance-transaction.amount

    • settlementCurrencyCode = stripe-balance-transaction.currency

    • applicationFeeAmount = stripe-charge.application_fee_amount (if not null)

    • transferDataAmount = stripe-charge.transfer_data.amount (if not null)

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • customer = stripe-charge.customer

    • invoice = stripe-charge.invoice

    • cardBrand = stripe-charge.payment_method_detail.card.brand

    • cardType = stripe-charge.payment_method_detail.card.funding

    • cardCountry = stripe-charge.payment_method_detail.card.country

    links

    Leapfin adds a link to the associated invoice record with:

    • objectType = "invoice"

    • id = stripe-charge.invoice

    Fee mapping

    • Creation condition: For each stripe-charge record, Leapfin retrieves the associated stripe-balance-transaction record based on stripe-charge.balance_transaction. Leapfin then creates a fee record for each stripe-balance-transaction record where type is not payment_failure_refund and fee is not zero.

    • Target: LeapfinFee (schema)

    • Source: stripe-charge (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    stripe-balance-transaction.id

    amount

    stripe-balance-transaction.fee

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    links

    Leapfin adds a link to the associated payment record with:

    • objectType = "payment"

    • id = stripe-charge.id

    Refunds

    Leapfin imports each Stripe refund object as a stripe-refund record and then maps it as a LeapfinRefundrecord. Leapfin also creates separate fee records for Stripe fees associated with the stripe-refund. Stripe fees are contained in the stripe-balance-transaction record associated with the stripe-refund record.

    Refund mapping

    • Creation condition: Leapfin creates a Refund record for each stripe-refund.

    • Target: LeapfinRefund (schema)

    • Source: stripe-refund (schema) and stripe-balance-transaction (schema)

    Payment failure refund

    For ACH, direct debit, and other asynchronous payment methods, Stripe creates a refund object if the payment fails. A balance transaction object with a payment_failure_refund type is also created with the Stripe refund object.

    By default, Leapfin creates a refund record for each Stripe refund object. Alternatively, Leapfin can ignore Stripe refund objects, if desired.

    Target

    Source

    Target

    Source

    objectType

    "refund"

    id

    stripe-refund.id

    amount

    stripe-refund.amount

    currencyCode

    stripe-refund.currency (This is the presentment currency of the refund.)

    The corresponding settlement currency is in stripe-balance-transaction)

    date

    stripe-refund.created

    status

    If stripe-refund.status is failed or canceled, the status is set as failed.

    Else if stripe-refund.status is pending or requires_action, the status is set as pending.

    Otherwise, the status is set as the same value as the stripe-refund.status.

    exchangeRates

    Leapfin maps the exchange rate from the associated stripe-balance-transaction record of the stripe-refund record.

    • rate = stripe-balance-transaction.exchange_rate

    • currencyCode = stripe-balance-transaction.currency

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaData = stripe-refund.metadata

    • settlementAmount = stripe-balance-transaction.amount

    • settlementCurrencyCode = stripe-balance-transaction.currency

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • description = stripe-balance-transaction.description

    If stripe-balance-transaction.fee_details[] contains an item with type as "application_fee", then add following additional fields:

    • applicationFeeAmount = stripe-balance-transaction.fee_details[].amount

    • applicationFeeCurrencyCode = stripe-balance-transaction.fee_details[].currency

    links

    Leapfin adds a link to the associated payment record with:

    • objectType = "payment"

    • id = stripe-refund.charge

    Leapfin also adds a link to each associated line Item record by looking up the stripe-charge record based on the stripe-refund.charge, and then looking up the stripe-invoice record based on the stripe-charge.invoice:

    • objectType = "line-item"

    • id = stripe-invoice.lines.data[].id

    Fee mapping

    • Creation condition: For each stripe-refund record, Leapfin retrieves the associated stripe-balance-transaction record based on stripe-refund.balance_transaction. Leapfin then creates a fee record for each stripe-balance-transaction record where type is not payment_failure_refund and fee is not zero.

    • Target: LeapfinFee (schema)

    • Source: stripe-refund (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    stripe-balance-transaction.id

    amount

    stripe-balance-transaction.fee

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • feeType = stripe-balance-transaction.fee_details[].type

    links

    Leapfin adds a link to the associated refund record with:

    • objectType = "refund"

    • id = stripe-refund.id

    Disputes

    Leapfin imports each Stripe dispute object as a stripe-dispute record and then maps it as a LeapfinDispute record. Leapfin also creates separate fee records for Stripe fees associated with the stripe-dispute. Stripe dispute objects are associated with one or more stripe balance transaction objects, which contain fees charged by Stripe.

    Dispute mapping

    • Creation condition: Leapfin creates a Dispute record for each stripe-dispute.

    • Target: LeapfinDispute (schema)

    • Source: stripe-dispute (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "dispute"

    id

    stripe-dispute.id

    amount

    stripe-dispute.amount

    currencyCode

    stripe-refund.currency (This is the presentment currency of the dispute.)

    The Corresponding settlement currency is in stripe-balance-transaction)

    date

    stripe-dispute.created

    status

    If stripe-dispute.status is won, the status is set as won. If stripe-dispute.status is lost, the status is set as lost. Otherwise, the status is set as pending.

    description

    stripe-dispute.reason

    initiatedDate

    When pulling incremental data from Stripe Event API, Leapfin maps created of the event object as initiatedDate if type = "charge.dispute.funds_withdrawn".


    When backfilling historical data or if the event information above is not available, Leapfin maps stripe-dispute.created as initiatedDate.

    resolvedDate

    Leapfin maps the resolvedDate from the stripe-dispute.balance_transactions[].created field of the latest balance transaction located in the stripe-dispute.balance_transactions[] data array if the stripe-dispute.balance_transactions[].reporting_category field of the balance transaction equals dispute_reversal.

    When backfilling historical data, or if no such balance transaction exists, the resolvedDate is left as null.

    exchangeRates

    Leapfin maps exchangeRates from each associated stripe-balance-transaction record of the stripe-dispute record:

    • rate = stripe-balance-transactions[].exchange_rate

    • currencyCode = stripe-balance-transactions[].currency

    customFields

    Leapfin adds the following fields from the source record: stripeMetaData = stripe-dispute.metadata

    For each associated stripe-balance-transaction record with reporting_category as dispute, Leapfin includes the following fields:

    • settlementAmount = stripe-balance-transaction.amount

    • settlementCurrencyCode = stripe-balance-transaction.currency

    • applicationFeeAmount = stripe-balance-transaction.fee_details[].amount (for fees with type = "application_fee" only)

    • applicationFeeCurrencyCode = stripe-balance-transaction.fee_details[].currency (for fees with type = "application_fee" only)

    For each associated stripe-balance-transaction record with reporting_category as dispute_reversal, Leapfin includes the following fields:

    • settlementReversalAmount = stripe-balance-transaction.amount

    • settlementReversalCurrencyCode = stripe-balance-transaction.currency

    • applicationFeeReversalAmount = stripe-balance-transaction.fee_details[].amount (for fees with type = "application_fee" only)

    • applicationFeeCurrencyReversalCode = stripe-balance-transaction.fee_details[].currency (for fees with type = "application_fee" only)

    links

    Leapfin adds a link to the associated payment record with:

    • objectType = "payment"

    • id = stripe-dispute.charge

    Leapfin also adds a link to each associated line item record by looking up the stripe-charge record based on stripe-dispute.charge and then looking up the stripe-invoice record based on stripe-charge.invoice:

    • objectType = "line-item"

    • id = stripe-invoice.lines.data[].id

    Fee mapping

    • Creation condition: For each stripe-dispute record, Leapfin retrieves all associated stripe-balance-transaction records based on stripe-dispute.balance_transactions[]. Leapfin then creates a fee record for each stripe-balance-transaction record where type is not payment_failure_refund and fee is not zero.

    • Target: LeapfinFee (schema)

    • Source: stripe-dispute (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    stripe-balance-transaction.id

    amount

    stripe-balance-transaction.fee

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • feeType = stripe-balance-transaction.fee_details[].type

    links

    Leapfin adds a link to the associated dispute record with:

    • objectType = "dispute"

    • id = stripe-dispute.id

    Payouts

    Leapfin imports each Stripe payout object as a stripe-payout record and then maps it as a LeapfinSettlementrecord. Leapfin also creates separate fee records for Stripe fees associated with the stripe-payout. Stripe fees are contained in stripe-balance-transaction record associated with the stripe-payout record.

    Payout mapping

    • Creation condition: Leapfin creates a Payout record for each stripe-payout.

    • Target: LeapfinSettlement (schema)

    • Source: stripe-payout (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "payout"

    id

    stripe-payout.id

    amount

    stripe-balance-transaction.net

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.available_on

    status

    If stripe-payout.status is canceled or failed, the status is set as failed. If stripe-payout.status is paid, the status is set as paid. Otherwise, the status is set as pending.

    description

    If stripe-balance-transaction.data.bankAccount.bankNameis not null, Leapfin uses that value. Otherwise, Leapfin sets the value as stripe-payout.data.type

    exchangeRates

    Leapfin maps exchange rate from each associated stripe-balance-transaction record of the stripe-dispute record.

    • rate = stripe-balance-transactions[].exchange_rate

    • currencyCode = stripe-balance-transactions[].currency

    customFields

    Leapfin adds the stripeMetaData = stripe-payout.metadata field from the source record.

    links

    No links are created as part of standard payout mapping. However, Leapfin can establish custom links to payments, refunds, or dispute records upon request. Note: Adding custom links may result in extended data processing time.

    Fee mapping

    • Creation condition: For each stripe-payout record, Leapfin retrieves the associated stripe-balance-transaction records based on stripe-payout.balance_transaction and then creates a fee record for each stripe-balance-transaction record where type is not payment_failure_refund and fee is not zero.

    • Target: LeapfinFee (schema)

    • Source: stripe-payout (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    stripe-balance-transaction.id

    amount

    stripe-balance-transaction.fee

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • feeType = stripe-balance-transaction.fee_details[].type

    links

    Leapfin adds a link to the associated payout record with:

    • objectType = "payout"

    • id = stripe-payout.id

    Fees

    Stripe does not have an outright fee raw data structure, like it does for other transaction types like stripe-invoice, stripe-charge, etc. Instead, payment processor fee data is captured in stripe-balance-transaction data. Fees from stripe-balance-transaction data are inclusive of individual transaction fees for payments, refunds, disputes, settlements as well as batch level fees such as network costs and adjustment fees.

    Note that not all stripe-balance-transaction are fee-related, as the type of balance transaction can vary. Learn more here for details about Stripe balance transactions.

    Refer to the above sections for transactional fee mapping for charges, refunds, disputes and settlements.

    Network fees mapping

    • Creation condition: Leapfin creates a Fee record for each stripe-balance-transaction record where type is stripe_fee or network_cost.

    • Target: LeapfinFee (schema)

    • Source: stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    Leapfin uses stripe-balance-transaction.id as the id and appends “fee” as the suffix. This suffix is required to distinguish different fee items.

    amount

    stripe-balance-transaction.amount

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    links

    None

    Adjustment fees mapping

    • Creation condition: Leapfin creates a Fee record for each stripe-balance-transaction record where type is adjustment and reporting_category is fee.

    • Target: LeapfinFee (schema)

    • Source: stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    Leapfin uses stripe-balance-transaction.id as the id and appends “fee” as the suffix. This suffix is required to distinguish different fee items.

    amount

    stripe-balance-transaction.amount

    currencyCode

    stripe-balance-transaction.currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    links

    None

    Credit note

    Leapfin imports each Stripe credit note object as a stripe-credit-note record, which contains a breakdown of all credit note items. When mapping data, Leapfin creates a credit note record to represent the total adjustments to the invoice and a credit record to represent the actual credit being issued (if any). Refer to Leapfin’s Credit note documentation for an explanation of the difference between credit note and credit.

    Credit note mapping

    • Creation condition: Leapfin creates a credit note record for each stripe-credit-note.

    • Target: LeapfinCreditNote (schema)

    • Source: stripe-credit-note (schema)

    Target

    Source

    Target

    Source

    objectType

    "credit-note"

    id

    stripe-credit-note.id

    totalAmount

    stripe-credit-note.total

    subTotalAmount

    stripe-credit-note.subtotal

    currencyCode

    stripe-credit-note.currency

    date

    stripe-credit-note.created

    status

    stripe-credit-note.status

    issueDate

    stripe-credit-note.created

    description

    stripe-credit-note.memo

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaData = stripe-credit-note.metadata

    • reason = stripe-credit-note.reason

    • outsideStripeCreditAmount = stripe-credit-note.out_of_band_amount

    • totalTaxAmount = sum of stripe-credit-note.tax_amounts[].amount

    • totalDiscountAmount = sum of stripe-credit-note.discount_amounts[].amount

    links

    Leapfin adds a link to the associated invoice record with:

    • objectType = "invoice"

    • id = stripe-credit-note.invoice


    If stripe-credit-note.refund is not null, Leapfin retrieves the associated refund record with:

    • objectType = "refund"

    • id = stripe-credit-note.refund

    A link is then added to the credit note record on the retrieved refund record.

    Credit mapping (adjustment)

    • Creation condition: Leapfin creates adjustment credit records if the Stripe credit note is issued prior to payment, specifically stripe-credit-note.type = "pre_payment". In this scenario, Leapfin creates a credit record for each item within stripe-credit-note.lines.data[].

    • Target: LeapfinCredit (schema)

    • Source: stripe-credit-note (schema)

    Target

    Source

    Target

    Source

    objectType

    "credit"

    id

    stripe-credit-note.lines.data[].id

    amount

    stripe-credit-note.lines.data[].amount

    currencyCode

    stripe-credit-note.currency

    date

    stripe-credit-note.created

    type

    "adjustment"

    description

    stripe-credit-note.lines.data[].description

    startDate

    None

    endDate

    None

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • type = stripe-credit-note.lines.data[].type

    • quantity = stripe-credit-note.lines.data[].quantity

    • taxAmount = sum of stripe-credit-note.lines.data[].tax_amounts[].amount

    • discountAmount = sum of stripe-credit-note.lines.data[].discount_amounts[].amount

    links

    Leapfin adds a link to the associated credit note record with:

    • objectType = "credit-note"

    • id = stripe-credit-note.id

    If a stripe-credit-note.lines.data[].invoice_line_item exists, Leapfin adds a link to the associated line item record with:

    • objectType = "line-item"

    • id = stripe-credit-note.lines.data[].invoice_line_item

    Credit mapping (issuance type)

    • Creation condition: Leapfin creates an issuance credit record if the Stripe credit note is issued after the payment, specifically stripe-credit-note.type = "post_payment". In this scenario, Leapfin retrieves the stripe-customer-balance-transaction record associated with the Stripe credit note and creates a single credit record.

    • Target: LeapfinCredit (schema)

    • Source: stripe-credit-note (schema) and stripe-customer-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "credit"

    id

    stripe-customer-balance-transaction.id

    amount

    negative stripe-customer-balance-transaction.amount

    currencyCode

    stripe-customer-balance-transaction.currency

    date

    stripe-customer-balance-transaction.created

    type

    "issuance"

    description

    stripe-customer-balance-transaction.description

    startDate

    None

    endDate

    None

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • type = stripe-customer-balance-transaction.type

    • stripeMetaData = stripe-customer-balance-transaction.metadata

    links

    Leapfin adds a link to the associated credit note record with:

    • objectType = "credit-note"

    • id = stripe-credit-note.id

    Application fee refund

    Leapfin imports each Stripe application fee refund object as a stripe-fee-refund record and maps it as a LeapfinRefund record.

    Issuing an application fee refund

    Stripe allows two methods for refunding application fees:

    • Method 1 (most common): Refund the application fee together with the charge (the most common method)

      • When using this method, the application fee refund is included as part of the balance transaction object associated with the Stripe refund object. Leapfin maps the application fee refund as customFields.applicationFeeAmount on the Leapfin refund record. (see Refund mapping logic).

    • Method 2: Issue an application fee refund separately

      • When issued separately, the application fee refund object is not associated with any Stripe refund objects. In this scenario, Leapfin maps the refund as a separate refund record.

    Refund mapping

    • Creation condition: Leapfin creates a refund record for each stripe-fee-refund.

    • Target: LeapfinRefund (schema)

    • Source: stripe-fee-refund (schema), stripe-balance-transaction (schema), and stripe-application-fee (schema)

    Target

    Source

    Target

    Source

    objectType

    "refund"

    id

    stripe-fee-refund.id

    amount

    stripe-fee-refund.amount

    currencyCode

    stripe-fee-refund.currency

    date

    stripe-fee-refund.created

    status

    "succeeded"

    exchangeRates

    Leapfin maps exchange rates from the associated stripe-balance-transaction record of the stripe-fee-refund record.

    • rate = stripe-balance-transaction.exchange_rate

    • currencyCode = stripe-balance-transaction.currency

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaData = stripe-fee-refund.metadata

    • settlementAmount = stripe-balance-transaction.amount

    • settlementCurrencyCode = stripe-balance-transaction.currency

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • description = stripe-balance-transaction.description

    links

    Leapfin adds a link to each associated payment record by looking up the stripe-application-fee record based on the stripe-fee-refund.fee:

    • objectType = "payment"

    • id = stripe-application-fee.charge

    Transfers

    Leapfin imports each Stripe transfer object as a stripe-transfer record and maps it as a LeapfinSettlement record. Leapfin also creates separate fee records for Stripe fees associated with the stripe-transfer. Stripe fees are contained in the stripe-balance-transaction record associated with the stripe-transfer record.

    Payout mapping

    • Creation condition: Leapfin creates a payout record for each stripe-transfer.

    • Target: LeapfinSettlement (schema)

    • Source: stripe-transfer (schema)

    Target

    Source

    Target

    Source

    objectType

    "payout"

    id

    stripe-transfer.id

    amount

    stripe-transfer.amount

    currencyCode

    stripe-transfer.currency

    date

    stripe-transfer.created

    status

    "paid"

    description

    stripe-transfer.description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • stripeMetaData = stripe-transfer.metadata

    • destinationAccount = stripe-transfer.destination

    links

    Leapfin adds a link to the associated payment record, if applicable:

    • objectType = "payment"

    • id = stripe-transfer.source_transaction

    Fee mapping

    • Creation condition: For each stripe-transfer record, Leapfin retrieves the associated stripe-balance-transaction records based on stripe-transfer.balance_transaction and creates a fee record for each item within stripe-balance-transaction.fee_details[] with a stripe_fee type.

    • Target: LeapfinFee (schema)

    • Source: stripe-transfer (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    Leapfin uses stripe-balance-transaction.id as the id and the numeric index of the fee item within stripe-balance-transaction.fee_details[] as the suffix. This suffix is required to distinguish different fee items.

    amount

    stripe-balance-transaction.fee_details[].amount

    currencyCode

    stripe-balance-transaction.fee_details[].currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.fee_details[].description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • feeType = stripe-balance-transaction.fee_details[].type

    links

    Leapfin adds a link to the associated payout record with:

    • objectType = "payout"

    • id = stripe-transfer.id

    Transfer reversals

    Leapfin imports each Stripe transfer reversal object as a stripe-transfer-reversal record and maps it as a payout record. Leapfin also creates separate fee records for Stripe fees associated with the stripe-transfer-reversal. Stripe fees are contained in the stripe-balance-transaction record associated with the stripe-transfer record.

    Payout mapping

    • Creation condition: Leapfin creates a payout record for each stripe-transfer-reversal.

    • Target: LeapfinSettlement (schema)

    • Source: stripe-transfer-reversal (schema)

    Target

    Source

    Target

    Source

    objectType

    "payout"

    id

    stripe-transfer-reversal.id

    amount

    stripe-transfer-reversal.amount

    currencyCode

    stripe-transfer-reversal.currency

    date

    stripe-transfer-reversal.created

    status

    "paid"

    description

    ""

    exchangeRates

    None

    customFields

    Leapfin adds the following field from the source record: stripeMetaData = stripe-transfer-reversal.metadata

    links

    Leapfin adds a link to the associated payment record, if applicable:

    • objectType = "payment"

    • id = stripe-transfer-reversal.source_transaction

    Fee mapping

    • Creation condition: For each stripe-transfer-reversal record, Leapfin retrieves the associated stripe-balance-transaction records based on stripe-transfer-reversal.balance_transaction and creates a fee record for each item within stripe-balance-transaction.fee_details[] with a stripe_fee type.

    • Target: LeapfinFee (schema)

    • Source: stripe-transfer-reversal (schema) and stripe-balance-transaction (schema)

    Target

    Source

    Target

    Source

    objectType

    "fee"

    id

    Leapfin uses stripe-balance-transaction.id as the id and the numeric index of the fee item within stripe-balance-transaction.fee_details[] as the suffix. This suffix is required to distinguish different fee items.

    amount

    stripe-balance-transaction.fee_details[].amount

    currencyCode

    stripe-balance-transaction.fee_details[].currency

    date

    stripe-balance-transaction.created

    description

    stripe-balance-transaction.fee_details[].description

    exchangeRates

    None

    customFields

    Leapfin adds the following fields from the source record:

    • reportingCategory = stripe-balance-transaction.reporting_category

    • type = stripe-balance-transaction.type

    • feeType = stripe-balance-transaction.fee_details[].type

    links

    Leapfin adds a link to the associated payout record with:

    • objectType = "payout"

    • id = stripe-transfer-reversal.id

    Mapping logic change management

    Leapfin periodically updates its standard mapping logic based on Stripe raw data to stay current with best accounting practices. To ensure standard mapping changes do not adversely impact existing mapped data or accounting policies, Leapfin tracks these updates through version flags.

    The following tables list all existing version flags for each source report. Each flag is assigned a default value, which reflects the flag value of the standard mapping configuration detailed above.

    Differences from default values

    If your mapping configuration differs from the default values indicated below, it is likely due to one of the following reasons:

    • Legacy or custom mapping logic was applied

    • Recent updates in standard mapping logic that were not available at the time of implementation

    • Custom business requirements that deviated from standard mapping logic

    Stripe invoice flags

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Map Objects

    Invoice

    MAP_NOTHING

    X

     

    Supports Stripe Connected Accounts. If specified, listed Leapfin objects will be mapped from Stripe connected.

    Map Tax Object

    Invoice

    false

     

    X

     

    Map Paid Out Of Band Reason

    Invoice

    false

     

    X

     

    Map Merchant Tax Id

    Invoice

    false

     

    X

     

    Map Invoice Local Currency Total

    Invoice

    false

     

    X

     

    Map Trip Uuid Connector

    Invoice

    false

     

    X

     

    Map Service Area Name

    Invoice

    false

     

    X

     

    Map External Id As Invoice Number

    Invoice

    false

     

    X

     

    Stripe line item flags

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Map Objects

    LineItem

    MAP_NOTHING

    X

     

    Supports Stripe Connected Accounts. If specified, listed Leapfin objects will be mapped from Stripe Connected.

    Map Customer Id

    LineItem

    false

    X

     

    If marked true, Leapfin maps in customFields.customerId = stripe-invoice.customer.value

    Map Trip Uuid Connector

    LineItem

    false

     

    X

     

    Map Service Area Name

    LineItem

    false

     

    X

     

    Map Unique Id Connector

    LineItem

    false

     

    X

     

    Map Billing Period Dates

    LineItem

    false

     

    X

     

    Map Invoice Total

    LineItem

    false

     

    X

     

    Map Prorated Info

    LineItem

    false

     

    X

     

    Stripe Cash Object Flags

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Map Payment Failure Refunds

    Refund

    true

    X

     

    Maps in a refund record, regardless of its status. The status value is mapped based on standard mapping logic.

    Enable Recurly Connector

    Payment

    false

    X

     

    Offers the ability to link a Recurly invoice to a Stripe Charge in Recurly-Stripe cross-integration setups.

    Map Refund Local Currency Amount

    Payment

    false

    X

     

    Maps in customFields.refundLocalCurrency as the local currency amount based on the currency code value in stripe-balance-transaction.currency.

    Additional Custom Fields

    Payment

    Map.empty

     

    X

     

    Enable Rate Card Connector

    Payment

    false

     

    X

     

    Map Fee

    Payment

    false

    X

     

    If marked true, Leapfin maps in customFields.fee = stripe-balance-transaction.fee. This is already captured in the linked Fee object by default.

    Enable Payout To Balance Transaction Edge

    Payment

    true

    X

     

    Supports intermediate data processing by linking the payout to all associated stripe-balance-transaction that comprise the payout. This consequently drives the mapping of settlement records linking to various cash records (i.e., Payment, Refund, etc.).

    Map Payment Local Currency Amount

    Payment

    false

    X

     

    If marked true, Leapfin maps in customFields.payentLocalCurrencyAmount as stripe-charge.amount in the local currency. This field is redundant.

    Map Service Area Name

    Payment

    false

    X

     

    If marked true, Leapfin maps in customFields.serviceAreaName = stripe-charge.metadata.service_area_name.

    Map Balance Transaction Details

    Settlement

    true

    X

     

    Marked true by default, this maps in the description, type, and reportingCategory custom fields from the associated stripe-balance-transaction onto the Settlement record.

    Map Postal Code

    Payment

    false

    X

     

    If marked true, Leapfin maps in customFields.postalCode = stripe-charge.billingDetails.address.postalCode

    Specify Suffix for Network Fees

    Fee

    false

    X

     

    If marked true, Leapfin maps in LeapfinFee suffix = fee for network fees. This supports Stripe Connected Accounts.

    Map Adjustment Fees From Balance Transaction

    Payment

    false

    X

     

    If marked true, and if stripe-balance-transaction.reportingCategory contains a fee, Leapfin maps in adjustment fees. This supports Stripe Connected Accounts.

    Stripe credit note flags

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Flag

    Object

    Default Value

    Versioning Update

    Customer Specific

    Details

    Map Objects

    Credit Note

    MAP_NOTHING

    X

     

    This Supports Stripe Connected Accounts. If specified, listed Leapfin records will be mapped from Stripe Connected.

    Map Refund

    Credit Note

    false

    X

     

    If marked true, Leapfin maps in customFields.refund = stripe-credit-note.refund.

    .Map Customer Balance Transaction

    Credit Note

    false

    X

     

    If marked true, Leapfin maps in customFields.refund = stripe-credit-note.customer_balance_transaction.

    Map Credit Note In Credit

    Credit

    false

    X

     

    If marked true, Leapfin maps in customFields.creditNote = stripe-customer-balance-transaction.credit_note.

    Map Total Excluding Tax

    Credit Note

    false

    X

     

    If marked true, Leapfin maps in customFields.totalExcludingTax = stripe-credit-note.total_excluding_tax.

    Map Tax To Credits

    Credit Note

    false

    X

     

    If marked true, Leapfin creates a link between the credit note and its corresponding target tax record.

    Map Credit Note To Line Item Link

    Credit Note

    false

    X

     

    If marked true, Leapfin creates a link between the credit note and its corresponding target invoice line item records.

    Related content