Stripe
Authentication
- Navigate to Integrations page and click on Stripe to Connect
- Login to Stripe using your Stripe Admin account. Ensure Admin account is not connected to any other platforms.
If you see the following error message after clicking "Continue" button, please log into Stripe via single sign-on first before connecting it to Leapfin.
- You are done! Connect to as many Stripe accounts as you need.
Data Sources
Once authenticated, Leapfin will use Stripe API to fetch data. Two fetching methods are applicable. When backfilling historical data, Leapfin calls object specific API endpoints to pull each types of objects in bulk. For example, "List all invoices" endpoint is used to pull historical Stripe invoices. When processing daily incremental data, Leapfin calls Stripe's Events endpoints to pull newly created or updated Stripe objects.
Specifically, following types of Stripe objects are fetched by Leapfin.
Invoices
Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription. For schema definition and sample data, refer to Stripe Invoices.
Each Stripe invoice object is imported as a stripe-invoice
record on Leapfin Platform.
Charges
Charges represent payment transactions on Stripe. They are created to charge a credit or a debit card. For schema definition and sample data, refer to Stripe Charges.
Each Stripe charge object is imported as a stripe-charge
record on Leapfin Platform.
Refunds
Refund objects allow merchant to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. For schema definition and sample data, refer to Stripe Refunds.
Each Stripe refund object is imported as a stripe-refund
record on Leapfin Platform.
Disputes
A dispute occurs when a customer questions a charge with their card issuer. When this happens, merchants are given the opportunity to respond to the dispute with evidence that shows that the charge is legitimate. For schema definition and sample data, refer to Stripe Disputes.
Each Stripe dispute object is imported as a stripe-dispute
record on Leapfin Platform.
Payouts
A Payout object is created when merchant receives funds from Stripe, or when merchant initiate a payout to either a bank account or debit card of a connected Stripe account. For schema definition and sample data, refer to Stripe Payouts.
Each Stripe payout object is imported as a stripe-payout
record on Leapfin Platform.
Credit Notes
A credit note is issued to adjust an invoice's amount after the invoice is finalized. For schema definition and sample data, refer to Stripe Credit Notes.
Each Stripe credit note object is imported as a stripe-credit-note
record on Leapfin Platform.
Balance Transactions
Balance transactions represent funds moving through Stripe account. They're created for every type of transactions that comes into or flows out Stripe account balance. For schema definition and sample data, refer to Stripe Balance Transactions.
Each Stripe balance transaction object is imported as a stripe-balance-transaction
record on Leapfin Platform.
Customer Balance Transactions
Each Stripe customer has a balance value, which denotes a debit or credit that's automatically applied to their next invoice upon finalization. For schema definition and sample data, refer to Stripe Customer Balance Transactions.
Each Stripe customer balance transaction object is imported as a stripe-customer-balance-transaction
record on Leapfin Platform.
Additional Data Sources
For organizations using Stripe Connect, additional data sources below are pulled by Leapfin to support marketplace transactions.
Application Fees
When merchant collects a transaction fee on top of a charge made for your user (using Stripe Connect), an Application Fee object is created in merchant's account. For schema definition and sample data, refer to Stripe Application Fees.
Each Stripe application fee object is imported as a stripe-application-fee
record on Leapfin Platform.
Application Fee Refunds
Application Fee Refund objects allow merchant to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected. For schema definition and sample data, refer to Stripe Application Fee Refunds.
Each Stripe application fee refund object is imported as a stripe-fee-refund
record on Leapfin Platform.
Transfers
A Transfer object is created when merchant moves funds between Stripe accounts as part of Connect. For schema definition and sample data, refer to Stripe Transfers.
Each Stripe transfer object is imported as a stripe-transfer
record on Leapfin Platform.
Transfer Reversals
Stripe Connect platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance. For schema definition and sample data, refer to Stripe Transfer Reversals.
Each Stripe transfer reversal object is imported as a stripe-transfer-reversal
record on Leapfin Platform.
Mapping Logics
Data Forma Conversion
Leapfin applies data format conversions on all currency amount and date-time values from Stripe. Specifically
- 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".
An Edge Case for Exchange Rate
The exchange rate value on Stripe's Balance Transaction object can be confusing in 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 - both JPY 100 and USD 1.00 are stored as 100.When mapping exchange rate, Leapfin handles such edge cases properly be adjusting the exchange rate values based on zero-decimal currencies.
stripe-invoice
Leapfin imports each Stripe invoice object as a stripe-invoice
record, which contains many pieces of data such as purchased items, credit application, credit issuance and tax. When mapping data, Leapfin creates a separate Financial Record for each piece of data.
Create an Invoice
Leapfin creates an Invoice record for each stripe-invoice
.
Target: LeapfinInvoice (schema) | Source: stripe-invoice (schema) |
---|---|
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 | The following fields from source record are added: -- stripeMetaData = stripe-invoice.metadata |
links | None |
Create a Credit (type "application")
Leapfin creates a Credit record with type "application" if the invoice has stripe-invoice.starting_balance
< stripe-invoice.ending_balance
and stripe-invoice.status
= "paid".
Target: LeapfinCredit (schema) | Source: stripe-invoice (schema) |
---|---|
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 | Add a link to the Invoice record with: -- objectType = "invoice" -- id = stripe-invoice.id |
Create a Line Item
Leapfin creates a Line Item record for each stripe-invoice.lines.data
listed on the invoice as long as the amount
is positive.
Target: LeapfinLineItem (schema) | Source: stripe-invoice (schema) |
---|---|
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 | 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 | The following fields from source record are added: -- 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 | Add a link to the Invoice record with: -- objectType = "invoice" -- id = stripe-invoice.id |
Create a Credit (type "issuance")
Leapfin creates a Credit record with type "issuance" for each stripe-invoice.lines.data
listed on the invoice as long as the amount
is negative.
In the case of unused time credits being issued, Stripe does not provide data on what the original line item representing the previous plan was. This does not allow Leapfin to handle journal entry cases in this scenario.
Target: LeapfinCredit (schema) | Source: stripe-invoice (schema) |
---|---|
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 | The following fields from source record are added: -- 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 | Add a link to the Invoice record with: -- objectType = "invoice" -- id = stripe-invoice.id |
Create a Credit (type "application")
Leapfin creates a Credit record with type "application" for each stripe-invoice.lines.data
listed on the invoice as long as the amount
is negative and proration
is true
Target: LeapfinCredit (schema) | Source: stripe-invoice (schema) |
---|---|
objectType | "credit" |
id | stripe-invoice.lines.data[].id |
amount | absolute(stripe-invoice.lines.data[].amount ) - absolute (stripe-invoice.ending_balance ).if sum of 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 | Add a link to the Invoice record with: -- objectType = "invoice" -- id = stripe-invoice.id |
Create a Tax
Leapfin creates a Tax record for each stripe-invoice.lines.data
listed on the invoice.
Target: LeapfinTax (schema) | Source: stripe-invoice (schema) |
---|---|
objectType | "tax" |
id | stripe-invoice.lines.data[].id |
amount | sum of amount values within stripe-invoice.lines.data[].tax_amounts[] |
currencyCode | stripe-invoice.lines.data[].currency |
date | stripe-invoice.lines.data[].created |
description | "" |
exchangeRates | None |
customFields | The following fields from source record are added: -- stripeTaxRate: stripe-invoice.lines.data[].tax_rates[] |
links | Add a link to the associated Line Item record with: -- objectType = "line-item" -- id = stripe-invoice.lines.data[].id |
stripe-charge
Leapfin imports each Stripe charge object as a stripe-charge
record, which is mapped as Payment record on Leapfin Platform. In addition, fees charged by Stripe is contained in stripe-balance-transaction
record associated with the stripe-charge
record. Leapfin also creates Fee record for Stripe fees.
Application fee mapping
Application fee is always collected as part of a charge on Stripe. Though a separate application fee object is created, the same information is also included in the balance transaction object of the Stripe charge. (see Stripe document: Collect application fees).
Leapfin stores application fee as
customField.applicationFeeAmount
on the Payment record. No separate Financial Record is created.
Create a Payment
Leapfin creates a Payment record for each stripe-charge
.
Target: LeapfinPayment (schema) | Source: stripe-charge (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "payment" |
id | stripe-charge.id |
amount | stripe-charge.amount |
currencyCode | stripe-charge.currency (Note: 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, map created of the event object as succeededDate if type = "charge.succeeded"when backfilling historical data or event information above is not available, map stripe-charge.created as succeededDate |
description | stripe-charge.description |
exchangeRates | Map exchange rate from associated stripe-balance-transaction record of the stripe-charge record-- rate = stripe-balance-transaction.exchange_rate -- currencyCode = stripe-balance-transaction.currency |
customFields | The following fields from source record are added: -- 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 | Add a link to the associated Invoice record with: -- objectType = "invoice" -- id = stripe-charge.invoice |
Create a Fee
For each stripe-charge
record, Leapfin fetches the associated stripe-balance-transaction
record based on stripe-charge.balance_transaction
. Then a Fee record is created for each item with in stripe-balance-transaction.fee_details[]
whose type
is "stripe_fee".
Target: LeapfinFee (schema) | Source: stripe-charge (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "fee" |
id | use stripe-balance-transaction.id as the id, and use 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 | The following fields from source record are added: -- reportingCategory = stripe-balance-transaction.reporting_category -- type = stripe-balance-transaction.type |
links | Add a link to the associated Payment record with: -- objectType = "payment" -- id = stripe-charge.id |
stripe-refund
Leapfin imports each Stripe refund object as a stripe-refund
record. Each record is mapped as a Refund record on Leapfin Platform. In addition, fees charged by Stripe is contained in stripe-balance-transaction
record associated with the stripe-refund
record.
These fees are mapped as Fee records on Leapfin Platform.
Create a Refund
Leapfin creates a Refund record for each stripe-refund
.
Payment Failure Refund
For ACH, direct debit, and other asynchronous payment methods, Stripe creates a refund object when the payment failed. A balance transaction object with type = "payment_failure_refund" is also created together the Stripe refund object.
By default, Leapfin creates a Refund record for each of those Stripe refund objects. Alternative option is also provided to ignore those Stripe refund objects on Leapfin Platform.
Target: LeapfinRefund (schema) | Source: stripe-refund (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "refund" |
id | stripe-refund.id |
amount | stripe-refund.amount |
currencyCode | stripe-refund.currency (Note: this is the presentment currency of the refund. Corresponding settlement currency is in stripe-balance-transaction ) |
date | stripe-refund.created |
status | if stripe-refund.status is "cancelled", set status as "failed". Otherwise, set status with the same value as stripe-refund.status . |
exchangeRates | Map exchange rate from associated stripe-balance-transaction record of the stripe-refund record-- rate = stripe-balance-transaction.exchange_rate -- currencyCode = stripe-balance-transaction.currency |
customFields | The following fields from source record are added: -- 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 | Add a link to the associated Payment record with: -- objectType = "payment" -- id = stripe-refund.charge Add 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 |
Create a Fee
For each stripe-refund
record, Leapfin fetches the associated stripe-balance-transaction
record based on stripe-refund.balance_transaction
. Then a Fee record is created for each item with in stripe-balance-transaction.fee_details[]
whose type
is "stripe_fee".
Target: LeapfinFee (schema) | Source: stripe-refund (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "fee" |
id | use stripe-balance-transaction.id as the id, and use 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 | The following fields from source record are added: -- reportingCategory = stripe-balance-transaction.reporting_category -- type = stripe-balance-transaction.type -- feeType = stripe-balance-transaction.fee_details[].type |
links | Add a link to the associated Refund record with: -- objectType = "refund" -- id = stripe-refund.id |
stripe-dispute
Leapfin imports each Stripe dispute object as a stripe-dispute
record. Each record is mapped as a Dispute record on Leapfin Platform. Stripe dispute object is associated with one or more Stripe Balance Transaction objects, which contain fees charged by Stripe. These fees are mapped as Fee records on Leapfin Platform.
Create a Dispute
Leapfin creates a Refund record for each stripe-dispute
.
Target: LeapfinDispute (schema) | Source: stripe-dispute (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "dispute" |
id | stripe-dispute.id |
amount | stripe-dispute.amount |
currencyCode | stripe-refund.currency (Note: this is the presentment currency of the dispute. Corresponding settlement currency is in stripe-balance-transaction ) |
date | stripe-dispute.created |
status | if stripe-dispute.status is "won", set status as "won". If stripe-dispute.status is "lost", set status as "lost". Otherwise, set status as "pending". |
description | stripe-dispute.reason |
initiatedDate | when pulling incremental data from Stripe Event API, map created of the event object as initiatedDate if type = "charge.dispute.funds_withdrawn"when backfilling historical data or event information above is not available, map stripe-dispute.created as initiatedDate |
resolvedDate | when pulling incremental data from Stripe Event API, map created of the event object as initiatedDate if type = "charge.dispute.closed"when backfilling historical data or event information above is not available, resolvedDate is left as null. |
exchangeRates | Map 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 | The following fields from source record are added: -- stripeMetaData = stripe-dispute.metadata For each associated stripe-balance-transaction record with reporting_category as "dispute", include 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 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 | Add a link to the associated Payment record with: -- objectType = "payment" -- id = stripe-dispute.charge Add a link to each associated Line Item record by looking up stripe-charge record based on stripe-dispute.charge then looking up stripe-invoice record based on stripe-charge.invoice :-- objectType = "line-item" -- id = stripe-invoice.lines.data[].id |
Create a Fee
For each stripe-dispute
record, Leapfin fetches all associated stripe-balance-transaction
records based on stripe-dispute.balance_transactions[]
. Then a Fee record is created for each item with in stripe-balance-transaction.fee_details[]
whose type
is "stripe_fee".
Target: LeapfinFee (schema) | Source: stripe-dispute (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "fee" |
id | use stripe-balance-transaction.id as the id, and use 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 | The following fields from source record are added: -- reportingCategory = stripe-balance-transaction.reporting_category -- type = stripe-balance-transaction.type -- feeType = stripe-balance-transaction.fee_details[].type |
links | Add a link to the associated Dispute record with: -- objectType = "dispute" -- id = stripe-dispute.id |
stripe-payout
Leapfin imports each Stripe payout object as a stripe-payout
record. Each record is mapped as a Payout record on Leapfin Platform. In addition, fees charged by Stripe is contained in stripe-balance-transaction
record associated with the stripe-payout
record.
These fees are mapped as Fee records on Leapfin Platform.
Create a Payout
Leapfin creates a Payout record for each stripe-payout
.
Target: LeapfinSettlement (schema) | Source: stripe-payout (schema) and stripe-balance-transaction (schema) |
---|---|
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 "cancelled" or "failed, set status as "failed". If stripe-payout.status is "paid", set status as "paid". Otherwise, set status as "pending". |
description | if stripe-balance-transaction.data.bankAccount.bankName is not null, then use that value. Otherwise, set value as stripe-payout.data.type |
exchangeRates | Map 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 | The following fields from source record are added: -- stripeMetaData = stripe-payout.metadata |
links | None |
Create a Fee
For each stripe-payout
record, Leapfin fetches the associated stripe-balance-transaction
records based on stripe-payout.balance_transaction
. Then a Fee record is created for each item with in stripe-balance-transaction.fee_details[]
whose type
is "stripe_fee".
Target: LeapfinFee (schema) | Source: stripe-payout (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "fee" |
id | use stripe-balance-transaction.id as the id, and use 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 | The following fields from source record are added: -- reportingCategory = stripe-balance-transaction.reporting_category -- type = stripe-balance-transaction.type -- feeType = stripe-balance-transaction.fee_details[].type |
links | Add a link to the associated Payout record with: -- objectType = "payout" -- id = stripe-payout.id |
stripe-credit-note
Leapfin imports each Stripe Credit Note object as a stripe-credit-note
record. The record contains a breakdown of credit note items. When mapping data, Leapfin creates a Credit Note record to represent the total adjustments to invoice. A Credit record is also created to represent the actual credit being issued if any. (refer here for the difference between credit note and credit).
Create a Credit Note
Leapfin creates a Credit Note record for each stripe-credit-note
.
Target: LeapfinCreditNote (schema) | Source: stripe-credit-note (schema) |
---|---|
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 | The following fields from source record are added: -- 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 | Add a link to the associated Invoice record with: -- objectType = "invoice" -- id = stripe-credit-note.invoice If stripe-credit-note.refund is not null, fetch the associated Refund record with:-- objectType = "refund" -- id = stripe-credit-note.refund and add a link to this Credit Note record on the fetched Refund record. |
Create a Credit (type "adjustment")
Leapfin creates Credit records with type "adjustment" if the Stripe credit note is issued prior to payment, specifically stripe-credit-note.type
= "pre_payment". In that case, a Credit record is created for each item within stripe-credit-note.lines.data[]
.
Target: LeapfinCredit (schema) | Source: stripe-credit-note (schema) |
---|---|
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 | The following fields from source record are added: -- 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 | Add a link to the associated Credit Note record with: -- objectType = "credit-note" -- id = stripe-credit-note.id If stripe-credit-note.lines.data[].invoice_line_item exists, add a link to the associated Line item record with:-- objectType = "lien-item" -- id = stripe-credit-note.lines.data[].invoice_line_item |
Create a Credit (type "issuance")
Leapfin creates a Credit record with type "issuance" if the Stripe credit note is issued post payment, specifically stripe-credit-note.type
= "post_payment". In that case, the stripe-customer-balance-transaction
record associated with the Stripe credit note is fetched and a single Credit record is created.
Target: LeapfinCredit (schema) | Source: stripe-credit-note (schema) and stripe-customer-balance-transaction (schema) |
---|---|
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 | The following fields from source record are added: -- type = stripe-customer-balance-transaction.type -- stripeMetaData = stripe-customer-balance-transaction.metadata |
links | Add a link to the associated Credit Note record with: -- objectType = "credit-note" -- id = stripe-credit-note.id |
stripe-fee-refund
Leapfin imports each Stripe application fee refund object as a stripe-fee-refund
record, which is mapped as a Refund record on Leapfin Platform..
Two ways of issuing application fee refund
Stripe allows two ways to refund application fees. The common way is to refund the application fee together with the charge. The alternatively way is to issue an application fee refund separately. (see Stripe's document for details).
When issued in the common way, the application fee refund is included as parts of the Balance Transaction object associated with the Stripe Refund object. Leapfin maps application fee refund as
customFields.applicationFeeAmount
on Leapfin's Refund record. (see Refund mapping logic).When issued separately, the application fee refund object is not associated with any Stripe Refund object. In that case, Leapfin maps it as a separate Refund record.
Create a Refund
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) |
---|---|
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 | Map exchange rate from associated stripe-balance-transaction record of the stripe-fee-refund record-- rate = stripe-balance-transaction.exchange_rate -- currencyCode = stripe-balance-transaction.currency |
customFields | The following fields from source record are added: -- 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 | Add a link to each associated Payment record by looking up stripe-application-fee record based on stripe-fee-refund.fee :-- objectType = "payment" -- id = stripe-application-fee.charge |
stripe-transfer
Leapfin imports each Stripe transfer object as a stripe-transfer
record. Each record is mapped as a Payout record on Leapfin Platform. In addition, fees charged by Stripe is contained in stripe-balance-transaction
record associated with the stripe-transfer
record. These fees are mapped as Fee records on Leapfin Platform.
Create a Payout
Leapfin creates a Payout record for each stripe-transfer
.
Target: LeapfinSettlement (schema) | Source: stripe-transfer (schema) |
---|---|
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 | The following fields from source record are added: -- stripeMetaData = stripe-transfer.metadata -- destinationAccount = stripe-transfer.destination |
links | Add a link to associated Payment record if exists: -- objectType = "payment" -- id = stripe-transfer.source_transaction |
Create a Fee
For each stripe-transfer
record, Leapfin fetches the associated stripe-balance-transaction
records based on stripe-transfer.balance_transaction
. Then a Fee record is created for each item with in stripe-balance-transaction.fee_details[]
whose type
is "stripe_fee".
Target: LeapfinFee (schema) | Source: stripe-transfer (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "fee" |
id | use stripe-balance-transaction.id as the id, and use 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 | The following fields from source record are added: -- reportingCategory = stripe-balance-transaction.reporting_category -- type = stripe-balance-transaction.type -- feeType = stripe-balance-transaction.fee_details[].type |
links | Add a link to the associated Payout record with: -- objectType = "payout" -- id = stripe-transfer.id |
stripe-transfer-reversal
Leapfin imports each Stripe transfer reversal object as a stripe-transfer-reversal
record. Each record is mapped as a Payout record on Leapfin Platform. In addition, fees charged by Stripe is contained in stripe-balance-transaction
record associated with the stripe-transfer
record. These fees are mapped as Fee records on Leapfin Platform.
Create a Payout
Leapfin creates a Payout record for each stripe-transfer-reversal
.
Target: LeapfinSettlement (schema) | Source: stripe-transfer-reversal (schema) |
---|---|
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 | The following fields from source record are added: -- stripeMetaData = stripe-transfer-reversal.metadata |
links | Add a link to associated Payment record if exists: -- objectType = "payment" -- id = stripe-transfer-reversal.source_transaction |
Create a Fee
For each stripe-transfer-reversal
record, Leapfin fetches the associated stripe-balance-transaction
records based on stripe-transfer-reversal.balance_transaction
. Then a Fee record is created for each item with in stripe-balance-transaction.fee_details[]
whose type
is "stripe_fee".
Target: LeapfinFee (schema) | Source: stripe-transfer-reversal (schema) and stripe-balance-transaction (schema) |
---|---|
objectType | "fee" |
id | use stripe-balance-transaction.id as the id, and use 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 | The following fields from source record are added: -- reportingCategory = stripe-balance-transaction.reporting_category -- type = stripe-balance-transaction.type -- feeType = stripe-balance-transaction.fee_details[].type |
links | Add a link to the associated Payout record with: -- objectType = "payout" -- id = stripe-transfer-reversal.id |
Updated 21 days ago