Set up your Stripe integration

Leapfin’s pre-built integration with Stripe makes it easy for you to import your Stripe billing and payment data into Leapfin. Once imported, Leapfin maps this data as accounting records, which are used to create accounting rules and ultimately generate journal entries.

Following the steps below to set up your Stripe integration with Leapfin:

  1. In Leapfin, click your account name in the top right corner of the screen.
  2. Click Integrations in the drop-down.
  1. Locate Stripe in the list of integrations and click CONNECT.

  1. Log in to your Stripe admin account.

Note: Before logging in, ensure your admin account is not connected to any other platforms.

🚧

Email can't be use error message

If you see the following error message after attempting to log in, log into Stripe via single sign-on and retry the connection.

  1. Your account will automatically connect after a successful Stipe admin login. When an account is connected, the CONNECT button will be replaced with IMPORT and RECONNECT buttons.

Repeat this process to connect as many Stripe accounts as you need.

Data sources

Once you set up your Stripe integration, 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:

ScenarioData retrieval method
Backfilling historical dataLeapfin 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 dataLeapfin 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 objectImported into Leapfin as (source)Leapfin accounting records created (target)
Invoicesstripe-invoice- Invoice (LeapfinInvoice)
- Line item (LeapfinLineItem)
- Tax (LeapfinTax)
- Credit - application (LeapfinCredit)
- Credit - issuance (LeapfinCredit)
- Credit - application (LeapfinCredit)
Chargesstripe-charge- Payment (LeapfinPayment)
- Fee (LeapfinFee)

Note: These records are created using both stripe-charge and stripe-balance-transaction.
Refundsstripe-charge- Refund (LeapfinRefund)
- Fee (LeapfinFee)

Note: These records are created using both stripe-charge and stripe-balance-transaction.
Disputesstripe-dispute- Dispute (LeapfinDispute)
- Fee (LeapfinFee)

Note: These records are created using both stripe-charge and stripe-balance-transaction.
Payoutsstripe-payout- Payout (LeapfinSettlement)
- Fee (LeapfinFee)

Note: These records are created using both stripe-charge and stripe-balance-transaction.
Credit notesstripe-credit-note- Credit note (LeapfinCreditNote)
- Credit - issuance (LeapfinCredit) (Leapfin creates this record using both stripe-credit-note and stripe-customer-balance-transaction)
- Credit - application (LeapfinCredit)
Balance transactionsstripe-balance-transactionLeapfin uses stripe-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 transactionsstripe-customer-balance-transactionLeapfin uses stripe-customer-balance-transaction together with stripe-credit-note to create a credit-issuance record.
Application feesstripe-application-feeLeapfin uses stripe-application-fee together with stripe-balance-transaction and stripe-fee-refund to create a refund record.
Application fee refundsstripe-fee-refund- Refund (LeapfinRefund)

Leapfin creates this record using stripe-balance-transaction, stripe-application-fee, and stripe-fee-refund.
Transfersstripe-transfer- Payout (LeapfinSettlement)
- Fee (LeapfinFee)
Transfer reversalsstripe-transfer-reversal- Payout (LeapfinSettlement)
- Fee (LeapfinFee)

📘

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.

📘

Invoice credit mapping

In regards to credit, there are three scenarios that can occur on an invoice:

  • A credit is applied to the invoice
  • A line of credit is issued as part of the invoice
  • A line of credit is issued and fully/partially applied on the same invoice

As such, there are three credit mappings to account for each scenario.

Invoice mapping

  • Creation condition: Leapfin creates an invoice record for each stripe-invoice.
  • Target: LeapfinInvoice(schema)
  • Source: stripe-invoice (schema)
