GetRecurringPayment
Endpoint
Overview
The "GetRecurringPayment" endpoint is a GET request. It is used to get all recurring payments created in your account.
The endpoint on Swagger is: Payment_GetRecurringPayment.
Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.
Request HeaderAdd "Authorization": "Bearer {Token}" to request header. Token of demo configuration can be found here.
Request Model
The request is a GET request without any parameters.
Response Model
After viewing the Response Model that you will get as a result of your request, here, you will find full details about the Data Model of this API endpoint. Let's check it and its contents.
| Response Field | Type | Description |
|---|---|---|
| RecurringPayment | array of RecurringPaymentModel objects |
RecurringPaymentModel
Response Field | Type | Description |
|---|---|---|
RecurringId | string | A unique number for each recurring payment. It's recommended to save this ID in your system with your customer profile so that, you can keep track of all payments done against that customer. Moreover, you will be able to cancel it when needed later on. |
RecurringStatus | string |
|
CreationDate | string | |
RecurringValue | number | The value to be paid by your customer. |
RecurringType | string | Recurring type you set in the request while creating the recurring payment. Possible values: (Custom-Daily-Weekly-Monthly) |
IntervalDays | integer | Valid when recurring type is set to "custom" |
ExecutedTimes | integer | How many times the recurring payment has been already executed. |
LastPayDate | string | Last date the recurring payment was executed. |
NextPayDate | string | Next date the recurring payment will be executed. |
IsActive | boolean | Whether the recurring status is active or not |
RecurringInvoices | array of RecurringInvoicesModel objects | The list of invoices related to this recurring payment. |
RecurringInvoicesModel
| Response Field | Type | Description |
|---|---|---|
| InvoiceId | integer | |
| CustomerReference | string | |
| CustomerName | string | |
| CustomerMobile | string | |
| CreatedDate | string | |
| InvoiceStatus | string |
Sample Messages
/v2/GetRecurringPayment{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"RecurringPayment": [
{
"RecurringId": "RECUR2136",
"RecurringStatus": "Canceled",
"CreationDate": "2021-04-13T11:57:51.733",
"RecurringValue": 50,
"RecurringType": "Custom",
"IntervalDays": 1,
"ExecutedTimes": 0,
"LastPayDate": "2021-04-13T11:57:51.733",
"NextPayDate": "2021-04-14T00:00:00",
"IsActive": false,
"RecurringInvoices": null
},
{
"RecurringId": "RECUR2171",
"RecurringStatus": "Active",
"CreationDate": "2021-04-22T15:17:56.38",
"RecurringValue": 50,
"RecurringType": "Custom",
"IntervalDays": 180,
"ExecutedTimes": 0,
"LastPayDate": "2021-04-22T15:17:56.38",
"NextPayDate": "2021-10-19T00:00:00",
"IsActive": true,
"RecurringInvoices": null
},
{
"RecurringId": "RECUR2137",
"RecurringStatus": "Uncompleted",
"CreationDate": "2021-04-13T12:06:41.067",
"RecurringValue": 50,
"RecurringType": "Custom",
"IntervalDays": 1,
"ExecutedTimes": 2,
"LastPayDate": "2021-04-15T04:02:45.717",
"NextPayDate": "2021-04-16T00:00:00",
"IsActive": false,
"RecurringInvoices": [
{
"InvoiceId": 614309,
"CustomerReference": null,
"CustomerName": "fname lname",
"CustomerMobile": "+965",
"CreatedDate": "2021-04-14T04:03:31.277",
"InvoiceStatus": "Paid"
},
{
"InvoiceId": 615024,
"CustomerReference": null,
"CustomerName": "fname lname",
"CustomerMobile": "+965",
"CreatedDate": "2021-04-15T04:02:43.077",
"InvoiceStatus": "Paid"
}
]
},
...
]
}
}Updated 2 days ago
