Retrieve all recurring payment plans associated with a merchant using DigetPay's Server-to-Server (S2S) API.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
The List Recurring Plans API allows merchants to retrieve their recurring subscriptions, including active, pending, failed, and completed plans.
Each recurring plan includes its billing configuration, execution history, payment status, scheduled payment dates, and associated invoices.
The API supports pagination through the page and pageSize query parameters.
API Endpoint
Method: GET
Endpoint:
https://api.digetpay.com/v1/payment/s2s/GetRecurring
Authentication
Include your DigetPay API key in the request header.
| Header | Value |
|---|---|
x-api-key | YOUR_API_KEY |
DigetPay uses a unified API base URL for both Test and Live environments.
- Test API Key: Retrieve recurring plans from the test environment.
- Live API Key: Retrieve recurring plans from the production environment.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | Integer | Page number to retrieve. |
pageSize | Integer | Number of recurring plans requested per page. |
Request Example
The following request retrieves the first page of recurring payment plans, requesting up to 20 records.
curl --location 'https://api.digetpay.com/v1/payment/s2s/GetRecurring?page=1&pageSize=20' \
--header 'x-api-key: YOUR_API_KEY'Success Response Example
The following example shows recurring plans in different states, including Active, Failed, PendingPayment, and Completed.
The response has been shortened for readability while preserving the actual response structure and representative values.
{
"IsSuccess": true,
"Message": "Success",
"Data": {
"RecurringPayment": [
{
"RecurringId": "RECUR17",
"RecurringStatus": "Failed",
"CreationDate": "2026-11-01T18:20:24.362Z",
"RecurringValue": 1000,
"RecurringType": "Daily",
"IntervalDays": null,
"ExecutedTimes": 0,
"Iteration": 5,
"RetryCount": 1,
"LastPayDate": null,
"NextPayDate": null,
"IsActive": false,
"LastFailureReason": "AUTHENTICATION_REJECTED",
"RecurringInvoices": [
{
"InvoiceId": 101034239,
"PaymentId": "09081010342399833890388",
"CustomerReference": "cust-1001",
"CustomerName": "fname lname",
"CustomerMobile": "966512345678",
"CreatedDate": "2026-11-01T18:20:26.132Z",
"InvoiceStatus": "Failed",
"FailureReason": "AUTHENTICATION_REJECTED",
"Kind": "INITIAL"
}
]
},
{
"RecurringId": "RECUR16",
"RecurringStatus": "Active",
"CreationDate": "2026-11-01T18:19:09.493Z",
"RecurringValue": 1000,
"RecurringType": "Daily",
"IntervalDays": null,
"ExecutedTimes": 2,
"Iteration": 5,
"RetryCount": 1,
"LastPayDate": "2026-11-01T21:00:00.090Z",
"NextPayDate": "2026-11-02T21:00:00.000Z",
"IsActive": true,
"LastFailureReason": null,
"RecurringInvoices": [
{
"InvoiceId": 7329683,
"PaymentId": "07077329683392703974",
"CustomerReference": "cust-1001",
"CustomerName": "fname lname",
"CustomerMobile": "966512345678",
"CreatedDate": "2026-11-01T18:19:12.211Z",
"InvoiceStatus": "Paid",
"FailureReason": null,
"Kind": "INITIAL"
},
{
"InvoiceId": 7329836,
"PaymentId": "07077329836392718074",
"CustomerReference": "cust-1001",
"CustomerName": "fname lname",
"CustomerMobile": "966512345678",
"CreatedDate": "2026-11-01T21:00:02.590Z",
"InvoiceStatus": "Paid",
"FailureReason": null,
"Kind": "SCHEDULED"
}
]
},
{
"RecurringId": "RECUR14",
"RecurringStatus": "PendingPayment",
"CreationDate": "2026-11-01T11:54:13.743Z",
"RecurringValue": 1000,
"RecurringType": "Daily",
"IntervalDays": null,
"ExecutedTimes": 0,
"Iteration": 5,
"RetryCount": 1,
"LastPayDate": null,
"NextPayDate": null,
"IsActive": false,
"LastFailureReason": null,
"RecurringInvoices": [
{
"InvoiceId": 100960066,
"PaymentId": "09081009600669826639789",
"CustomerReference": "cust-1001",
"CustomerName": "fname lname",
"CustomerMobile": "966512345678",
"CreatedDate": "2026-11-01T11:54:15.605Z",
"InvoiceStatus": "Pending",
"FailureReason": null,
"Kind": "INITIAL"
}
]
},
{
"RecurringId": "RECUR10",
"RecurringStatus": "Completed",
"CreationDate": "2026-10-18T20:26:48.468Z",
"RecurringValue": 1,
"RecurringType": "Daily",
"IntervalDays": null,
"ExecutedTimes": 5,
"Iteration": 5,
"RetryCount": 1,
"LastPayDate": "2026-10-21T21:00:08.275Z",
"NextPayDate": null,
"IsActive": false,
"LastFailureReason": null,
"RecurringInvoices": [
{
"InvoiceId": 7286163,
"PaymentId": "07077286163389558674",
"CustomerReference": "cust-1001",
"CustomerName": "fname lname",
"CustomerMobile": "966512345678",
"CreatedDate": "2026-10-18T20:26:50.380Z",
"InvoiceStatus": "Paid",
"FailureReason": null,
"Kind": "INITIAL"
},
{
"InvoiceId": 7286180,
"PaymentId": "07077286180389560273",
"CustomerReference": "cust-1001",
"CustomerName": "fname lname",
"CustomerMobile": "966512345678",
"CreatedDate": "2026-10-18T21:00:12.762Z",
"InvoiceStatus": "Paid",
"FailureReason": null,
"Kind": "SCHEDULED"
}
]
}
],
"Page": 1,
"PageSize": 20,
"Total": 11
}
}Note: The example includes four representative recurring plans from an actual response containing 11 plans. The Total field reflects the complete original response, not the shortened example.
Response Parameters
General Response
| Parameter | Type | Description |
|---|---|---|
IsSuccess | Boolean | Indicates whether the API request was processed successfully. |
Message | String | General response message. |
Data | Object | Contains recurring plans and pagination information. |
Data.RecurringPayment | Array | Collection of recurring payment plans belonging to the merchant. |
Data.Page | Integer | Current page number. |
Data.PageSize | Integer | Requested number of records per page. |
Data.Total | Integer | Total number of recurring plans matching the request. |
RecurringPayment Object
| Parameter | Type | Description |
|---|---|---|
RecurringId | String | Unique recurring plan identifier. |
RecurringStatus | String | Current status of the recurring plan. |
CreationDate | String (DateTime) | Date and time when the recurring plan was created. |
RecurringValue | Number | Configured recurring payment amount. |
RecurringType | String | Billing frequency, such as Daily, Weekly, Monthly, or Custom. |
IntervalDays | Integer / Null | Custom billing interval in days, if applicable. |
ExecutedTimes | Integer | Number of recorded payment executions. |
Iteration | Integer | Configured total number of payment iterations. |
RetryCount | Integer | Configured retry count for failed payments. |
LastPayDate | String (DateTime) / Null | Date and time of the most recent recorded payment. |
NextPayDate | String (DateTime) / Null | Date and time of the next scheduled recurring payment. |
IsActive | Boolean | Indicates whether the recurring plan is active. |
LastFailureReason | String / Null | Latest recorded failure reason, if available. |
RecurringInvoices | Array | Payment invoices associated with the recurring plan. |
RecurringInvoices Object
| Parameter | Type | Description |
|---|---|---|
InvoiceId | Integer | Invoice identifier. |
PaymentId | String | Payment identifier. |
CustomerReference | String / Null | Merchant-defined customer reference. |
CustomerName | String | Customer name. |
CustomerMobile | String | Customer mobile number. |
CreatedDate | String (DateTime) | Invoice creation timestamp. |
InvoiceStatus | String | Invoice payment status. |
FailureReason | String / Null | Payment failure reason, if applicable. |
Kind | String | Invoice classification, such as INITIAL or SCHEDULED. |
Recurring Plan Statuses
The RecurringStatus parameter indicates the current state of each recurring plan.
The following statuses are confirmed in the provided API response:
| Status | Description |
|---|---|
PendingPayment | The recurring plan has been created, but the initial payment is still pending. |
Active | The recurring plan is active and has a configured billing schedule. |
Failed | The recurring plan has failed, for example because the initial payment was rejected or not completed. |
Completed | The configured payment iterations have been completed. |
Status Examples
{
"RecurringId": "RECUR16",
"RecurringStatus": "Active",
"ExecutedTimes": 2,
"Iteration": 5,
"IsActive": true
}{
"RecurringId": "RECUR17",
"RecurringStatus": "Failed",
"ExecutedTimes": 0,
"IsActive": false,
"LastFailureReason": "AUTHENTICATION_REJECTED"
}{
"RecurringId": "RECUR14",
"RecurringStatus": "PendingPayment",
"ExecutedTimes": 0,
"IsActive": false
}{
"RecurringId": "RECUR10",
"RecurringStatus": "Completed",
"ExecutedTimes": 5,
"Iteration": 5,
"IsActive": false,
"NextPayDate": null
}A completed recurring plan does not have another scheduled payment in the provided example.
Recurring Invoice Types
Each recurring plan contains a RecurringInvoices array with the associated payment records.
The Kind parameter identifies the invoice type.
| Kind | Description |
|---|---|
INITIAL | Initial payment associated with the recurring plan. |
SCHEDULED | Subsequent payment generated according to the recurring schedule. |
Example: Initial and Scheduled Payments
{
"RecurringId": "RECUR16",
"ExecutedTimes": 2,
"RecurringInvoices": [
{
"InvoiceId": 7329683,
"InvoiceStatus": "Paid",
"Kind": "INITIAL"
},
{
"InvoiceId": 7329836,
"InvoiceStatus": "Paid",
"Kind": "SCHEDULED"
}
]
}The initial payment is included in the recorded execution count.
Handling Failed Recurring Plans
The API provides failure information through:
LastFailureReasonat the recurring plan level.FailureReasonwithin individual recurring invoices.
Authentication Rejected
{
"RecurringStatus": "Failed",
"LastFailureReason": "AUTHENTICATION_REJECTED",
"ExecutedTimes": 0
}This example indicates that the initial authentication was rejected and no successful payment execution was recorded.
Initial Payment Not Completed
{
"RecurringStatus": "Failed",
"LastFailureReason": "Initial payment was not completed within 24 hours",
"IsActive": false
}This response indicates that the initial payment was not completed within the allowed period.
Merchants should review the failure reason and take the appropriate action according to their subscription management policies.
Pagination
The API supports pagination to retrieve recurring plans in manageable groups.
Example: First Page
GET /payment/s2s/GetRecurring?page=1&pageSize=20Example: Second Page
GET /payment/s2s/GetRecurring?page=2&pageSize=20Pagination Response
{
"Page": 1,
"PageSize": 20,
"Total": 11
}In this example:
Page: The current page is 1.PageSize: The requested page size is 20.Total: The merchant has 11 matching recurring plans.
All 11 plans fit within the requested first page.
To retrieve additional records when the total exceeds the page size, request subsequent pages.
When to Use This API
Use the List Recurring Plans API to:
- Retrieve all recurring subscriptions associated with your merchant account.
- Monitor active and pending subscriptions.
- Identify failed recurring payment plans.
- Review completed recurring plans.
- Track upcoming scheduled payments.
- Retrieve invoice history and payment execution information.
- Build subscription management and reporting features in your system.
Best Practices
- Use pagination when retrieving large numbers of recurring plans.
- Store and track the
RecurringIdfor each subscription. - Check
RecurringStatusandIsActivebefore treating a subscription as active. - Review
LastFailureReasonwhen handling failed subscriptions. - Use
NextPayDateto identify upcoming scheduled charges. - Review
RecurringInvoicesfor payment tracking and reconciliation. - Keep your merchant API key secure and never expose it in frontend code.
- Use the Get Recurring API with a specific
RecurringIdwhen retrieving an individual plan.
Related APIs
- Make Recurring — Create a new recurring payment plan.
- Get Recurring — Retrieve details of a specific recurring plan.
- Cancel Recurring — Cancel an existing recurring payment plan.
For more information, refer to the Recurring Payments Overview.
200
