Invoices
Mark Invoice Payment as Settled
Records an invoice as completed after payment is confirmed separately. Does not send money or verify receipt with a bank or provider. May send a contractor confirmation email. Refuses ambiguous externalInvoiceID values, rejected or canceled invoices, and prop-trading payout invoices. Also marks Expensify-imported invoices reimbursed in Expensify.
This is the v1 (legacy) API. The current API is in the API reference.
For creating, editing, submitting, approving, rejecting and tracking contractor invoices, see the invoice calls of the Toku API, listed under Contractor › API.
What marking an invoice as settled does#
Records an invoice as completed in Toku after payment has been confirmed separately. It does not send money, check a bank or payment provider, or prove that funds reached the beneficiary. A successful update can send the contractor a payment confirmation email and mark an Expensify-imported invoice reimbursed in Expensify.
Supply the invoice’s externalInvoiceID. For bulk-submitted invoices, this is the invoiceID you sent in the submission. HRIS-created invoices use their invoice number. If that ID matches more than one invoice in the organization, the operation refuses to mark any of them as paid. Rejected or canceled invoices cannot be marked as paid. Prop-trading payout invoices must follow the funded payment batch workflow instead.
Check data.success in the response, including on HTTP 200. A missing or ambiguous invoice can return {"data":{"success":false,"message":"..."},"error":null}. A repeat call for an already completed invoice returns success without marking it again.
curl --request POST \
--url 'https://app.toku.com/api/tokuApi/v1/markInvoicePaymentAsSettled' \
--header 'Authorization: Bearer <token>' \
--header 'x-role-type: CLIENT_ORG_ADMIN' \
--header 'Content-Type: application/json' \
--data '{
"externalInvoiceID": "string"
}'{
"data": {
"success": true,
"message": "Invoice payment marked as paid"
},
"error": null
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your API token.
Headers
x-role-typestringrequiredRole context for the request. Use CLIENT_ORG_ADMIN for most integrations.
Available options: CLIENT_ORG_ADMIN
Body
application/json
externalInvoiceIDstringrequiredThe invoiceID supplied for a bulk-submitted invoice, or the invoice number for an HRIS-created invoice.
Response
200Invoice status result. Check data.success and data.message. HTTP 200 alone does not confirm an update or a bank transfer.
dataobjectrequiredShow child attributes
successbooleanmessagestringerrorobject | nullrequiredAlways null on success
401The token is missing, invalid or expired
errorstringrequiredWhat went wrong
403The token's seat doesn't have the permission this operation needs
errorobjectrequiredShow child attributes
messagestringrequired429Too many requests from this address or token. Wait for the number of seconds in the Retry-After header, then retry.
errorstringrequiredWhat went wrong
500The operation failed. This includes input that doesn't match what the operation accepts; error.message says what was wrong.
errorobjectrequiredShow child attributes
messagestringrequired