---
updatedAt: 2025-09-10T21:00:59.000Z
agentTools:
  projectIndex: https://developer.zylo.com/llms.txt
---

# Get Application Payments from Unapproved Cost Centers

```node Node
// The ID for the Application
const applicationId = 'c5121e02-aada-408d-bde3-dc518dfc2952';

// The list of approved cost centers for the application.
const approvedCostCenters = ['100023', '100024'];

// Create the negated filter
const negatedFilter = '!,' + approvedCostCenters.join(',');

// Base API URL
const url = new URL('https://api.zylo.com/v2/payments');

// Set API filters
url.searchParams.set('application_id', applicationId);
url.searchParams.set('cost_centers', negatedFilter);

// Base API Headers
const options = {
  method: 'GET',
  headers: {accept: 'application/json', authorization: 'Bearer <<user>>'}
};

// Fetch payments
fetch(url.toString(), options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

```json Response Example
{"success":true}
```

# Create Filter Values

<!-- node@1-5 -->

This step involves creating the filter values for the API call, including the ID for the application and the list of approved cost centers.

# Build API Endpoint

<!-- node@7-21 -->

This step involves creating the API endpoint needed to retrieve the payments for the application, filtered by unapproved cost centers.

# Fetch Results

<!-- node@23-27 -->

This step executes the API call and fetches the results.