Global API
...
Request
Payment
Read
1min
you can read all payments from xero without passing any filters however, to retrieve specific records based on any filter conditions, you can add the following filters as "queryparameters" as shown in the below example param name type description order string order by any element returned page string up to 100 purchase orders will be returned per call, with line items shown for each, when the page parameter is used e g page=1 where string filter by filter using the where parameter we recommend you limit filtering to the optimised elements https //developer xero com/documentation/api/accounting/payments#get payments only order status authorised, deleted request // create a map to store all the data of a payment map\<string, object> paymentmap = new map\<string, object>(); paymentmap put('where', 'reference="test payment"'); // initializing the request data to be passed map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readpayment'); reqobj put('queryparameters', paymentmap); //required, if xero multi org is enabled in breadwinner reqobj put('xeroorgid', '!aa00tm'); // placing a request to breadwinner global api map\<string, object> respmap = bread winner breadwinnerxeroapi call(reqobj); system debug(respmap); response { action=readpayment, responsejson={ "statuscode" 200 "payments" \[ { "updateddateutc" "/date(1640247312807+0000)/", "status" "authorised", "salesforcerecordid"\ null, "reference" "test payment", "paymenttype" "accrecpayment", "paymentid" "731c9d1e 4669 42d4 b369 508a293d1429", "isreconciled"\ false, "invoice" { "type" "accrec", "payments" \[ ], "lineitems" \[ ], "isdiscounted"\ false, "invoicenumber" "inv 0007", "invoiceid" "93151e60 3cad 4384 a2ed 99935444a218", "haserrors"\ false, "currencycode" "inr", "creditnotes" \[ ], "contact" { "name" "breadwinner inc1", "contactstatus"\ null, "contactid" "f3044b57 fa66 4a8c 9bfe 7a4638764adf" }, "amountpaid"\ null, "amountdue"\ null }, "hasaccount"\ true, "datevariable" "/date(1640217600000+0000)/", "currencyrate" 1 0000000000, "creditnote"\ null, "batchpaymentid"\ null, "batchpayment"\ null, "bankamount" 50 00, "amount" 50 00, "account" { "code" "880", "accountid" "72bae77e 149a 4d3b 8dac 06bfca1dd3e4" } } ], "errors" \[ ] }, timestamp=1636638418069, validrequest=true, version=1 0 }