Website logo

Retrieve the details of a settlement into your bank account

Returns Pay Now ledger entries for a settlement into the authenticated user's bank account.

URL: https://api.trademe.co.nz/v1/MyTradeMe/PayNowSettlement/{batchId}.{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

batchId Integer (required)

The ID of the settlement. This can be retrieved from the Pay Now ledger API.

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

Query String parameters

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>

Settlement details 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.

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).

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>
      <ListingId>123</ListingId>
      <OfferId>123</OfferId>
      <PurchaseId>123</PurchaseId>
      <ListingTitle>ABC</ListingTitle>
      <Fee>123.0</Fee>
      <SettlementId>123</SettlementId>
    </PayNowLedgerItem>
    <PayNowLedgerItem>
      <Type>Sale</Type>
      <Date>2018-01-01T00:00:00Z</Date>
      <Description>ABC</Description>
      <Credit>123.0</Credit>
      <Debit>123.0</Debit>
      <ListingId>123</ListingId>
      <OfferId>123</OfferId>
      <PurchaseId>123</PurchaseId>
      <ListingTitle>ABC</ListingTitle>
      <Fee>123.0</Fee>
      <SettlementId>123</SettlementId>
    </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,
      "ListingId": 123,
      "OfferId": 123,
      "PurchaseId": 123,
      "ListingTitle": "ABC",
      "Fee": 123.0,
      "SettlementId": 123
    },
    {
      "Type": 0,
      "Date": "\/Date(1514764800)\/",
      "Description": "ABC",
      "Credit": 123.0,
      "Debit": 123.0,
      "ListingId": 123,
      "OfferId": 123,
      "PurchaseId": 123,
      "ListingTitle": "ABC",
      "Fee": 123.0,
      "SettlementId": 123
    }
  ]
}