API Method to make a supplier payment from petty cash

I am stuck with one issue.

I have sub contractors working for me, on some jobs they take cash directly off the customer after completing the job. In practice, I just knock this amount off what I owe them next time I pay them.

So if a customer pays cash, when I close the job on my system, I have created the following updates to Quickfile (obviously of they pay by card or bacs I use a different process):

For illustration, lets say the job was worth £100 and I pay my sub contractor £60.

[Client_Create] Create a client on QuickFile
[Invoice_Create] Create a client invoice for £100
[Payment_Create] Create a cash payment in petty cash of £100 to cover the customer invoice and set it to paid
[Purchase_Create] Create a supplier invoice for £60
Create a supplier payment of £100 from petty cash??

It is this last step I am not sure how to do it, I have done it manually on QuickFile to see how to do it, but can’t work out what API method to use? I have tried [Payment_Create] but it either won’t work for this or I am using the wrong parameters. This is what I have tried as my Json object:

{
“payload”: {
“Header”: {
“MessageType”: “Request”,
“SubmissionNumber”: “’.$subNo.’”,
“Authentication”: {
“AccNumber”: “’.$accountNo.’”,
“MD5Value”: “’.$MD5Value.’”,
“ApplicationID”: “’.$appID.’”
}
},
“Body”: {
“PaymentDetails”: {
“Designation”: “SUPPLIER”,
“PaymentType”: “PAYMENT”,
“PaymentDate”: “’.date(“Y-m-d”, strtotime(now)).’”,
“PurchaseID”: “24557036”,
“DesignatedTo”: {

      "SupplierID": "3358154"
    },
    "Amount": "50.00",
    "Currency": "GBP",
    "PayMethod": "CASH",
    "BankNominalCode": "1230",
    "SendConfirmation": "false"
  }
}

}
}

The API documentation for Payment_Create suggests that this should be InvoiceID - there’s no PurchaseID in the message structure so presumably the InvoiceID represents a purchase invoice if the Designation is SUPPLIER

2 Likes

Thanks Ian I am sure I had tried that, but i have just done it and this now does what I want it to!!!

Thank you very much.