Set an approval line
Edit an account and fill in Needs approval above, for example 1,000. From then on, any expense, withdrawal, transfer, loan or hold above that amount from this account needs approval.
Owners, admins and approvers working in the dashboard are not stopped: they are the people who would approve it anyway. Members and every API key are.
Asking for approval
A member who records spending above the line sees Ask for approval instead of the normal button. They describe what the money is for, and the request goes to the approvers. Software gets the error APPROVAL_REQUIRED and sends a spend request instead.
1try {
2 await finance.expenses.record({ accountId, amount: 2500, description: "New laptop" });
3} catch (err) {
4 if (err.isApprovalRequired) {
5 const request = await finance.spendRequests.create({
6 accountId,
7 amount: 2500,
8 description: "New laptop for the design team",
9 });
10 // Save request.id and check back, or wait for the spend_request.approved webhook.
11 }
12}Deciding a request
Nobody can approve their own request. A request nobody decides within seven days expires, and the person who asked is told.
- Approvers get a notification and an email. Open Approvals to see what is waiting.
- Approve, after entering your password if you have not in the last ten minutes. The money is held on the account at once.
- Or deny with a reason. The person who asked is told why.
Paying an approved request
Approval creates a hold, so the money stays reserved until it is spent. When the payment happens, capture that hold with the real amount: from the account page in the dashboard, or with finance.holds.capture(request.holdId) in your software.
Why approval creates a hold
