Filters

The API offers filters to narrow the output of “list-transactions”. Filters are supported for all 6 transaction types, and any sub-type within the transactions.

Note

  • filters functionality only works for the 6 transaction types, not the rest of the API.

Examples

Below you will find a few common calls to our API.

Filter transactions by phone IMEI

Query:

curl 'https://partner.payjoy.com/v1/list-transactions.php?\
     key=<apikey>&starttime=<starttime>&endtime=<endtime>&\
     filter=device.imei:339977'

Result:

{"valid":true,
"transactions":[{
        "type":"finance",
        "time":1482000000,
        "amount":200,
        "currency":"USD",
        "financeOrder":{"id":4000004,"purchaseAmount":300,"financeAmount":200,
                "downPayment":100,"pricePreTax":300,
                "monthlyCost":18,"weeklyCost":4,"months":12},
        "merchant":{"id":4000002,"name":"API Test Merchant"},
        "salesClerk":{"id":4000003,"name":"Demo Clerk1"},
        "customer":{"id":4000005,"name":"API User","phoneNumber":"14084930580"},
        "device":{"phoneNumber":"15052111315",
                "simNumber":"12345678901774567891",
                "imei":"339977",
                "family":{"id":3,"name":"Galaxy S6"},
                "model":{"id":3,"makeModel":"SAMSUNG SM-G920P",
                        "name":"Samsung Galaxy S6 (Boost\/Sprint)"}}
}]}

Filter transactions by store

Query:

curl 'https://partner.payjoy.com/v1/list-transactions.php?\
     key=<apikey>&starttime=<starttime>&endtime=<endtime>&\
     filter=merchant.name:API+Test+Merchant'

Result:

{
  "valid":true,
  "transactions":[
  {
    "type":"finance",
    "time":1482100000,
    "amount":300,
    "currency":"USD",
    "financeOrder":{"id":4000009, "purchaseAmount":400, "financeAmount":300,
        "downPayment":100, "pricePreTax":400, "monthlyCost":35,
        "weeklyCost":9, "months":12},
    "merchant":{"id":4000002, "name":"API Test Merchant" },
    "salesClerk":{"id":4000003, "name":"Demo Clerk1"},
    "customer":{"id":4000005, "name":"API User", "phoneNumber":"14084930580"},
    "device":{
      "phoneNumber":"15052111316",
      "simNumber":"12345678901774567892",
      "imei":"339988",
      "family":{"id":3,"name":"Galaxy S6"},
      "model":{"id":3,
        "makeModel":"SAMSUNG SM-G920P",
        "name":"Samsung Galaxy S6 (Boost\/Sprint)"}
    }
  },
  {
    "type":"cash",
    "time":1487000002,
    "amount":-18,
    "currency":"USD",
    "payment":{"id":4000008,"timestamp":1487000002,"amount":18},
    "financeOrder":{"id":4000004},
    "merchant":{"id":4000002,"name":"API Test Merchant"},
    "salesClerk":{"id":4000003,"name":"Demo Clerk1"},
    "customer":{"id":4000005,"name":"API User","phoneNumber":"14084930580"}
  },
  {
    "type":"commission",
    "time":1487000003,
    "amount":3,
    "currency":"USD",
    "payment":{"id":4000008,"timestamp":1487000002,"amount":18},
    "financeOrder":{"id":4000004},
    "merchant":{"id":4000002,"name":"API Test Merchant"},
    "salesClerk":{"id":4000003,"name":"Demo Clerk1"},
    "customer":{"id":4000005,"name":"API User","phoneNumber":"14084930580"}
  }
]}