Skip to main content

Get All Billing Cycles

Returns a list of all Billing Cycles linked to a subscription with pagination. The Billing Cycles returned shows also the list of the transactions executions linked to each cycle including the retries.

info

The request must provide the following header:

x-api-key: {merchantKey}

Request sample

Path:

GET {baseURL}/subscriptions/Subscription-4903f0f3-d718-404b-a675-167eacfabe12/billing-cycles

Header:

Content-Type: application/json
Accept-Language: en-US

Response parameters

FieldDescriptionType
pageNumber of the page for which the data is to be returned.Int
pageSizeNumber of the records to display per page.Int
countNumber of total records(Subscriptions) returned for the made search/request.Int
totalPagesNumber of pages returned for the made search/request.Int
dataList of all the Billing cycles of the subscription. For the Transaction output parameters specification, please refer to "Billing cycles " in the page Data Model.Object

Response sample

Status Code:

200 (OK)

Header:

Content-Type: application/json
Accept-Language: en-US
{
"page": 0,
"pageSize": 2,
"count": 2,
"totalPages": 1,
"data": [
{
"id": "BillingCycle-d43eed32-e035-4eb4-9e1b-94c54a00f60a",
"createdAt": "2021-06-18T06:12:39.33Z",
"updatedAt": "2021-06-18T06:16:36.16Z",
"paidАt": "2021-06-18T06:16:34.69Z",
"billingDate": "2021-06-18",
"billingPeriodStart": "2021-06-17",
"billingPeriodEnd": "2021-06-18",
"status": "captured",
"amount": 10.00,
"currency": "EUR",
"shortCardNum": "520000****0072",
"billingAgreementId": "BillingAgreement-df9cae2e-e424-490f-8bcb-ce52e81e6781"
},
{
"id": "BillingCycle-44401c1b-c762-42dd-81bc-fd1fbad54af2",
"createdAt": "2021-06-17T12:42:41.00Z",
"updatedAt": "2021-06-17T12:46:34.75Z",
"paidАt": "2021-06-17T12:46:33.40Z",
"billingDate": "2021-06-17",
"billingPeriodStart": "2021-06-17",
"billingPeriodEnd": "2021-06-18",
"status": "captured",
"amount": 10.00,
"currency": "EUR",
"shortCardNum": "520000****0072",
"billingAgreementId": "BillingAgreement-df9cae2e-e424-490f-8bcb-ce52e81e6781"
}
]
}
info

For error handling, please refer to this section.