Allows you to create multiple payments for invoices or credit notes
PUT {{baseUrl}}/Payments?summarizeErrors=false
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
summarizeErrors | boolean | If false return 200 OK and mix of successfully created objects and any with validation errors |
Request Body
{"Payments"=>[{"Invoice"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Date"=>"<string>", "DueDate"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "InvoiceNumber"=>"<string>", "Reference"=>"<string>", "BrandingThemeID"=>"<uuid>", "Url"=>"<string>", "CurrencyCode"=>"<string>", "CurrencyRate"=>"<double>", "Status"=>"<string>", "SentToContact"=>"<boolean>", "ExpectedPaymentDate"=>"<string>", "PlannedPaymentDate"=>"<string>", "InvoiceID"=>"<uuid>", "RepeatingInvoiceID"=>"<uuid>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "HasErrors"=>"false", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Warnings"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "CreditNote"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "DueDate"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "FullyPaidOnDate"=>"<string>", "CreditNoteID"=>"<uuid>", "CreditNoteNumber"=>"<string>", "Reference"=>"<string>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Payments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "BrandingThemeID"=>"<uuid>", "StatusAttributeString"=>"<string>", "HasAttachments"=>"false", "HasErrors"=>"false", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "Prepayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "PrepaymentID"=>"<uuid>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "Overpayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "OverpaymentID"=>"<uuid>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Payments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "InvoiceNumber"=>"<string>", "CreditNoteNumber"=>"<string>", "Account"=>{"Code"=>"<string>", "Name"=>"<string>", "AccountID"=>"<uuid>", "Type"=>"<string>", "BankAccountNumber"=>"<string>", "Status"=>"<string>", "Description"=>"<string>", "BankAccountType"=>"<string>", "CurrencyCode"=>"<string>", "TaxType"=>"<string>", "EnablePaymentsToAccount"=>"<boolean>", "ShowInExpenseClaims"=>"<boolean>", "ReportingCode"=>"<string>", "AddToWatchlist"=>"<boolean>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, "Code"=>"<string>", "Date"=>"<string>", "CurrencyRate"=>"<double>", "Amount"=>"<double>", "Reference"=>"<string>", "IsReconciled"=>"<boolean>", "Status"=>"<string>", "PaymentID"=>"<uuid>", "BankAccountNumber"=>"<string>", "Particulars"=>"<string>", "Details"=>"<string>", "HasAccount"=>"false", "HasValidationErrors"=>"false", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, {"Invoice"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Date"=>"<string>", "DueDate"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "InvoiceNumber"=>"<string>", "Reference"=>"<string>", "BrandingThemeID"=>"<uuid>", "Url"=>"<string>", "CurrencyCode"=>"<string>", "CurrencyRate"=>"<double>", "Status"=>"<string>", "SentToContact"=>"<boolean>", "ExpectedPaymentDate"=>"<string>", "PlannedPaymentDate"=>"<string>", "InvoiceID"=>"<uuid>", "RepeatingInvoiceID"=>"<uuid>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "HasErrors"=>"false", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Warnings"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "CreditNote"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "DueDate"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "FullyPaidOnDate"=>"<string>", "CreditNoteID"=>"<uuid>", "CreditNoteNumber"=>"<string>", "Reference"=>"<string>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Payments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "BrandingThemeID"=>"<uuid>", "StatusAttributeString"=>"<string>", "HasAttachments"=>"false", "HasErrors"=>"false", "ValidationErrors"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "Prepayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "PrepaymentID"=>"<uuid>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "Overpayment"=>{"Type"=>"<string>", "Contact"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Date"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "LineItems"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "CurrencyCode"=>"<string>", "OverpaymentID"=>"<uuid>", "CurrencyRate"=>"<double>", "RemainingCredit"=>"<double>", "Allocations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "AppliedAmount"=>"<double>", "Payments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "Attachments"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "InvoiceNumber"=>"<string>", "CreditNoteNumber"=>"<string>", "Account"=>{"Code"=>"<string>", "Name"=>"<string>", "AccountID"=>"<uuid>", "Type"=>"<string>", "BankAccountNumber"=>"<string>", "Status"=>"<string>", "Description"=>"<string>", "BankAccountType"=>"<string>", "CurrencyCode"=>"<string>", "TaxType"=>"<string>", "EnablePaymentsToAccount"=>"<boolean>", "ShowInExpenseClaims"=>"<boolean>", "ReportingCode"=>"<string>", "AddToWatchlist"=>"<boolean>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, "Code"=>"<string>", "Date"=>"<string>", "CurrencyRate"=>"<double>", "Amount"=>"<double>", "Reference"=>"<string>", "IsReconciled"=>"<boolean>", "Status"=>"<string>", "PaymentID"=>"<uuid>", "BankAccountNumber"=>"<string>", "Particulars"=>"<string>", "Details"=>"<string>", "HasAccount"=>"false", "HasValidationErrors"=>"false", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
xero-tenant-id | string | (Required) Xero identifier for Tenant | |
Content-Type | string |
RESPONSES
status: OK
{"Id":"83b5715a-6a77-4c16-b5b8-2da08b5fde44","Status":"OK","ProviderName":"Provider Name Example","DateTimeUTC":"/Date(1552432238716)/","Payments":[{"PaymentID":"61ed71fc-01bf-4eb8-8419-8a18789ff45f","Date":"/Date(1552348800000+0000)/","BankAmount":1.0,"Amount":1.0,"CurrencyRate":1.0,"PaymentType":"ACCRECPAYMENT","Status":"AUTHORISED","UpdatedDateUTC":"/Date(1552432238623+0000)/","HasAccount":true,"IsReconciled":false,"Account":{"AccountID":"5690f1e8-1d02-4893-90c2-ee1a69eff942","Code":"970","Name":"Owner A Funds Introduced"},"Invoice":{"Type":"ACCREC","InvoiceID":"c7c37b83-ac95-45ea-88ba-8ad83a5f22fe","InvoiceNumber":"INV-0004","Reference":"","Prepayments":[],"Overpayments":[],"AmountDue":229.0,"AmountPaid":1.0,"SentToContact":false,"CurrencyRate":1.0,"HasErrors":false,"IsDiscounted":false,"Contact":{"ContactID":"a3675fc4-f8dd-4f03-ba5b-f1870566bcd7","Name":"Barney Rubble-83203","ContactPersons":[],"HasValidationErrors":false},"DateString":"2018-10-10T00:00:00","Date":"/Date(1539129600000+0000)/","DueDateString":"2018-10-18T00:00:00","DueDate":"/Date(1539820800000+0000)/","Status":"AUTHORISED","LineAmountTypes":"Exclusive","LineItems":[{"Description":"boo","UnitAmount":200.0,"TaxType":"OUTPUT2","TaxAmount":30.0,"LineAmount":200.0,"AccountCode":"200","Tracking":[],"Quantity":1.0,"LineItemID":"173dfdb9-43b5-4bd2-ae25-9419e662a3a7","ValidationErrors":[]}],"SubTotal":200.0,"TotalTax":30.0,"Total":230.0,"UpdatedDateUTC":"/Date(1552432238623+0000)/","CurrencyCode":"NZD"},"HasValidationErrors":true,"ValidationErrors":[{"Message":"Payment amount exceeds the amount outstanding on this document"}]}]}