How it works
High level functional specification
This integration runs daily and processes all GoCardless transactions that belong to a paid payout and are payments or refunds. When all transactions from the daily run have been processed and mapped, the GraphQL endpoint is used to create the GL import items.
Payouts
After you have been receiving payments, GoCardless 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 paid as follows:
• Debit the payout amount to your bank account
• Debit the fees amount to your fees account
Transactions contained in that payout are then listed and processed as follow :
Payments
• Credit the transaction gross value to your Income/Debtors account
This integration will attempt to find the right customer and associated account nominal to post the transaction to. In order to do this, the flow looks for an invoice number (in the payment description last 5 characters) and tries to fetch the corresponding AR transaction to derive customer and account nominal from.
If the integration does not find an invoice, then the transaction gets posted to the preconfigured Income Nominal and Unspecified Customer, this can then be edited in Xledger if needed.
Refunds
• Debit the transaction gross value to your Income/Debtors account
As with payments the integration will look for an invoice to match customer and account to.
Mapping
Process Flow
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 GoCardless to Xledger integration:
-
Current Bank Account Nom
The GL code of the bank account that will receive payouts from goCardless.
- Current Bank Account Num
The bank account number of the bank that will receive payouts from goCardless. This should be 8 digits for a UK bank account.
-
Fees Nominal
The GL code of the account to which goCardless' transaction fees will be posted.
-
Income Charge Nominal
The GL code of the account to which goCardless' payments and charges will be posted if no invoice is found. This could be an Income account or a Debtors account.
-
Income Refund Nominal
The GL code of the account to which goCardless' refunds will be posted if no invoice is found. This will often be the same as the “Income Charge Nominal”, but can be different if preferred.
-
Unspecified Customer Code
If no invoice is found then this customer code is used.
Field mappings![]()
Debit to Bank 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 | Arrival Date | ISO to yyyymmdd |
| VoucherDate | 8 | Arrival Date | ISO 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 | Payout type | "GoCardless payout bank debit" + value |
| X Identifier (KID) (Imp) | 25 | Payout ID | |
| Text | 29 | Reference | |
| Currency | 31 | Currency | |
| Amount | 33 | Amount | Format in GC: nnnndd Format in GL02b: nnnn.dd =(Math.abs(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 | Arrival Date | ISO to yyyymmdd |
| VoucherDate | 8 | Arrival Date | ISO to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Fees Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | Payout type | "GoCardless payout fees debit" + value |
| X Identifier (KID) (Imp) | 25 | Payout ID | |
| Text | 29 | Reference | |
| Currency | 31 | Currency | |
| Amount | 33 | Amount | Format in GC: nnnndd Format in GL02b: nnnn.dd =(Math.abs(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 | Arrival Date | ISO to yyyymmdd |
| VoucherDate | 8 | Arrival Date | ISO to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Income Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | Payment Reference | "GoCardless payment income credit" + value |
| X Identifier (KID) (Imp) | 25 | Payment ID | |
| Text | 29 | Payment description | |
| Currency | 31 | Payment Currency | |
| Amount | 33 | Amount | Format in GC: nnnndd Format in GL02b: nnnn.dd =-(Amount/100).toFixed(2) |
| EOL | 61 | x |
Debit to Refund 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 | BA | |
| VoucherNo | 5 | Arrival Date | ISO to yyyymmdd |
| VoucherDate | 8 | Arrival Date | ISO to yyyymmdd |
| Account / Nominal Code | 9 | Integration Variable: Income Refund Nominal | |
| Account Ledger (Imp) | 10 | (ignored) | |
| Our Ref (Imp) | 14 | Reference | "GoCardless refund income credit" + value |
| X Identifier (KID) (Imp) | 25 | Payment ID | |
| Text | 29 | Reference | |
| Currency | 31 | Currency | |
| Amount | 33 | Amount | Format in GC: nnnndd Format in GL02b: nnnn.dd =(Amount/100).toFixed(2) |
| EOL | 61 | x |