TargetSource
objectType"invoice"
idstripe-invoice.id
totalstripe-invoice.total
subtotalstripe-invoice.subtotal
currencyCodestripe-invoice.currency
statusstripe-invoice.status
datestripe-invoice.created
issueDatestripe-invoice.status_transitions.finalized_at
uncollectibleDatestripe-invoice.status_transitions.marked_uncollectible_at
paidDatestripe-invoice.status_transitions.paid_at
dueDatestripe-invoice.due_date
exchangeRatesNone
customFieldsLeapfin adds the stripeMetaData = stripe-invoice.metadatafield from the source record.
linksNone

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)
TargetSource
objectType"line-item"
idstripe-invoice.lines.data[].id
amountstripe-invoice.lines.data[].amount
currencyCodestripe-invoice.lines.data[].currency
datestripe-invoice.lines.data[].created
quantitystripe-invoice.lines.data[].quantity

Null value is converted to 1.
discountAmountThe sum of all amount within stripe-invoice.lines.data[].discount_amounts[]

Null value is converted to 0.
descriptionstripe-invoice.lines.data[].description
startDatestripe-invoice.lines.data[].period.start
endDatestripe-invoice.lines.data[].period.end
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin adds a link to the invoice record with:
- objectType = "invoice"
- id = stripe-invoice.id

Credit mapping (application type)

  • Creation condition: stripe-invoice.starting_balance < stripe-invoice.ending_balance and stripe-invoice.status = "paid"
  • Target: LeapfinCredit (schema)
  • Source: stripe-invoice (schema)
TargetSource
objectType"credit"
idstripe-invoice.id
amountstripe-invoice.ending_balance - stripe-invoice.starting_balance
currencyCodestripe-invoice.currency
datestripe-invoice.status_transitions.paid_at
type"application"
description""
startDateNone
endDateNone
exchangeRatesNone
customFieldsNone
linksLeapfin adds a link to the invoice record with:
- objectType = "invoice"
- id = stripe-invoice.id

Credit mapping (issuance type)

  • 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: stripe-invoice (schema)
TargetSource
objectType"credit"
idstripe-invoice.lines.data[].id
amountnegative stripe-invoice.lines.data[].amount
currencyCodestripe-invoice.lines.data[].currency
datestripe-invoice.lines.data[].created
type"issuance"
descriptionstripe-invoice.lines.data[].description
startDatestripe-invoice.lines.data[].period.start
endDatestripe-invoice.lines.data[].period.end
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin adds a link to the invoice record with:
- objectType = "invoice"
- id = stripe-invoice.id

Credit mapping (application type)

  • Creation condition: stripe-invoice.starting_balance < stripe-invoice.ending_balance and stripe-invoice.status = "paid"
  • Target: LeapfinCredit (schema)
  • Source: stripe-invoice (schema)
TargetSource
objectType"credit"
idstripe-invoice.lines.data[].id
amountabsolute(stripe-invoice.lines.data[].amount) - absolute (stripe-invoice.ending_balance).

If the sum of the calculation is negative, then amount equals stripe-invoice.lines.data[].amount
currencyCodestripe-invoice.lines.data[].currency
datestripe-invoice.status_transitions.paid_at
type"application"
descriptionstripe-line-item.data.description
startDateNone
endDateNone
exchangeRatesNone
customFieldsNone
linksLeapfin 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)
TargetSource
objectType"tax"
idstripe-invoice.tax
amountstripe-invoice.tax
currencyCodestripe-invoice.currency
datestripe-invoice.created
description""
exchangeRatesNone
customFieldsLeapfin adds the following fields from the source record:
- taxPercent = stripe-invoice.tax_precent
- connectedStripeAccountId = stripe-invoice.connected_account_id
linksLeapfin 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)
TargetSource
objectType"payment"
idstripe-charge.id
amountstripe-charge.amount
currencyCodestripe-charge.currency (Note: this is the presentment currency of the charge. The corresponding settlement currency is in stripe-balance-transaction)
datestripe-charge.created
statusstripe-charge.status
succeededDateWhen 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.
descriptionstripe-charge.description
exchangeRatesLeapfin maps exchange rates from associated stripe-balance-transaction record of the stripe-charge record.
- rate = stripe-balance-transaction.exchange_rate
- currencyCode = stripe-balance-transaction.currency
customFieldsLeapfin 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
linksLeapfin 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. A fee record is then created for each item within stripe-balance-transaction.fee_details[] that has a stripe_fee type.
  • Target: LeapfinFee (schema)
  • Source: stripe-charge (schema) and stripe-balance-transaction (schema)
