pjh18
6 October 2022 08:50
1
Hi I’m trying to create a credit note to account for bank charges on an incoming payment, but can’t understand this response
{ "payload": { "Header": { "MessageType": "Request", "SubmissionNumber": "22100682135", "Authentication": { "AccNumber": "61315****", "MD5Value": "3253d590a2********************", "ApplicationID": "9f57263b*****************" } }, "Body": { "InvoiceData": { "InvoiceType": "INVOICE", "ClientID": 6884075, "ClientAddress": { "Address": "123 Test Street
Manchester
MA1 5TH
United Kingdom", "CountryISO": "GB" }, "Currency": "GBP", "TermDays": "14", "Language": "en", "Notes": "reference our order 4455", "InvoiceLines": { "ItemLines": { "ItemLine": [ { "ItemID": "0", "ItemName": "Bank", "ItemDescription": "charge", "ItemNominalCode": "7901", "Tax1": { "TaxName": "VAT", "TaxPercentage": "0" }, "UnitCost": "-1", "Qty": "1" }, ] } }, "Scheduling": { "SingleInvoiceData": { "IssueDate": "2022-10-06", "PurchaseReference": "009" } }, "CreditNote":{ "CreditNoteType":"HOLD", "ParentInvoiceId": 25492528 } } } } }
Array
(
[Errors] => Array
(
[Error] => Array
(
[0] => Refund amount exceeds total paid balance.
)
)
)
Hi @pjh18
Apologies, @pjh18 , I missed something with this - the invoice you’re trying to refund doesn’t have any balance paid on it (it’s still outstanding in full), so there’s nothing to refund.
So, in this case, you would use VOID
at the CreditNoteType
, rather than HOLD
.
There’s more info on this here: Creating a Credit Note using the API
pjh18
6 October 2022 18:51
3
Thanks Matthew , I’m trying to ‘pay’ an invoice from a credit - I’ve included “ApplyFromCredit” but it still creates a new payment
{
"payload": {
"Header": {
"MessageType": "Request",
"SubmissionNumber": 22100663430,
"Authentication": {
"AccNumber": "6131591915",
"MD5Value": "b38b20553253*************",
"ApplicationID": "8b43f369-*************************"
}
},
"Body": {
"PaymentDetails": {
"Designation": "SUPPLIER",
"PaymentType": "PAYMENT",
"PaymentDate": "2022-10-06",
"InvoiceID": "26222948",
"DesignatedTo": {
"SupplierID": "3528739"
},
"Amount": "30",
"Currency": "GBP",
"PayMethod": "BACS",
"BankNominalCode": "1200",
"ApplyFromCredit": "true",
"SendConfirmation": "false"
}
}
}
}
Array
(
[Payment_Create] => Array
(
[Header] => Array
(
[MessageType] => Response
[SubmissionNumber] => 22100663430
)
[Body] => Array
(
[PaymentID] => 25523760
)
)
)
Hi @pjh18
I’ve had to defer this to our development team to take a look at this and see if they can advice further. As soon as I hear back, I’ll let you know.
Hi @pjh18
An update which should resolve this issue has gone live. Would you mind giving this another go when it’s convenient, and letting us know how it goes, please?
pjh18
16 October 2022 10:51
9
Thanks Matthew
{
"payload": {
"Header": {
"MessageType": "Request",
"SubmissionNumber": 221016104149,
"Authentication": {
"AccNumber": "61315******",
"MD5Value": "8209356165de3cef*************",
"ApplicationID": "8b43f369-**************"
}
},
"Body": {
"PaymentDetails": {
"Designation": "CLIENT",
"PaymentType": "CREDIT",
"PaymentDate": "2022-10-16",
"DesignatedTo": {
"ClientID": "6901117"
},
"Amount": "150",
"Currency": "GBP",
"PayMethod": "BACS",
"BankNominalCode": "1200",
"SendConfirmation": "false"
}
}
}
}
Array
(
[Payment_Create] => Array
(
[Header] => Array
(
[MessageType] => Response
[SubmissionNumber] => 221016104149
)
[Body] => Array
(
[PaymentID] => 23375300
)
)
)
still creates a payment
and this a bank receipt
{
"payload": {
"Header": {
"MessageType": "Request",
"SubmissionNumber": 221016104919,
"Authentication": {
"AccNumber": "61315********",
"MD5Value": "a25622762aa529*******************",
"ApplicationID": "8b43f369-***************************"
}
},
"Body": {
"PaymentDetails": {
"Designation": "SUPPLIER",
"PaymentType": "CREDIT",
"PaymentDate": "2022-10-16",
"DesignatedTo": {
"SupplierID": "3533764"
},
"Amount": "30",
"Currency": "GBP",
"PayMethod": "BACS",
"BankNominalCode": "1200",
"SendConfirmation": "false"
}
}
}
}
Array
(
[Payment_Create] => Array
(
[Header] => Array
(
[MessageType] => Response
[SubmissionNumber] => 221016104919
)
[Body] => Array
(
[PaymentID] => 25640103
)
)
)
Is my input wrong??
thanks
Peter
Hey Peter. I’m not someone who really understands the stuff you posted lol but it does interest me to a point. Not sure if it changes anything but in your top examples you had an option to applyfromcredit but this isnt in the bottom example. Don’t know if that changes much but just something I noticed
pjh18
17 October 2022 06:54
11
Well spotted - thank you - but it doesn’t actually change the outcome
{
"payload": {
"Header": {
"MessageType": "Request",
"SubmissionNumber": 22101765154,
"Authentication": {
"AccNumber": "61315*****",
"MD5Value": "80f2988eb3c8d****************************",
"ApplicationID": "8b43f369-**************************"
}
},
"Body": {
"PaymentDetails": {
"Designation": "SUPPLIER",
"PaymentType": "PAYMENT",
"PaymentDate": "2022-10-17",
"InvoiceID": "26339548",
"DesignatedTo": {
"SupplierID": "3533764"
},
"Amount": "30",
"Currency": "GBP",
"PayMethod": "BACS",
"BankNominalCode": "1200",
"ApplyFromCredit": "true",
"SendConfirmation": "false"
}
}
}
}
Array
(
[Payment_Create] => Array
(
[Header] => Array
(
[MessageType] => Response
[SubmissionNumber] => 22101765154
)
[Body] => Array
(
[PaymentID] => 25645327
)
)
)
Hi @pjh18
Let me send you a private message so we can take a look into this for you.
You should see a green notification in the top right corner, shortly.
QFMathew
Closed
1 November 2022 08:00
13
This topic was automatically closed after 17 days. New replies are no longer allowed.