Jump to content

Is there any API for payment against invoice?


 Share

Recommended Posts

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...