clientPayments element

Type: clientPayments
Namespace: http://api.crunch.co.uk/rest
XML Schema: api.xsd

A wrapper for a collection of client payment elements

Example XML

<?xml version="1.0" encoding="UTF-8"?> <clientPayments xmlns="http://api.crunch.co.uk/rest" count="..." firstResult="..." resultsPerPage="..."> <clientPayment clientPaymentId="..." currency="..." resourceUrl="..."> <paymentDate>...</paymentDate> <amount>...</amount> <paymentMethod>...</paymentMethod> <bankAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</bankAccount> <creditCard accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</creditCard> <director directorId="..." directorEmail="...">...</director> <paymentProcessingAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</paymentProcessingAccount> <client clientId="..." resourceUrl="..." defaultCurrency="..."> <name>...</name> <telephone>...</telephone> <fax>...</fax> <email>...</email> <website>...</website> <companyRegistrationNumber>...</companyRegistrationNumber> <vatRegistrationNumber>...</vatRegistrationNumber> <paymentTermsDays>...</paymentTermsDays> <contacts count="..."> <contact includeInEmail="..." primaryContact="..."> <name>...</name> <email>...</email> <telephone>...</telephone> <role>...</role> </contact> <contact includeInEmail="..." primaryContact="..."> <!--...--> </contact> <!--...more "contact" elements...--> </contacts> <billingAddress> <line1>...</line1> <line2>...</line2> <line3>...</line3> <line4>...</line4> <postcode>...</postcode> <country>...</country> </billingAddress> <shipToAddress> <line1>...</line1> <line2>...</line2> <line3>...</line3> <line4>...</line4> <postcode>...</postcode> <country>...</country> </shipToAddress> <note>...</note> </client> <processingExpense expenseId="..." resourceUrl="..." amount="..."> <expenseDetails> <supplier supplierId="..." defaultExpenseType="..." resourceUrl="..." unknownSupplier="..."> <name>...</name> <contactName>...</contactName> <email>...</email> <website>...</website> <telephone>...</telephone> <fax>...</fax> </supplier> <supplierReference>...</supplierReference> <postingDate>...</postingDate> <rechargeable> <customerId>...</customerId> <customerName>...</customerName> </rechargeable> </expenseDetails> <expenseLineItems count="..." lineItemGrossTotal="..."> <expenseLineItem> <expenseType>...</expenseType> <benefitingDirector directorId="..." directorEmail="...">...</benefitingDirector> <lineItemDescription>...</lineItemDescription> <lineItemAmount currencyCode="..."> <netAmount>...</netAmount> <grossAmount>...</grossAmount> <vatAmount>...</vatAmount> <vatRate>...</vatRate> </lineItemAmount> </expenseLineItem> <expenseLineItem> <!--...--> </expenseLineItem> <!--...more "expenseLineItem" elements...--> </expenseLineItems> <paymentDetails count="..."> <payment> <paymentDate>...</paymentDate> <amount>...</amount> <paymentMethod>...</paymentMethod> <bankAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</bankAccount> <creditCard accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</creditCard> <director directorId="..." directorEmail="...">...</director> <paymentProcessingAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</paymentProcessingAccount> </payment> <payment> <!--...--> </payment> <!--...more "payment" elements...--> </paymentDetails> <receipts count="..."> <receipt fileName="..." contentType="...">...</receipt> <receipt fileName="..." contentType="...">...</receipt> <!--...more "receipt" elements...--> </receipts> <note>...</note> </processingExpense> <salesInvoices count="..." firstResult="..." resultsPerPage="..."> <salesInvoice salesInvoiceId="..." resourceUrl="..." currency="..." allocatedAmount="..."> <salesInvoiceDetails> <client clientId="..." resourceUrl="..." defaultCurrency="..."> <name>...</name> <telephone>...</telephone> <fax>...</fax> <email>...</email> <website>...</website> <companyRegistrationNumber>...</companyRegistrationNumber> <vatRegistrationNumber>...</vatRegistrationNumber> <paymentTermsDays>...</paymentTermsDays> <contacts count="..."> <contact includeInEmail="..." primaryContact="..."> <name>...</name> <email>...</email> <telephone>...</telephone> <role>...</role> </contact> <contact includeInEmail="..." primaryContact="..."> <!--...--> </contact> <!--...more "contact" elements...--> </contacts> <billingAddress> <line1>...</line1> <line2>...</line2> <line3>...</line3> <line4>...</line4> <postcode>...</postcode> <country>...</country> </billingAddress> <shipToAddress> <line1>...</line1> <line2>...</line2> <line3>...</line3> <line4>...</line4> <postcode>...</postcode> <country>...</country> </shipToAddress> <note>...</note> </client> <clientReference>...</clientReference> <lastModifiedDate>...</lastModifiedDate> <issuedDate>...</issuedDate> <issueDateType>...</issueDateType> <dueDate>...</dueDate> <settledDate>...</settledDate> <state>...</state> <invoiceNumber>...</invoiceNumber> <paymentTermsDays>...</paymentTermsDays> <initialPaymentReminderDays>...</initialPaymentReminderDays> <repetitivePaymentReminderDays>...</repetitivePaymentReminderDays> <emailReminderToCustomer>...</emailReminderToCustomer> <purchaseOrder>...</purchaseOrder> <euMemberStateCountryCode>...</euMemberStateCountryCode> <bankAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</bankAccount> <paymentProcessingAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</paymentProcessingAccount> </salesInvoiceDetails> <salesInvoiceLineItems count="..."> <salesInvoiceLineItem> <lineItemDescription>...</lineItemDescription> <quantity>...</quantity> <rate>...</rate> <lineItemAmount currencyCode="..."> <netAmount>...</netAmount> <grossAmount>...</grossAmount> <vatAmount>...</vatAmount> <vatRate>...</vatRate> </lineItemAmount> <vatType>...</vatType> </salesInvoiceLineItem> <salesInvoiceLineItem> <!--...--> </salesInvoiceLineItem> <!--...more "salesInvoiceLineItem" elements...--> </salesInvoiceLineItems> <clientPayments> <!--...--> </clientPayments> <note>...</note> <document fileName="..." contentType="...">...</document> </salesInvoice> <salesInvoice salesInvoiceId="..." resourceUrl="..." currency="..." allocatedAmount="..."> <!--...--> </salesInvoice> <!--...more "salesInvoice" elements...--> </salesInvoices> </clientPayment> <clientPayment clientPaymentId="..." currency="..." resourceUrl="..."> <!--...--> </clientPayment> <!--...more "clientPayment" elements...--> </clientPayments>

