Displaying Payment History

The last thing you'll want to do for your vendors is provide an area where they can view payment history and details in-app!

To do that, you can call our List all items with a partnership operation and display the results to your vendors.

// POST /partnerships/a99945e9-815a-4ba7-9e57-cc88972d0222/items/ HTTP/1.1
// Accept: application/vnd.api+json
// Content-Type: application/vnd.api+json

{
  "links":{
    "first":"https://api.phil.megabox.dev/partnerships/a99945e9-815a-4ba7-9e57-cc88972d0222/items/?page%5Bnumber%5D=1",
    "last":"https://api.phil.megabox.dev/partnerships/a99945e9-815a-4ba7-9e57-cc88972d0222/items/?page%5Bnumber%5D=1",
    "next":null,
    "prev":null
  },
  "data":[
    {
      "type":"Item",
      "id":"cad5a7ff-e4a6-4750-9f45-2652c62d214a",
      "attributes":{
        "amount":"5000.00",
        "amount_due":"0.00",
        "amount_paid":"5000.00",
        "date_due":"2021-03-23",
        "date_expected":"2021-03-31",
        "date_externally_paid":null,
        "date_issued":"2021-03-23",
        "date_scheduled":null,
        "date_status_change":"2021-03-23T23:11:02.518859Z",
        "days_until_due":0,
        "has_attachments":false,
        "invoice_number":null,
        "is_creator":true,
        "kind":"payable",
        "partner_reference":null,
        "payment_delivery_method":"check",
        "payment_delivery_option":"check_standard",
        "reference":"Invoice #4245",
        "status":"initiated",
        "thread_modified":"2021-03-23T23:11:01.744281Z"
      },
      "relationships":{
        "approvals":{
          "data":[
            
          ]
        },
        "partner":{
          "data":{
            "type":"Company",
            "id":"5c81ac75-1599-4991-987a-8418d92698f2"
          }
        },
        "partnership":{
          "data":{
            "type":"Partnership",
            "id":"a99945e9-815a-4ba7-9e57-cc88972d0222"
          }
        },
        "tag_links":{
          "data":[
            
          ]
        },
        "thread":{
          "data":{
            "type":"Thread",
            "id":"5ceb9b35-6bd3-4330-a9ef-0eaeb9f20213"
          }
        }
      }
    },
    {
      "type":"Item",
      "id":"840c78d4-03d7-40a0-8c01-4ecb35d09d62",
      "attributes":{
        "amount":"5000.00",
        "amount_due":"0.00",
        "amount_paid":"5000.00",
        "date_due":"2021-03-23",
        "date_expected":"2021-03-30",
        "date_externally_paid":null,
        "date_issued":"2021-03-23",
        "date_scheduled":null,
        "date_status_change":"2021-03-23T23:09:08.004945Z",
        "days_until_due":0,
        "has_attachments":false,
        "invoice_number":null,
        "is_creator":true,
        "kind":"payable",
        "partner_reference":null,
        "payment_delivery_method":"ach",
        "payment_delivery_option":"ach_standard",
        "reference":"Invoice #4245",
        "status":"initiated",
        "thread_modified":"2021-03-23T23:09:01.962540Z"
      },
      "relationships":{
        "approvals":{
          "data":[
            
          ]
        },
        "partner":{
          "data":{
            "type":"Company",
            "id":"5c81ac75-1599-4991-987a-8418d92698f2"
          }
        },
        "partnership":{
          "data":{
            "type":"Partnership",
            "id":"a99945e9-815a-4ba7-9e57-cc88972d0222"
          }
        },
        "tag_links":{
          "data":[
            
          ]
        },
        "thread":{
          "data":{
            "type":"Thread",
            "id":"cb6b4e1b-183d-439e-beea-4ed415099baa"
          }
        }
      }
    }
  ],
  "included":[
    {
      "type":"Company",
      "id":"5c81ac75-1599-4991-987a-8418d92698f2",
      "attributes":{
        "name":"InstaWork"
      }
    },
    {
      "type":"Partnership",
      "id":"a99945e9-815a-4ba7-9e57-cc88972d0222",
      "attributes":{
        "customer_ref":null,
        "name":"InstaWork",
        "vendor_ref":null
      }
    },
    {
      "type":"Thread",
      "id":"1506326c-c378-4648-9f04-d1a9761cb794",
      "attributes":{
        "is_unread":false,
        "modified":"2021-03-19T16:37:16.129578Z"
      }
    },
    {
      "type":"Thread",
      "id":"5ceb9b35-6bd3-4330-a9ef-0eaeb9f20213",
      "attributes":{
        "is_unread":false,
        "modified":"2021-03-23T23:11:01.744281Z"
      }
    },
    {
      "type":"Thread",
      "id":"6511b11e-2168-427d-a0db-1f8f2ed55b8a",
      "attributes":{
        "is_unread":false,
        "modified":"2021-03-23T23:15:44.781759Z"
      }
    },
    {
      "type":"Thread",
      "id":"cb6b4e1b-183d-439e-beea-4ed415099baa",
      "attributes":{
        "is_unread":false,
        "modified":"2021-03-23T23:09:01.962540Z"
      }
    }
  ],
  "meta":{
    "pagination":{
      "page":1,
      "pages":1,
      "count":2,
      "page_size":25
    }
  }
}

Did this page help you?