Mark an Invoice as Paid
curl --request POST \
--url https://api.bookeeping.ai/public-api/v1/invoices/{id}/mark-as-paid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strategyData": {
"strategy": "CREATE_TRANSACTION",
"data": {
"transactionRefNo": "<string>",
"category": "<string>",
"account": "<string>",
"counterParty": "<string>",
"transactionNote": "<string>"
}
}
}
'{
"message": "<string>",
"metaData": {
"warnings": [
"<string>"
]
},
"data": {
"_id": "<string>",
"projectId": "<string>",
"status": "DRAFT",
"invoiceId": "<string>",
"discount": {},
"amount": 123,
"invoiceDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"lineItems": [
{}
],
"note": "<string>",
"calculated": {
"grandTotal": 123,
"tax": 123,
"discount": 123,
"subTotal": 123
},
"attachments": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"purchaseOrderId": "<string>",
"counterParty": {
"_id": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"type": "customer",
"otherEmails": [
"jsmith@example.com"
],
"address": {}
},
"convertedAmount": 123,
"convertedCurrency": "<string>",
"sendDate": "2023-11-07T05:31:56Z",
"sendBy": "<string>",
"cancellationReason": "<string>",
"cancellationDate": "2023-11-07T05:31:56Z",
"cancellationBy": "<string>",
"paidMarkedBy": "<string>",
"paidMarkedDate": "2023-11-07T05:31:56Z",
"attachedTransactionId": "<string>",
"payViaStripeAccountConnectionId": "<string>"
}
}API key for authentication. Get your key from the Dashboard > Settings > API Access.
The id of the invoice. Expected to be a valid object id like 666666666666666666666666
Show child attributes
CREATE_TRANSACTION Show child attributes
The reference number of the transaction
The id of the category where the payment will be credited
Mark an Invoice as Paid executed successfully
Success message
Show child attributes
The id of the invoice
The id of the project
The status of the invoice
DRAFT, SENT, PAID, OVERDUE, CANCELLED The number of the invoice eg. 0001, 0002, etc.
Global discount, after applying the line item discounts
The amount of the invoice
The date of the invoice
The date of the due date
The currency of the invoice
The line items of the invoice
The notes of the invoice
The attachments of the invoice
The date of the creation
The date of the last update
Show child attributes
The id of the counterparty
customer, vendor, both The address of the counterparty
The id of the pay via stripe account connection. Expected to be a valid object id like 666666666666666666666666
curl --request POST \
--url https://api.bookeeping.ai/public-api/v1/invoices/{id}/mark-as-paid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strategyData": {
"strategy": "CREATE_TRANSACTION",
"data": {
"transactionRefNo": "<string>",
"category": "<string>",
"account": "<string>",
"counterParty": "<string>",
"transactionNote": "<string>"
}
}
}
'{
"message": "<string>",
"metaData": {
"warnings": [
"<string>"
]
},
"data": {
"_id": "<string>",
"projectId": "<string>",
"status": "DRAFT",
"invoiceId": "<string>",
"discount": {},
"amount": 123,
"invoiceDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"lineItems": [
{}
],
"note": "<string>",
"calculated": {
"grandTotal": 123,
"tax": 123,
"discount": 123,
"subTotal": 123
},
"attachments": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"purchaseOrderId": "<string>",
"counterParty": {
"_id": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"type": "customer",
"otherEmails": [
"jsmith@example.com"
],
"address": {}
},
"convertedAmount": 123,
"convertedCurrency": "<string>",
"sendDate": "2023-11-07T05:31:56Z",
"sendBy": "<string>",
"cancellationReason": "<string>",
"cancellationDate": "2023-11-07T05:31:56Z",
"cancellationBy": "<string>",
"paidMarkedBy": "<string>",
"paidMarkedDate": "2023-11-07T05:31:56Z",
"attachedTransactionId": "<string>",
"payViaStripeAccountConnectionId": "<string>"
}
}