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

The total number of results in the collection. Can be larger than the number of returned results.

Page Integer

The index of the current page of results (starts at 1).

PageSize Integer

The number of results in the current page.

List Collection of <PayNowLedgerItem> or null

A list of the results in the current page.

Type Enumeration

The transaction type.

Sale 0

A sale.

PaymentToMemberBankAccount 1

A payment to the member's bank account.

FailedPaymentToMemberBankAccount 2

A failed payment to the member's bank account.

Refund 3

A refund.

Transfer 4

Transfer from Trade Me account.

Chargeback 5

A bank chargeback.

Other 6

An unknown transaction.

Date DateTime

The transaction date and time. May be blank for

Description String or null

A description of the transaction.

Credit Number

The amount the member's Pay Now account was credited, in NZD, after fees have been accounted for. For example, the sale of an item generates a credit (but that same transaction will be a debit when it is paid into the member's account). This value is never negative.

Debit Number

The amount the member's Pay Now account was debited, in NZD. For example, a refund is a debit (but that same transaction will be a credit when it is in the settlement breakdown). This value is never negative.

Balance Number or null

The amount owed (unpaid) by Trade Me to the member, after the transaction, in NZD. Omitted for settlement transactions.

ListingId Long Integer

The ID of the associated listing, or 0 if there is no associated listing.

OfferId Integer

The ID of the associated fixed price offer. This value is omitted if the payment is not associated with a fixed price offer.

PurchaseId Integer

The purchase-specific ID (or auction sold id).

ListingTitle String or null

The title of the associated listing. This value is omitted if there is no associated listing.

Fee Number

The fee associated with the transaction. This value is omitted if there is no associated fee. This value is never negative.

SettlementId Integer

An ID that can be used to get the breakdown of a settlement. Only populated if the payment type is PaymentToMemberBankAccount (or FailedPaymentToMemberBankAccount).

LedgerId Integer

The unique identifier for this ledger item.

TotalNzGst Number or null

The total NZ GST collected on this sale by Trade Me to be forwarded to IRD

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
    }
  ]
}