TargetSource
objectType"fee"
idLeapfin 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.
amountstripe-balance-transaction.fee_details[].amount
currencyCodestripe-balance-transaction.fee_details[].currency
datestripe-balance-transaction.created
descriptionstripe-balance-transaction.fee_details[].description
exchangeRatesNone
customFieldsLeapfin adds the following fields from the source record:
- reportingCategory = stripe-balance-transaction.reporting_category
- type = stripe-balance-transaction.type
linksLeapfin 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 when 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.

TargetSource
objectType"refund"
idstripe-refund.id
amountstripe-refund.amount
currencyCodestripe-refund.currency (This is the presentment currency of the refund.)

The corresponding settlement currency is in stripe-balance-transaction.
datestripe-refund.created
statusif stripe-refund.status is canceled, the status is set failed. Otherwise, the status is set as the same value as thestripe-refund.status.
exchangeRatesLeapfin 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
customFieldsLeapfin 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
linksLeapfin 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 stripe-charge record based on stripe-refund.charge then looking up stripe-invoice record based on 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 item within stripe-balance-transaction.fee_details[] with a stripe_fee type.
  • Target: LeapfinFee (schema)
  • Source: stripe-refund (schema) and stripe-balance-transaction (schema)
TargetSource
objectType"fee"
idLeapfin 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 needed to distinguish the different fee items.
amountstripe-balance-transaction.fee_details[].amount
currencyCodestripe-balance-transaction.fee_details[].currency
datestripe-balance-transaction.created
descriptionstripe-balance-transaction.fee_details[].description
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin 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 Refund record for each stripe-dispute.
  • Target: LeapfinDispute (schema)
  • Source: stripe-dispute (schema) and stripe-balance-transaction (schema)
TargetSource
objectType"dispute"
idstripe-dispute.id
amountstripe-dispute.amount
currencyCodestripe-refund.currency(This is the presentment currency of the dispute.)

The corresponding settlement currency is in stripe-balance-transaction)
datestripe-dispute.created
statusIf stripe-dispute.status is won, the status is set status as won. If stripe-dispute.status is lost, the status is set as lost. Otherwise, the status is set as "pending".
descriptionstripe-dispute.reason
initiatedDateWhen 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.
resolvedDateWhen pulling incremental data from Stripe Event API, Leapfin maps created of the event object as initiatedDate if type = "charge.dispute.closed".

When backfilling historical data or if the event information above is not available, resolvedDate is left as null.
exchangeRatesLeapfin maps the 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
customFieldsLeapfin 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", include 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)
linksLeapfin adds a link to the associated payment record with:
- objectType = "payment"
- id = stripe-dispute.charge

Leapfin adds a link to each associated Line Item record by looking up stripe-charge record based on stripe-dispute.charge and then looking up 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 item within stripe-balance-transaction.fee_details[] with a stripe_fee type.

Target: LeapfinFee (schema)

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

TargetSource
objectType"fee"
idLeapfin 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 needed to distinguish different fee items.
amountstripe-balance-transaction.fee_details[].amount
currencyCodestripe-balance-transaction.fee_details[].currency
datestripe-balance-transaction.created
descriptionstripe-balance-transaction.fee_details[].description
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin 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 instripe-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)
TargetSource
objectType"payout"
idstripe-payout.id
amountstripe-balance-transaction.net
currencyCodestripe-balance-transaction.currency
datestripe-balance-transaction.available_on
statusIf 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.
descriptionIf stripe-balance-transaction.data.bankAccount.bankNameis not null, Leapfin uses that value. Otherwise, Leapfin sets the value as stripe-payout.data.type.
exchangeRatesLeapfin maps the 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
customFieldsLeapfin adds the following field from the source record:
- stripeMetaData = stripe-payout.metadata
linksNo 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 item within stripe-balance-transaction.fee_details[] with a stripe_feetype.
  • Target: LeapfinFee (schema)
  • Source: stripe-payout (schema) and stripe-balance-transaction (schema)
