-
Notifications
You must be signed in to change notification settings - Fork 0
Payments
Michael Newman edited this page Aug 7, 2017
·
3 revisions
See Payments at Xero Developer for more information.
see the home page for application setup.
$xero->payments()->get();
$paymentId = '682190f4-7362-11e7-8cf7-a6006ad3dba0';
$xero->payments()->get($paymentId);
$invoiceID = '3fd27838-68f5-11e7-907b-a6006ad3dba0';
$accountIdentifierType = null; //set to null to use AccountID or 'Code' to use Account Code
$accountIdentifier = 'c993a9f3-29aa-487f-8914-fcff5b0bb9ac';
$date = '2009-09-01';
$amount = 300;
$isReconciled = false //Optional parameter - deafult = false
$xero->payments()->applyOne(
$invoiceID,
$accountIdentifierType,
$accountIdentifier,
$date,
$amount,
$isReconciled
);
$xml = '
<Payments>
<Payment>
...
</Payment>
</Payments>
'
$xero->payments()->apply($xml);
$CreditNoteID = '7d879c22-4c68-4f25-a86c-bc85113039ad';
$accountIdentifierType = null; //set to null to use AccountID or 'Code' to use Account Code
$accountIdentifier = 'c993a9f3-29aa-487f-8914-fcff5b0bb9ac';
$date = '2009-09-01';
$amount = '220.50';
$reference = 'reference';
$xero->payments()->creditNoteRefund(
$CreditNoteID,
$accountIdentifierType,
$accountIdentifier,
$date,
$amount,
$reference
);
$prepaymentID = '2e4a381b-8651-4265-be1d-b71bd481ecd9';
$accountIdentifierType = null; //set to null to use AccountID or 'Code' to use Account Code
$accountIdentifier = 'c993a9f3-29aa-487f-8914-fcff5b0bb9ac';
$date = '2009-09-01';
$amount = '100.10';
$reference = 'reference';
$xero->payments()->prepaymentRefund(
$prepaymentID,
$accountIdentifierType,
$accountIdentifier,
$date,
$amount,
$reference
);
$overpaymentID = '66672531-e980-4521-b57a-bf66788668c7';
$accountIdentifierType = null; //set to null to use AccountID or 'Code' to use Account Code
$accountIdentifier = 'c993a9f3-29aa-487f-8914-fcff5b0bb9ac';
$date = '2009-09-01';
$amount = '20.15';
$reference = 'reference';
$xero->payments()->overpaymentRefund(
$overpaymentID,
$accountIdentifierType,
$accountIdentifier,
$date,
$amount,
$reference
);
$paymentId = '682190f4-7362-11e7-8cf7-a6006ad3dba0';
$xero->payments()->delete($paymentId);
$xero->payments()->modifiedAfter('2017-03-28T12:00:00')->get();
$xero->payments()->where('Amount>=100')->get();
//Ascending
$xero->payments()->order('Amount')->get();
//Descending
$xero->payments()->order('Amount', 'DESC')->get();
$xero->payments()->page(1)->get();
$xero->payments()->summarizeErrors()->allocate( ... );