Allows you to create a single payment for invoices or credit notes

POST {{baseUrl}}/Payments

Request Body

{"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

KeyDatatypeRequiredDescription
xero-tenant-idstring(Required) Xero identifier for Tenant
Content-Typestring

RESPONSES

status: OK

{&quot;Id&quot;:&quot;83b5715a-6a77-4c16-b5b8-2da08b5fde44&quot;,&quot;Status&quot;:&quot;OK&quot;,&quot;ProviderName&quot;:&quot;Provider Name Example&quot;,&quot;DateTimeUTC&quot;:&quot;/Date(1552432238716)/&quot;,&quot;Payments&quot;:[{&quot;PaymentID&quot;:&quot;61ed71fc-01bf-4eb8-8419-8a18789ff45f&quot;,&quot;Date&quot;:&quot;/Date(1552348800000+0000)/&quot;,&quot;BankAmount&quot;:1.0,&quot;Amount&quot;:1.0,&quot;CurrencyRate&quot;:1.0,&quot;PaymentType&quot;:&quot;ACCRECPAYMENT&quot;,&quot;Status&quot;:&quot;AUTHORISED&quot;,&quot;UpdatedDateUTC&quot;:&quot;/Date(1552432238623+0000)/&quot;,&quot;HasAccount&quot;:true,&quot;IsReconciled&quot;:false,&quot;Account&quot;:{&quot;AccountID&quot;:&quot;5690f1e8-1d02-4893-90c2-ee1a69eff942&quot;,&quot;Code&quot;:&quot;970&quot;,&quot;Name&quot;:&quot;Owner A Funds Introduced&quot;},&quot;Invoice&quot;:{&quot;Type&quot;:&quot;ACCREC&quot;,&quot;InvoiceID&quot;:&quot;c7c37b83-ac95-45ea-88ba-8ad83a5f22fe&quot;,&quot;InvoiceNumber&quot;:&quot;INV-0004&quot;,&quot;Reference&quot;:&quot;&quot;,&quot;Prepayments&quot;:[],&quot;Overpayments&quot;:[],&quot;AmountDue&quot;:229.0,&quot;AmountPaid&quot;:1.0,&quot;SentToContact&quot;:false,&quot;CurrencyRate&quot;:1.0,&quot;HasErrors&quot;:false,&quot;IsDiscounted&quot;:false,&quot;Contact&quot;:{&quot;ContactID&quot;:&quot;a3675fc4-f8dd-4f03-ba5b-f1870566bcd7&quot;,&quot;Name&quot;:&quot;Barney Rubble-83203&quot;,&quot;ContactPersons&quot;:[],&quot;HasValidationErrors&quot;:false},&quot;DateString&quot;:&quot;2018-10-10T00:00:00&quot;,&quot;Date&quot;:&quot;/Date(1539129600000+0000)/&quot;,&quot;DueDateString&quot;:&quot;2018-10-18T00:00:00&quot;,&quot;DueDate&quot;:&quot;/Date(1539820800000+0000)/&quot;,&quot;Status&quot;:&quot;AUTHORISED&quot;,&quot;LineAmountTypes&quot;:&quot;Exclusive&quot;,&quot;LineItems&quot;:[{&quot;Description&quot;:&quot;boo&quot;,&quot;UnitAmount&quot;:200.0,&quot;TaxType&quot;:&quot;OUTPUT2&quot;,&quot;TaxAmount&quot;:30.0,&quot;LineAmount&quot;:200.0,&quot;AccountCode&quot;:&quot;200&quot;,&quot;Tracking&quot;:[],&quot;Quantity&quot;:1.0,&quot;LineItemID&quot;:&quot;173dfdb9-43b5-4bd2-ae25-9419e662a3a7&quot;,&quot;ValidationErrors&quot;:[]}],&quot;SubTotal&quot;:200.0,&quot;TotalTax&quot;:30.0,&quot;Total&quot;:230.0,&quot;UpdatedDateUTC&quot;:&quot;/Date(1552432238623+0000)/&quot;,&quot;CurrencyCode&quot;:&quot;NZD&quot;},&quot;HasValidationErrors&quot;:true,&quot;ValidationErrors&quot;:[{&quot;Message&quot;:&quot;Payment amount exceeds the amount outstanding on this document&quot;}]}]}