TargetSource
objectType"fee"
idLeapfin 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.
amountstripe-balance-transaction.fee_details[].amount
currencyCodestripe-balance-transaction.fee_details[].currency
datestripe-balance-transaction.created
descriptionstripe-balance-transaction.fee_details[].description
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin adds a link to the associated payout record with:
- objectType = "payout"
- id = stripe-payout.id

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)
TargetSource
objectType"credit-note"
idstripe-credit-note.id
totalAmountstripe-credit-note.total
subTotalAmountstripe-credit-note.subtotal
currencyCodestripe-credit-note.currency
datestripe-credit-note.created
statusstripe-credit-note.status
issueDatestripe-credit-note.created
descriptionstripe-credit-note.memo
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin 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)
TargetSource
objectType"credit"
idstripe-credit-note.lines.data[].id
amountstripe-credit-note.lines.data[].amount
currencyCodestripe-credit-note.currency
datestripe-credit-note.created
type"adjustment"
descriptionstripe-credit-note.lines.data[].description
startDateNone
endDateNone
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin adds a link to the associated credit note record with:
- objectType = "credit-note"
- id = stripe-credit-note.id

If astripe-credit-note.lines.data[].invoice_line_item exists, Leapfin adds a link to the associated Line item record with:
- objectType = "lien-item"
- id = stripe-credit-note.lines.data[].invoice_line_item

Credit mapping (issuance)

  • 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)
TargetSource
objectType"credit"
idstripe-customer-balance-transaction.id
amountnegative stripe-customer-balance-transaction.amount
currencyCodestripe-customer-balance-transaction.currency
datestripe-customer-balance-transaction.created
type"issuance"
descriptionstripe-customer-balance-transaction.description
startDateNone
endDateNone
exchangeRatesNone
customFieldsLeapfin adds the following fields from the source record:
- type = stripe-customer-balance-transaction.type
- stripeMetaData = stripe-customer-balance-transaction.metadata
linksLeapfin 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 ways to refund 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)
TargetSource
objectType"refund"
idstripe-fee-refund.id
amountstripe-fee-refund.amount
currencyCodestripe-fee-refund.currency
datestripe-fee-refund.created
status"succeeded"
exchangeRatesLeapfin maps the exchange rate from the associated stripe-balance-transaction record of the stripe-fee-refund record.
- rate = stripe-balance-transaction.exchange_rate
- currencyCode = stripe-balance-transaction.currency
customFieldsLeapfin 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
linksLeapfin adds a link to each associated payment record by looking up the stripe-application-fee record based on thestripe-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)
TargetSource
objectType"payout"
idstripe-transfer.id
amountstripe-transfer.amount
currencyCodestripe-transfer.currency
datestripe-transfer.created
status"paid"
descriptionstripe-transfer.description
exchangeRatesNone
customFieldsLeapfin adds the following fields from the source record:
- stripeMetaData = stripe-transfer.metadata
- destinationAccount = stripe-transfer.destination
linksLeapfin 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)
TargetSource
objectType"fee"
idLeapfin 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.
amountstripe-balance-transaction.fee_details[].amount
currencyCodestripe-balance-transaction.fee_details[].currency
datestripe-balance-transaction.created
descriptionstripe-balance-transaction.fee_details[].description
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin 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)
TargetSource
objectType"payout"
idstripe-transfer-reversal.id
amountstripe-transfer-reversal.amount
currencyCodestripe-transfer-reversal.currency
datestripe-transfer-reversal.created
status"paid"
description""
exchangeRatesNone
customFieldsLeapfin adds the following field from the source record:
- stripeMetaData = stripe-transfer-reversal.metadata
linksLeapfin 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)
TargetSource
objectType"fee"
idLeapfin 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.
amountstripe-balance-transaction.fee_details[].amount
currencyCodestripe-balance-transaction.fee_details[].currency
datestripe-balance-transaction.created
descriptionstripe-balance-transaction.fee_details[].description
exchangeRatesNone
customFieldsLeapfin 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
linksLeapfin adds a link to the associated payout record with:
- objectType = "payout"
- id = stripe-transfer-reversal.id