Business Payments

Return all payments for orders within specific business.

Parameters
  • idpath integerRequired

    Return all payments for orders by the specific business id. You can retrieve this id from ...

  • sortquery string

    Sort ascending or descending order.

  • filter[for_delivery]query string

    Filter by for_delivery.

  • filter[delivery_price_business_participation]query string

    Filter by delivery_price_business_participation.

  • filter[states]query string

    Filter by states.

  • filter[from_created_at]query string

    filter by from_created_at.

  • filter[to_created_at]query string

    Filter by to_created_at.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/businesses/{id}/payments

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}/payments`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }});
  const data = await res.json();
}

RESPONSE

{
  "data": [
    {
      "id": "9c736f42-f299-4028-b7eb-bfe6f9f0db76",
      "type": "payments",
      "links": {
        "self": "/payments/9c736f42-f299-4028-b7eb-bfe6f9f0db76"
      },
      "attributes": {
        "amount-cents": 2000,
        "created-at": "2021-10-06T09:34:43.754Z",
        "currency": "GBP",
        "delivery-price-business-participation": false,
        "for-delivery": false,
        "state": "finished",
        "user-name": "olka clientttt"
      }
    },
  ],
  "meta": {
    "total-count": 364,
    "total-pages": 37
  }
}