DHEEREJ RAVINDRAN Posted March 25, 2022 Share Posted March 25, 2022 I need to record a payment against a sales invoice. Is there any API available to do this ? I couldn't find one in the documentation(https://developer.sage.com/api/accounting/api/), only contact payment is available it is not against an invoice. Thanks, Dheerej Ravindran Link to comment Share on other sites More sharing options...
Steel, Mark Posted March 25, 2022 Share Posted March 25, 2022 Hi Dheerej, thank you for your question. You are correct in using the contact_payments api but need to extend the body parameters to include allocated_artefacts[]. You would then pass in the id or id's of the invoices you wish to allocate the payment against. We have a more detailed guide available here. { "contact_payment": { "transaction_type_id": "CUSTOMER_RECEIPT", "payment_method_id": "CREDIT_DEBIT", "contact_id": "3f7df26d955c4ec9a9321720dd0ff14f", "bank_account_id": "1265cfd39e1444628f0d025748ea7a60", "date": "2022-25-03", "total_amount": "5.00", "allocated_artefacts": [ { "artefact_id": "504744d47b1b4a05b316fe1b4ba876ef", <-ID of the sales_invoice "amount": "5.00" } ] } } Thanks Mark Link to comment Share on other sites More sharing options...
DHEEREJ RAVINDRAN Posted March 25, 2022 Author Share Posted March 25, 2022 (edited) Hi Mark, Thank you for the reply. it's working good. Edited March 25, 2022 by DHEEREJ RAVINDRAN Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now