How it works
High level functional specification
This integration runs daily and processes all Stripe transactions that are charges, payments, refunds or payouts. When all transactions from the daily run have been processed and mapped, they are bundled in a GL02b file and sent to Xledger. (See attached GL02b specification).
Charges and Payments
When a customer pays you, it incurs either a charge or payment depending on the payment method used in Stripe. Our integration then translates it to 4 journals entry lines as follows:
• Debit the transaction gross value to your Stripe account
• Credit the transaction gross value to your Income/Debtors account
• Debit the transaction fees to your fees account
• Credit the transaction fees value to your Stripe account
Refunds
Whether you need to refund or partially refund a transaction, our integration has you covered. A refund transaction will translate to 2 journals entry lines as follows:
• Debit the transaction gross value to your Income/Debtors account
• Credit the transaction gross value to your Stripe account
Payouts
After you have been receiving payments, Stripe will arrange payouts to your bank account. Whether you do this on an ad-hoc basis or schedule it Xledger will be updated when the payout is created as follows:
• Debit the payout amount to your bank account
• Credit the payout amount to your Stripe account
Mappings
Process Flow
Note: Here we mention an Income account, different options (to deal with debtors for example) will be included in the future and documented when supported. For now, income can be any account nominal in the system.
Integration variables
Cyclr allows for variables to be maintained against an integration. These can be set for each instance of an integration and allows for easy customer specific configuration. The following are available for the Stripe to Xledger integration:
Imp System
A reference field to show which system this has been imported from (e.g. “Stripe"). Not imported.
Imp System Ref
A reference field to show the external system’s transaction reference. Not imported.
Entity
The Xledger entity ID into which transactions will be posted.
Current Bank Account Nom
The GL code of the bank account that will receive payouts from Stripe.
Stripe Nominal
The GL code of the Stripe control account. This account will be used as the offset account for transaction postings and will show a balance usually representing timing differences between Stripe transactions and payouts.
Current Bank Account Num
The bank account number of the bank that will receive payouts from Stripe. This should be 8 digits for a UK bank account.
Fees Nominal
The GL code of the account to which Stripe’s transaction fees will be posted.
Income Charge Nominal
The GL code of the account to which Stripe’s payments and charges will be posted. This could be an Income account or a Debtors account.
Income Refund Nominal
The GL code of the account to which Stripe’s refunds will be posted. This will often be the same as the “Income Charge Nominal”, but can be different if preferred.
Field mappings
Debit to Stripe Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Stripe Nominal | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(data.amount/100).toFixed(2) |
| EOL | 61 | x |
Credit to Income/Debtors account mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Income Nominal | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Negative because credit Format in Stripe: nnnndd Format in GL02b: nnnn.dd =-(data.amount/100).toFixed(2) |
| EOL | 61 | x |
Debit to Fees Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Fees Nominal | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(data.amount/100).toFixed(2) |
| EOL | 61 | x |
Credit to Stripe Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Stripe Nominal | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Negative because credit Format in Stripe: nnnndd Format in GL02b: nnnn.dd =-(data.amount/100).toFixed(2) |
| EOL | 61 | x |
Debit to Income/Debtors Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Income Nominal | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Comes negative and needs to be made positive because debit Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(Math.abs(data.amount/100)).toFixed(2) |
| EOL | 61 | x |
Credit to Stripe Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Stripe Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Already negative. Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(data.amount/100).toFixed(2) |
| EOL | 61 | x |
Debit to Fees Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.available_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.available_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Current Bank Account Nom | |
| Account Ledger (Imp) | 10 | Integration Variable: Current Bank Account Num | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Comes negative and needs to be made positive because debit Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(Math.abs(data.amount/100)).toFixed(2) |
| EOL | 61 | x |
Credit to Stripe Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.available_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.available_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Stripe Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Already negative. Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(data.amount/100).toFixed(2) |
| EOL | 61 | x |
Debit to Fees Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Fees Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Comes negative and needs to be made positive because debit Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(Math.abs(data.amount/100)).toFixed(2) |
| EOL | 61 | x |
Credit to Fees Account Mapping
| GL02b (Xledger) | GL02b column | Balance Transaction (Stripe) | Value/notes |
|---|---|---|---|
| ImpSystem | 1 | Integration Variable: Imp System | |
| ImpSystemRef | 2 | Integration Variable: Imp System Ref | |
| Entity | 3 | Integration Variable: Entity | |
| VoucherType | 4 | GL | |
| VoucherNo | 5 | data.created_on | Unix epoch to yyyymmdd |
| VoucherDate | 8 | data.created_on | Unix epoch to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Stripe Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | data.reporting_category | |
| X Identifier (KID) (Imp) | 25 | data.transaction_id | Removed “trx_” prefix from Stripe field to fit 25 chars. ='data.transaction_id'.substring(4) |
| Text | 29 | data.description | |
| Currency | 31 | data.currency | |
| Amount | 33 | data.amount | Already negative. Format in Stripe: nnnndd Format in GL02b: nnnn.dd =(data.amount/100).toFixed(2) |
| EOL | 61 | x |