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 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
ListingId Integer ListingId
OfferId Integer OfferId
PurchaseId Integer PurchaseId
ListingTitle String or null ListingTitle
Fee Number Fee
SettlementId Integer SettlementId

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