# Create a payment record against a specified collection of sales invoices of the same organisation. Creates a payment record against a specified collection of sales invoices. The payment record will be reconciled against any outstanding invoices. Where necessary invoices will be auto posted. If there is insufficient outstanding on invoices, the payment is rejected. NOTE: The invoices should all belong to the same organisation and they should use the same finance account. Endpoint: POST /api/v3/payments/createPaymentsForSalesInvoices Version: 3.0.12 Security: X-Auth-Token ## Query parameters: - `user` (object, required) ## Request fields (application/json): - `accountId` (integer, required) The finance account ID. - `salesInvoiceIds` (array, required) List of sales invoice IDs which require payment. All sales invoices must have the same finance account as the one identified by the finance account ID.Also, all sales invoices must belong to the same organisation - `paymentReference` (string, required) Payment reference for the payment to be created. - `externalReference` (string) External system receipt reference, if exported from an external system, this is the external system unique identifier for the transaction. - `amount` (number, required) The payment amount - `paymentType` (string, required) The payment type, must be BANK_PAYMENT, CARD_PAYMENT or CASH_PAYMENT - `lastFour` (string) The last four digits of the card number (if applicable - required if payment type is CARD_PAYMENT). - `cardType` (string) The card type (if applicable - required if card payment). Should one of the following: VISA_CREDIT, VISA_DEBIT, MASTERCARD, MASTERCARD_DEBIT, DELTA, MAESTRO, VISA_ELECTRON, AMERICAN_EXPRESS, DINERS_CLUB, JCB, PAYPAL ## Response 200 fields (application/json): - `content` (array) - `content.id` (integer) Unique identifier of the financial record - `content.financialType` (string) Type of the financial record Enum: "SALES_INVOICE", "SALES_CREDIT", "SALES_RECEIPT", "SALES_REFUND", "SALES_ACCOUNT", "PURCHASE_INVOICE", "PURCHASE_CREDIT", "PURCHASE_RECEIPT", "PURCHASE_REFUND", "PURCHASE_ACCOUNT", "T_SALES_INVOICE", "T_SALES_CREDIT", "T_SALES_RECEIPT", "T_SALES_REFUND", "T_PURCHASE_INVOICE", "T_PURCHASE_CREDIT", "T_PURCHASE_RECEIPT", "T_PURCHASE_REFUND", "ACCOUNT_DEBIT", "T_ACCOUNT_CREDIT", "BANK_TRANSFER_CREDIT", "BANK_TRANSFER_DEBIT" - `content.creditCardType` (string) Type of the credit card Enum: "VISA_CREDIT", "VISA_DEBIT", "MASTERCARD", "MASTERCARD_DEBIT", "DELTA", "MAESTRO", "VISA_ELECTRON", "AMERICAN_EXPRESS", "DINERS_CLUB", "JCB", "PAYPAL", "VISA" - `content.dateCreated` (string) Date when the financial record was created - `content.description` (string) Description of the financial record - `content.net` (number) Net amount of the financial record - `content.baseNet` (number) Base net amount of the financial record - `content.reportingNet` (number) Reporting net amount of the financial record - `content.vat` (number) VAT amount of the financial record - `content.baseVat` (number) Base VAT amount of the financial record - `content.reportingVat` (number) Reporting VAT amount of the financial record - `content.gross` (number) Gross amount of the financial record - `content.baseGross` (number) Base gross amount of the financial record - `content.reportingGross` (number) Reporting gross amount of the financial record - `content.amountPaid` (number) Amount paid for the financial record - `content.paymentType` (string) Payment type of the financial record Enum: "BANK_PAYMENT", "CARD_PAYMENT", "CREDIT_CARD_TERMINAL", "CASH_PAYMENT", "OFFLINE_PAYMENT", "ADJUSTMENT" - `content.paymentReference` (string) Payment reference of the financial record - `content.nominalCode` (object) - `content.nominalCode.id` (integer) The unique identifier of the nominal code - `content.nominalCode.code` (string) The code of the nominal code - `content.nominalCode.description` (string) The description of the nominal code - `content.nominalCode.type` (string) The type of the nominal code Enum: "BANK", "CARD", "OWNER_LIABILITY", "PURCHASE", "SALES" - `content.nominalCode.currency` (object) The currency of the organisation - `content.nominalCode.currency.id` (integer) Unique identifier of the currency - `content.nominalCode.currency.name` (string) Name of the currency - `content.nominalCode.currency.description` (string) Description of the currency - `content.nominalCode.currency.symbol` (string) Symbol of the currency - `content.nominalCode.currency.exchangeRate` (number) Exchange rate of the currency - `content.nominalCode.currency.baseRate` (number) Base rate of the currency - `content.nominalCode.currency.unit` (string) Unit of the currency - `content.nominalCode.currency.autoUpdate` (boolean) Indicates if the currency is auto-updated - `content.nominalCode.currency.primaryCurrency` (boolean) Indicates if this is the primary currency - `content.nominalCode.currency.htmlSafeSymbol` (string) HTML safe symbol of the currency - `content.nominalCode.accountType` (string) The account type of the nominal code - `content.taxRate` (number) Tax rate of the financial record - `content.taxCode` (object) Tax code details - `content.taxCode.id` (integer) The unique identifier of the tax code Example: 1 - `content.taxCode.type` (string, required) Type of the tax code Enum: "SALES", "PURCHASE" - `content.taxCode.code` (string, required) Code of the tax code - `content.taxCode.name` (string, required) Name of the tax code - `content.taxCode.rate` (number, required) Rate of the tax code - `content.taxCode.xeroTaxType` (string) Xero tax type of the tax code - `content.taxCode.exportName` (string) Export name of the tax code - `content.financeAccount` (object) Finance account details - `content.financeAccount.id` (integer) Unique identifier of the finance account - `content.financeAccount.accountCode` (string) Account code of the finance account - `content.financeAccount.contact` (object) - `content.financeAccount.contact.id` (integer) Unique identifier of the contact - `content.financeAccount.contact.firstName` (string) First name of the contact - `content.financeAccount.contact.lastName` (string) Last name of the contact - `content.financeAccount.company` (object) Company summary associated with the finance account - `content.financeAccount.company.id` (integer) Unique identifier of the company - `content.financeAccount.company.companyName` (string) Name of the company - `content.financeAccount.externalId` (string) External identifier of the finance account - `content.financeAccount.exportedDate` (string) Date when the finance account was exported - `content.financeAccount.exportStatus` (string) Export status of the finance account Enum: "SKIPPED", "CREATED", "PENDING", "SENT", "EXPORTED", "FAILED", "IMPORTED" - `content.salesInvoiceItem` (object) - `content.salesInvoiceItem.id` (integer) ID of the sales invoice item - `content.salesInvoiceItem.uuid` (string) UUID of the sales invoice item - `content.salesInvoiceItem.salesInvoice` (object) Summary of the sales invoice - `content.salesInvoiceItem.salesInvoice.id` (integer) The unique identifier of the sales invoice Example: 1 - `content.salesInvoiceItem.salesInvoice.salesInvoiceNumber` (integer) Ordering for the sales ledger Example: 1001 - `content.salesInvoiceItem.salesInvoice.type` (string, required) Type of the sales invoice Enum: "SALES_INVOICE", "SALES_CREDIT" - `content.salesInvoiceItem.salesInvoice.invoiceDate` (string, required) Date of the invoice Example: "2023-10-01" - `content.salesInvoiceItem.salesInvoice.dueDate` (string, required) Due date of the invoice Example: "2023-10-15" - `content.salesInvoiceItem.description` (string) Description of the sales invoice item - `content.salesInvoiceItem.comment1` (string) First comment - `content.salesInvoiceItem.comment2` (string) Second comment - `content.salesInvoiceItem.currency` (object) Base currency details of the invoice - `content.salesInvoiceItem.baseCurrency` (object) Base currency details of the invoice - `content.salesInvoiceItem.type` (string) Type of the invoice Enum: "SALES_INVOICE", "SALES_CREDIT" - `content.salesInvoiceItem.unitPrice` (number) Unit price - `content.salesInvoiceItem.baseUnitPrice` (number) Base unit price - `content.salesInvoiceItem.reportingUnitPrice` (number) Reporting unit price - `content.salesInvoiceItem.quantity` (number) Quantity - `content.salesInvoiceItem.gross` (number) Gross amount - `content.salesInvoiceItem.baseGross` (number) Base gross amount - `content.salesInvoiceItem.reportingGross` (number) Reporting gross amount - `content.salesInvoiceItem.net` (number) Net amount - `content.salesInvoiceItem.baseNet` (number) Base net amount - `content.salesInvoiceItem.reportingNet` (number) Reporting net amount - `content.salesInvoiceItem.tax` (number) Tax amount - `content.salesInvoiceItem.baseTax` (number) Base tax amount - `content.salesInvoiceItem.reportingTax` (number) Reporting tax amount - `content.salesInvoiceItem.taxRate` (number) Tax rate - `content.salesInvoiceItem.chargeFrom` (string) Charge start date - `content.salesInvoiceItem.chargeTo` (string) Charge end date - `content.salesInvoiceItem.dueDate` (string) Due date - `content.salesInvoiceItem.invoiceDate` (string) Invoice date - `content.salesInvoiceItem.product` (object) Accommodation product summary - `content.salesInvoiceItem.product.id` (integer) Unique identifier of the product Example: 1 - `content.salesInvoiceItem.product.productCode` (string) Code of the product Example: "PROD-001" - `content.salesInvoiceItem.product.name` (string) Name of the product Example: "Product 1" - `content.salesInvoiceItem.product.invoiceWrapGroup` (string) Wrapping group of the product Example: "Rentals" - `content.salesInvoiceItem.ourReference` (string) Our reference - `content.salesInvoiceItem.status` (string) Status of the invoice item Enum: "DRAFT", "VOID", "POSTED" - `content.salesInvoiceItem.roomStay` (object) Extension of original room stay summary - `content.salesInvoiceItem.roomStay.id` (integer) Unique identifier of the room stay - `content.salesInvoiceItem.roomStay.startDate` (string) Start date of the room stay - `content.salesInvoiceItem.roomStay.endDate` (string) End date of the room stay - `content.salesInvoiceItem.roomStay.roomStayStatus` (string) Status of the room stay Enum: "ENQUIRY", "QUOTED", "PENDING", "MEDIATION_REQUIRED", "CONFIRMED", "CHECKED_IN", "CHECKED_OUT", "COMPLETE", "CANCELLED", "LOST" - `content.salesInvoiceItem.roomStay.netAmount` (number) Net amount for the room stay - `content.salesInvoiceItem.roomStay.vatAmount` (number) VAT amount for the room stay - `content.salesInvoiceItem.roomStay.numberOfAdults` (integer) Number of adults in the room stay - `content.salesInvoiceItem.roomStay.numberOfChildren` (integer) Number of children in the room stay - `content.salesInvoiceItem.roomStay.numberOfInfants` (integer) Number of infants in the room stay - `content.salesInvoiceItem.unit` (object) Summary of the Unit associated with the Unit Access Group - `content.salesInvoiceItem.unit.id` (integer) Unique identifier of the unit Example: 1 - `content.salesInvoiceItem.unit.name` (string) Name of the unit Example: "Apartment 101" - `content.salesInvoiceItem.unitPriceIncludesTax` (boolean) Indicates if unit price includes tax - `content.salesInvoiceItem.amountPaid` (number) Amount paid - `content.unallocated` (number) Unallocated amount of the financial record - `content.cardLastFour` (string) Last four digits of the credit card - `content.xeroIdentifier` (object) External identifier for Xero integration - `content.xeroIdentifier.id` (integer, required) Identifier - `content.xeroIdentifier.organisationSettings` (object) Organisation settings - `content.xeroIdentifier.organisationSettings.id` (integer) The unique identifier of the organisation settings Example: 1 - `content.xeroIdentifier.organisationSettings.name` (string) The name of the organisation Example: "Resharmonics" - `content.xeroIdentifier.organisationSettings.country` (object) Data Transfer Object representing a Country entity in the Property Management System (PMS). - `content.xeroIdentifier.organisationSettings.country.id` (integer) Unique identifier of the country - `content.xeroIdentifier.organisationSettings.country.name` (string, required) Name of the country - `content.xeroIdentifier.organisationSettings.country.sortOrder` (integer, required) Sort order of the country - `content.xeroIdentifier.organisationSettings.country.countryCodeAlpha2` (string, required) Alpha-2 country code - `content.xeroIdentifier.organisationSettings.country.countryCodeAlpha3` (string, required) Alpha-3 country code - `content.xeroIdentifier.organisationSettings.country.countryCodeNumeric` (string, required) Numeric country code - `content.xeroIdentifier.externalId` (string, required) External identifier - `content.xeroIdentifier.exportedDate` (string) Exported date - `content.xeroIdentifier.exportStatus` (string) Export status Enum: "CREATED", "EXPORTED", "FAILED", "IMPORTED", "PENDING", "SENT", "SKIPPED" - `content.exportedDate` (string) Date when the financial record was exported - `content.externalId` (string) External identifier of the financial record - `content.exportStatus` (string) Export status of the financial record Enum: "SKIPPED", "CREATED", "PENDING", "SENT", "EXPORTED", "FAILED", "IMPORTED" - `content.organisationSettingsId` (integer) Organisation settings ID associated with the financial record - `content.exchangeRate` (number) Exchange rate of the financial record - `content.baseExchangeRate` (number) Base exchange rate of the financial record - `content.baseCurrency` (object) The currency of the organisation - `content.costCentre` (object) Data Transfer Object representing a cost centre - `content.costCentre.id` (integer) Unique identifier of the cost centre - `content.costCentre.code` (string) Code of the cost centre - `content.costCentre.name` (string) Name of the cost centre - `content.costCentre.exportName` (string) Export name of the cost centre - `page` (object) - `page.size` (integer) - `page.totalElements` (integer) - `page.totalPages` (integer) - `page.number` (integer)