If you're looking to build an accounting integration with Spendesk, or pull data for reporting / dashboards, our Spend Data endpoints are at the core of what you need. Please note a couple of key resources:
Between these two, the journey of spend can be understood. For more detail on the lifecycle, as well as other relevant data points connected to payables and settlements, continue reading!
Lifecycle of a payable
Typically a Payable is created in Spendesk following one of two events: a card transaction or approval of a spend request. Once a payable is created, it is in created
state (known as bookkeepingStatus
) and it needs to be "prepared" by an accountant. The accountant then enriches the payable with accounting information (G/L accounts, cost center, analytical fields etc) and marks it as "ready". The payable is now in prepared
state and can be exported to accounting software. Once a Payable is successfully exported to accounting, its state changes to exported
. Sometimes accounting exports fail, in which case the payable state is failedExport
. The accountant then has a choice to either send the payable back to Prepare (unprepared
) or manually create corresponding records in their accounting software and mark the payable as exportedManually
.
As you can see, payables in Spendesk come into existence only after spend requests are approved; they reach the end of their life-cycle once they are exported to accounting software. For example, it means that invoices and expense claims that have been submitted by employees but haven't yet been approved do not have a payable created.
Currently, Spendesk supports these types of payables:
Type | Description |
---|---|
expenseClaim | An expense claim submitted and approved |
invoicePurchase | An invoice to pay submitted and approved |
creditNote | A credit note submitted and approved |
singlePurchaseCard | A purchase made with a single-use virtual card |
subscriptionCard | A purchase made with a subscription virtual card |
physicalCard | A purchase made with a physical card |
mileageAllowance | A mileage expense submitted and approved |
perDiemAllowance | A per diem expense submitted and approved |
reverseBill | A refund or a late return (aka cash return) |
Settlements, bank fees and how they relate to payables
A Payable is a liability that needs to be paid. A Settlement represents the payment of such liability.
When a payable is paid via Spendesk – using a physical or a virtual card or using a wire transfer – a settlement is created and allocated to the payable. At this point the settlement is in created
state. Now the corresponding payable can be prepared and exported to accounting software. The settlement can also be exported to accounting (settlements don't need to be "prepared"). If successfully exported, the settlement state becomes exported
. If exporting the settlement failed for some reason, its state becomes failedExport
.
Sometimes settlements get reversed. This is the case for card refunds and wire transfer returns (known as cash return or late return). When this happens, a settlement and a corresponding payable are automatically created in Spendesk. The payable can be prepared
and exported
to accounting, the settlement can also be exported
to accounting.
Types of settlements currently supported in Spendesk:
Type | Description |
---|---|
payment | Payment – a card payment or a wire transfer to an employee or supplier |
refund | Refund – a card refund |
advance | Cash advance – a wire transfer to an employee |
cashReturn | Cash return – also known as late return, a wire transfer "bouncing back" |
chargeBack | Chargeback – card dispute |
Certain settlements incur bank fees collected by Spendesk. Most notably bank fees are collected on foreign currency payments and ATM withdrawals. When this happens a Bank fee is created (state: created
) in Spendesk and allocated to the corresponding Settlement. A bank fee can be exported
to accounting or become failedToExport
.
Frequently asked questions
How can I match payables, settlements and bank fees?
You can match payables with settlements on the data.allocations.[\[0-9]].settlementId
field of payables. You can match bank fees with settlements on the data.settlementId
field of bank fees.
Unfortunately it is not possible to match settlements with payables (there could be more than one settlement for each payable) or settlements with bank fees (there could be more than one bank fee for each settlement).
Why do I get payables without my default account codes?
Some accounting settings in Spendesk allow you to configure your accounting exports (purchase journal and bank journal) - e.g. default accounts payable and payment account codes. Snapshots of payables do not incorporate this information, since they only return the current state of payables, without marrying them against your current accounting configuration. You will need to enrich payable data with static account codes.
Why isn't my payable updated in the snapshot?
Snapshots of payables are cached for 12 hours. Requesting a new snapshot with exactly the same parameters does not generate a new snapshot - an existing one is returned until the original snapshot expires. Try changing your request parameters so that a new snapshot is generated.
How can I get payables submitted recently with a payable date in the past?
Requesting payables for a given accounting period (fromPayableDate
/toPayableDate
) can miss some payables that are submitted with an earlier payable date. There are several ways to detect them, e.g.:
- Use the
updatedFrom
query parameter - Request payables that have not been exported to accounting yet (
bookkeepingStatus=created&bookkeepingStatus=prepared
) while sorting them in chronological order (sortBy=payableDate&sortOrder=asc
). Payables whosepayableDate
is before the beginning of your accounting period will be listed first. - Use the
createdFrom
/createdTo
filter in order to retrieve all payables created between two dates.