Example JSON

{ "clientPayment" : [ { "clientPaymentId" : ..., "currency" : "...", "resourceUrl" : "...", "client" : { "clientId" : ..., "resourceUrl" : "...", "defaultCurrency" : "...", "name" : "...", "telephone" : "...", "fax" : "...", "email" : "...", "website" : "...", "companyRegistrationNumber" : "...", "vatRegistrationNumber" : "...", "paymentTermsDays" : ..., "contacts" : { "count" : ..., "contact" : [ { "includeInEmail" : false, "primaryContact" : false, "name" : "...", "email" : "...", "telephone" : "...", "role" : "..." }, ... ] }, "billingAddress" : { "line1" : "...", "line2" : "...", "line3" : "...", "line4" : "...", "postcode" : "...", "country" : "..." }, "shipToAddress" : { "line1" : "...", "line2" : "...", "line3" : "...", "line4" : "...", "postcode" : "...", "country" : "..." }, "note" : "..." }, "processingExpense" : { "expenseId" : ..., "resourceUrl" : "...", "amount" : ..., "expenseDetails" : { "supplier" : { "supplierId" : ..., "defaultExpenseType" : "...", "resourceUrl" : "...", "unknownSupplier" : false, "name" : "...", "contactName" : "...", "email" : "...", "website" : "...", "telephone" : "...", "fax" : "..." }, "supplierReference" : "...", "postingDate" : "...", "rechargeable" : { "customerId" : ..., "customerName" : "..." } }, "expenseLineItems" : { "count" : ..., "lineItemGrossTotal" : ..., "expenseLineItem" : [ { "expenseType" : "...", "benefitingDirector" : { "directorId" : ..., "directorEmail" : "...", "value" : "..." }, "lineItemDescription" : "...", "lineItemAmount" : { "currencyCode" : "...", "netAmount" : ..., "grossAmount" : ..., "vatAmount" : ..., "vatRate" : ... } }, ... ] }, "paymentDetails" : { "count" : ..., "payment" : [ { "paymentDate" : "...", "amount" : ..., "paymentMethod" : "...", "bankAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "creditCard" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "director" : { "directorId" : ..., "directorEmail" : "...", "value" : "..." }, "paymentProcessingAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." } }, ... ] }, "receipts" : { "count" : ..., "receipt" : [ { "fileName" : "...", "contentType" : "...", "value" : "..." }, ... ] }, "note" : "..." }, "salesInvoices" : { "salesInvoice" : [ { "salesInvoiceId" : ..., "resourceUrl" : "...", "currency" : "...", "allocatedAmount" : ..., "salesInvoiceDetails" : { "client" : { "clientId" : ..., "resourceUrl" : "...", "defaultCurrency" : "...", "name" : "...", "telephone" : "...", "fax" : "...", "email" : "...", "website" : "...", "companyRegistrationNumber" : "...", "vatRegistrationNumber" : "...", "paymentTermsDays" : ..., "contacts" : { "count" : ..., "contact" : [ { "includeInEmail" : false, "primaryContact" : false, "name" : "...", "email" : "...", "telephone" : "...", "role" : "..." }, ... ] }, "billingAddress" : { "line1" : "...", "line2" : "...", "line3" : "...", "line4" : "...", "postcode" : "...", "country" : "..." }, "shipToAddress" : { "line1" : "...", "line2" : "...", "line3" : "...", "line4" : "...", "postcode" : "...", "country" : "..." }, "note" : "..." }, "clientReference" : "...", "lastModifiedDate" : "...", "issuedDate" : "...", "issueDateType" : "...", "dueDate" : "...", "settledDate" : "...", "state" : "...", "invoiceNumber" : "...", "paymentTermsDays" : ..., "initialPaymentReminderDays" : ..., "repetitivePaymentReminderDays" : ..., "emailReminderToCustomer" : false, "purchaseOrder" : "...", "euMemberStateCountryCode" : "...", "bankAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "paymentProcessingAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." } }, "salesInvoiceLineItems" : { "count" : ..., "salesInvoiceLineItem" : [ { "lineItemDescription" : "...", "quantity" : ..., "rate" : ..., "lineItemAmount" : { "currencyCode" : "...", "netAmount" : ..., "grossAmount" : ..., "vatAmount" : ..., "vatRate" : ... }, "vatType" : "..." }, ... ] }, "clientPayments" : { "..." : ..., "count" : ..., "firstResult" : ..., "resultsPerPage" : ... }, "note" : "...", "document" : { "fileName" : "...", "contentType" : "...", "value" : "..." } }, ... ], "count" : ..., "firstResult" : ..., "resultsPerPage" : ... }, "paymentDate" : "...", "amount" : ..., "paymentMethod" : "...", "bankAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "creditCard" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "director" : { "directorId" : ..., "directorEmail" : "...", "value" : "..." }, "paymentProcessingAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." } }, ... ], "count" : ..., "firstResult" : ..., "resultsPerPage" : ... }