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:

  • Payables - see POST /snapshots/payables here
  • Settlements - see GET /get-settlements here

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:

TypeDescription
expenseClaimAn expense claim submitted and approved
invoicePurchaseAn invoice to pay submitted and approved
creditNoteA credit note submitted and approved
singlePurchaseCardA purchase made with a single-use virtual card
subscriptionCardA purchase made with a subscription virtual card
physicalCardA purchase made with a physical card
mileageAllowanceA mileage expense submitted and approved
perDiemAllowanceA per diem expense submitted and approved
reverseBillA 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 (see Lifecycle of a payable in Spendesk). 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:

TypeDescription
paymentPayment – a card payment or a wire transfer to an employee or supplier
refundRefund – a card refund
advanceCash advance – a wire transfer to an employee
cashReturnCash return – also known as late return, a wire transfer "bouncing back"
chargeBackChargeback – 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


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 two ways to detect them:

  • Either 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 whose payableDate is before the beginning of your accounting period will be listed first.
  • Or use the createdFrom/createdTo filter in order to retrieve all payables created between two dates.