Stripe
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:
- In Leapfin, click your account name in the top right corner of the screen.
- Click Integrations in the drop-down.

- Locate Stripe in the list of integrations and click CONNECT.
- 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.
- 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:
- Invoices
- Charges
- Refunds
- Disputes
- Payouts
- Credit notes
- Balance transactions
- Customer balance transactions
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 |
---|---|
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) |
---|---|---|
Invoices | stripe-invoice | - Invoice (LeapfinInvoice) - Line item (LeapfinLineItem) - Tax (LeapfinTax) - Credit - application (LeapfinCredit) - Credit - issuance (LeapfinCredit) - Credit - application (LeapfinCredit) |
Charges | stripe-charge | - Payment (LeapfinPayment) - Fee (LeapfinFee) Note: These records are created using both stripe-charge and stripe-balance-transaction. |
Refunds | stripe-charge | - Refund (LeapfinRefund) - Fee (LeapfinFee) Note: These records are created using both stripe-charge and stripe-balance-transaction. |
Disputes | stripe-dispute | - Dispute (LeapfinDispute) - Fee (LeapfinFee) Note: These records are created using both stripe-charge and stripe-balance-transaction. |
Payouts | stripe-payout | - Payout (LeapfinSettlement) - Fee (LeapfinFee) Note: These records are created using both stripe-charge and stripe-balance-transaction. |
Credit notes | stripe-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 transactions | stripe-balance-transaction | Leapfin 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 transactions | stripe-customer-balance-transaction | Leapfin uses stripe-customer-balance-transaction together with stripe-credit-note to create a credit-issuance record. |
Application fees | stripe-application-fee | Leapfin uses stripe-application-fee together with stripe-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 | - Payout (LeapfinSettlement) - Fee (LeapfinFee) |
Transfer reversals | stripe-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)
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)
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 (application type)
- Creation condition:
stripe-invoice.starting_balance
<stripe-invoice.ending_balance and stripe-invoice.status
= "paid" - Target:
LeapfinCredit
(schema) - Source:
stripe-invoice
(schema)
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 |
Credit mapping (issuance type)
- Creation condition: Leapfin creates an issuance credit record for each
stripe-invoice.lines.data
listed on the invoice with a negativeamount
. - Target: LeapfinCredit (schema)
- Source: stripe-invoice (schema)
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 |
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)
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 the 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 |
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 |
---|---|
objectType | "tax" |
id | stripe-invoice.tax |
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) andstripe-balance-transaction
(schema)
Target | Source |
---|---|
objectType | "payment" |
id | stripe-charge.id |
amount | stripe-charge.amount |
currencyCode | stripe-charge.currency (Note: this is the presentment currency of the charge. The 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 exchange rates from 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 associatedstripe-balance-transaction
record based onstripe-charge.balance_transaction
. A fee record is then created for each item withinstripe-balance-transaction.fee_details[]
that has astripe_fee type
. - Target:
LeapfinFee
(schema) - Source:
stripe-charge
(schema) and stripe-balance-transaction (schema)
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 |
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) andstripe-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.
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 canceled, the status is set failed. Otherwise, the status is set as the same value as thestripe-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 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 associatedstripe-balance-transaction
record based onstripe-refund.balance_transaction
. Leapfin then creates a fee record for each item withinstripe-balance-transaction.fee_details[]
with astripe_fee
type. - Target: LeapfinFee (schema)
- Source: stripe-refund (schema) and stripe-balance-transaction (schema)
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 needed to distinguish the 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 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) andstripe-balance-transaction
(schema)
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 status 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 | When 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. |
exchangeRates | Leapfin 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 |
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", 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) |
links | Leapfin 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)
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 needed 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 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) andstripe-balance-transaction
(schema)
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.bankName is not null, Leapfin uses that value. Otherwise, Leapfin sets the value as stripe-payout.data.type. |
exchangeRates | Leapfin 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 |
customFields | Leapfin adds the following field from the source record: - stripeMetaData = stripe-payout.metadata |
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 associatedstripe-balance-transaction
records based onstripe-payout.balance_transaction
and then creates a fee record for each item withinstripe-balance-transaction.fee_details[]
with astripe_fee
type. - Target:
LeapfinFee
(schema) - Source:
stripe-payout
(schema) andstripe-balance-transaction
(schema)
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-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)
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 withinstripe-credit-note.lines.data\[]
. - Target: LeapfinCredit (schema)
- Source: stripe-credit-note (schema)
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 = "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 thestripe-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 |
---|---|
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 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), andstripe-application-fee
(schema)
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 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 |
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 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)
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 associatedstripe-balance-transaction
records based onstripe-transfer.balance_transaction
and creates a fee record for each item withinstripe-balance-transaction.fee_details[]
with astripe_fee
type. - Target:
LeapfinFee
(schema) - Source:
stripe-transfer
(schema) andstripe-balance-transaction
(schema)
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 |
---|---|
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 associatedstripe-balance-transaction
records based onstripe-transfer-reversal.balance_transaction
and creates a fee record for each item withinstripe-balance-transaction.fee_details[]
with astripe_fee
type. - Target: LeapfinFee (schema)
- Source: stripe-transfer-reversal (schema) and stripe-balance-transaction (schema)
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 |
Updated 19 days ago