Website logo

Retrieve your Pay Now statement

Returns Pay Now ledger entries for the authenticated user. If the authenticated user isn't Pay Now enabled, returns an error message.

URL: https://api.trademe.co.nz/v1/mytrademe/paynowledger/{filter}.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: MyTradeMeRead: Read your membership & listing data.
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

filter String (required)

A filter on the results.

AllReturns all Pay Now ledger records
SalesReturn only sale payments
PaymentsToMyBankAccountReturn only ledger records with payments to the member's bank account.
RefundsReturns only Pay Now refunds.

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

Query String parameters

days Integer (optional)

The number of days worth of data to return. Defaults to 60. Not applicable when doing a settlement breakdown.

page Integer (optional)

The page number of the set of results to return, starting from 1. Defaults to 1.

rows Integer (optional)

The number of results per page; also the maximum number of results to return. Defaults to 50.

Returns

<PayNowLedger>

The PayNow ledger for the authenticated user.

TotalCount Integer TotalCount
Page Integer Page
PageSize Integer PageSize
List Collection of <PayNowLedgerItem> or null InnerList
Type Enumeration Type
Sale 0 Sale
PaymentToMemberBankAccount 1 PaymentToMemberBankAccount
FailedPaymentToMemberBankAccount 2 FailedPaymentToMemberBankAccount
Refund 3 Refund
Transfer 4 Transfer
Chargeback 5 Chargeback
Other 6 Other
Date DateTime Date
Description String or null Description
Credit Number Credit
Debit Number Debit
Balance Number or null Balance
ListingId Integer ListingId
OfferId Integer OfferId
PurchaseId Integer PurchaseId
ListingTitle String or null ListingTitle
Fee Number Fee
SettlementId Integer SettlementId
LedgerId Integer LedgerId
TotalNzGst Number or null TotalNzGst

Example XML Response (switch to JSON)

<PayNowLedger xmlns="http://api.trademe.co.nz/v1">
  <TotalCount>123</TotalCount>
  <Page>123</Page>
  <PageSize>123</PageSize>
  <List>
    <PayNowLedgerItem>
      <Type>Sale</Type>
      <Date>2018-01-01T00:00:00Z</Date>
      <Description>ABC</Description>
      <Credit>123.0</Credit>
      <Debit>123.0</Debit>
      <Balance>123.0</Balance>
      <ListingId>123</ListingId>
      <OfferId>123</OfferId>
      <PurchaseId>123</PurchaseId>
      <ListingTitle>ABC</ListingTitle>
      <Fee>123.0</Fee>
      <SettlementId>123</SettlementId>
      <LedgerId>123</LedgerId>
      <TotalNzGst>123.0</TotalNzGst>
    </PayNowLedgerItem>
    <PayNowLedgerItem>
      <Type>Sale</Type>
      <Date>2018-01-01T00:00:00Z</Date>
      <Description>ABC</Description>
      <Credit>123.0</Credit>
      <Debit>123.0</Debit>
      <Balance>123.0</Balance>
      <ListingId>123</ListingId>
      <OfferId>123</OfferId>
      <PurchaseId>123</PurchaseId>
      <ListingTitle>ABC</ListingTitle>
      <Fee>123.0</Fee>
      <SettlementId>123</SettlementId>
      <LedgerId>123</LedgerId>
      <TotalNzGst>123.0</TotalNzGst>
    </PayNowLedgerItem>
  </List>
</PayNowLedger>

Example JSON Response (switch to XML)

{
  "TotalCount": 123,
  "Page": 123,
  "PageSize": 123,
  "List": [
    {
      "Type": 0,
      "Date": "\/Date(1514764800)\/",
      "Description": "ABC",
      "Credit": 123.0,
      "Debit": 123.0,
      "Balance": 123.0,
      "ListingId": 123,
      "OfferId": 123,
      "PurchaseId": 123,
      "ListingTitle": "ABC",
      "Fee": 123.0,
      "SettlementId": 123,
      "LedgerId": 123,
      "TotalNzGst": 123.0
    },
    {
      "Type": 0,
      "Date": "\/Date(1514764800)\/",
      "Description": "ABC",
      "Credit": 123.0,
      "Debit": 123.0,
      "Balance": 123.0,
      "ListingId": 123,
      "OfferId": 123,
      "PurchaseId": 123,
      "ListingTitle": "ABC",
      "Fee": 123.0,
      "SettlementId": 123,
      "LedgerId": 123,
      "TotalNzGst": 123.0
    }
  ]
}