---
schema_version: "1"
id: cfec2d2941de8336f229e862839faa73260d7c00153e548f12de648994a5d0e3
title: Recurring Donations Installments API
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sfdo/264-0-0/npsp_rd_installments_api.md
canonical_url: https://help.salesforce.com/s/articleView?id=sfdo.npsp_rd_installments_api.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 58b8c480b5b6814a0d31d121849d4d750dcb2962138cd827ceb62ef2142b8ea9
description: Write Apex to query information about Recurring Donation Installments using the Installments API.
products:
  - Nonprofit
release: "264"
---
# Recurring Donations Installments API

Write Apex to query information about Recurring Donation Installments using the Installments API.

The Recurring Donations Installments API is intended to meet the needs of customers and partners who require visibility into planned installments beyond the Next Year and Current Year totals provided out of the box. The Installments API provides access to installments calculated by active and paused schedules. Paused installments are omitted from the returned list of installments.

In addition to the Installments API, we provide a [Schedules API](https://help.salesforce.com/s/articleView?id=sfdo.npsp_rd_schedules_api.htm&release=264.0.0&type=5 "Write Apex to access information about the Recurring Donation Schedule object using the Schedules API.") which returns all Schedules associated with a Recurring Donation, including current, past, and paused schedules.

The Installments API only queries installments calculated by NPSP, not actual Opportunity records, either Open or Closed.

## Call Format

- **Global Class implementing the API**: Callable\_API
- **Global Method**: call()
- **Parameters**: Map<String, Object>

   
| Name | Datatype | Required | Description |
| --- | --- | --- | --- |
| StartDate | date | Yes | Default is Date.today() |
| EndDate | date | No | Default is one year of installment data. |
| RecordIds | string | Yes | Recurring Donation Ids. |

## JSON Response Format

The JSON response format shows Installment information listed by Recurring Donation Id.

   
| Name | Datatype | Required | Description |
| --- | --- | --- | --- |
| scheduleId | string | Yes | The Schedule record this installment relates to. NOTE: The Schedule object is protected. Use the [Schedules API](https://help.salesforce.com/s/articleView?id=sfdo.npsp_rd_schedules_api.htm&release=264.0.0&type=5 "Write Apex to access information about the Recurring Donation Schedule object using the Schedules API.") to access Schedule object info. |
| recurringDonationId | string | Yes | The Recurring Donation record this installment relates to. |
| paymentMethod | string | No | Payment method for this installment. For example, Check, Credit Card, ACH, etc. |
| installmentAmount | integer | Yes | The amount for this installment, based on the Recurring Donation schedule. |
| currencyCode | string | Yes | The currency ISO code for this installment. For example, USD. |
| closeDate | date | Yes | The close date for this installment. |
| campaignId | string | No | The Campaign record this installment relates to. |

## Code Sample and JSON Response

In this example, we want to find the next 90 days of installment information for all active Recurring Donations.

**Code Sample**

```java
Map <String, Object> callMap = new Map<String, Object>();
Set<Id> Ids = new Map<Id, npe03__Recurring_Donation__c>([SELECT Id FROM npe03__Recurring_Donation__c WHERE npsp__Status__c='Active']).keySet();

callMap.put('StartDate', Date.today());
callMap.put('EndDate', Date.today().addDays(90));
callMap.put('RecordIds', Ids);

npsp.Callable_API apiTest = new npsp.Callable_API();
String jsonResponse = String.valueOf(apiTest.call('rd2.queryinstallments', callMap));

                
```

**JSON Response**

```json
{
  "a092D000003Vp8pQAC": [
    {
      "scheduleId": "a0n2D000001B1mFQAS",
      "recurringDonationId": "a092D000003Vp8pQAC",
      "paymentMethod": "Check",
      "installmentAmount": 100,
      "currencyCode": "USD",
      "closeDate": "2020-12-04",
      "campaignId": null
    },
    {
      "scheduleId": "a0n2D000001B1mFQAS",
      "recurringDonationId": "a092D000003Vp8pQAC",
      "paymentMethod": "Check",
      "installmentAmount": 100,
      "currencyCode": "USD",
      "closeDate": "2021-01-04",
      "campaignId": null
    },
    {
      "scheduleId": "a0n2D000001B1mFQAS",
      "recurringDonationId": "a092D000003Vp8pQAC",
      "paymentMethod": "Check",
      "installmentAmount": 100,
      "currencyCode": "USD",
      "closeDate": "2021-02-04",
      "campaignId": null
    },
     ],
  "a092D000003V4ngQAC": [
    {
      "scheduleId": "a0n2D000001B0AnQAK",
      "recurringDonationId": "a092D000003V4ngQAC",
      "paymentMethod": "Check",
      "installmentAmount": 100,
      "currencyCode": "USD",
      "closeDate": "2020-12-01",
      "campaignId": null
    },
    {
      "scheduleId": "a0n2D000001B0AnQAK",
      "recurringDonationId": "a092D000003V4ngQAC",
      "paymentMethod": "Check",
      "installmentAmount": 100,
      "currencyCode": "USD",
      "closeDate": "2021-01-01",
      "campaignId": null
    },
    {
      "scheduleId": "a0n2D000001B0AnQAK",
      "recurringDonationId": "a092D000003V4ngQAC",
      "paymentMethod": "Check",
      "installmentAmount": 100,
      "currencyCode": "USD",
      "closeDate": "2021-02-01",
      "campaignId": null
    }
   ]
}
```