Get Billing Cycle
GET/subscriptions/:subscriptionId/billing-cycles/:billingCycleId
Returns the details of a specific Billing Cycle linked to the provided subscription ID and billing cycle ID.
The request must provide the following header: x-api-key: {merchantKey}
Request
Path Parameters
Unique Identifier of the created Subscription. Format: Subscription + - + <UUID>
Unique Identifier of the created Billing Cycle. Format: BillingCycle + - + <UUID>
Header Parameters
Must be application/json
Must be be en-US
The origin of the request
The client making the request
x-api-key: {merchantKey}
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Successful response
- application/json
- Schema
- Example (from schema)
- Example
Schema
Unique Identifier of the Billing Cycle. Format: BillingCycle + - + <UUID>
Timestamp of when the Billing Cycle was created.
Timestamp of when the Billing Cycle was last updated.
Timestamp of when the Billing Cycle was paid, if applicable.
The date of billing.
The start date of the billing period.
The end date of the billing period.
Possible values: [Captured
, Failed
, Error
]
Status of the billing cycle.
Amount of the transaction.
Possible values: >= 3 characters
and <= 3 characters
Currency code of the transaction. Format ISO 4217.
Possible values: <= 255 characters
Masked PAN for card, masked IBAN for SEPA, or masked email for PayPal.
Possible values: <= 255 characters
Display name of the payment option which has been stored.
ID of the associated billing agreement.
{
"id": "BillingCycle-90d9e9bc-fd51-4698-b254-b8a57d3a72d9",
"createdAt": "2021-02-11T15:00:44.718Z",
"updatedAt": "2021-02-11T15:00:44.718Z",
"paidAt": "2021-02-11T15:00:44.718Z",
"billingDate": "2021-03-31",
"billingPeriodStart": "2021-03-01",
"billingPeriodEnd": "2021-03-31",
"status": "Captured",
"amount": 10,
"currency": "EUR",
"shortCardNumber": "520000****0072",
"billingAgreementName": "Mastercard",
"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,
"currency": "EUR",
"shortCardNum": "520000****0072",
"billingAgreementId": "BillingAgreement-df9cae2e-e424-490f-8bcb-ce52e81e6781"
}
Bad Request
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Internally generated trace_id
for this error message so it can be found easily in the logs.
errors
object[]
A predefined string which describes the error. The purpose of the message is to allow for future usage of translation.
A pre-defined code from the list of error codes.
The property from the request object which the error is linked to.
context
object
A json object containing a list of predefined properties which are filled based on the error.
{
"traceId": "string",
"errors": [
{
"message": "string",
"code": "string",
"property": "string",
"context": {
"type": "string",
"minimum": 0,
"maximum": 0,
"maxLength": 0,
"allowedValues": [
"string"
]
}
}
]
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Value out of bounds. Value must be between 1 and 100",
"code": "value_out_of_bounds",
"property": "someField",
"context": {
"minimum": 1,
"maximum": 100
}
}
]
}
Unauthenticated
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Internally generated trace_id
for this error message so it can be found easily in the logs.
errors
object[]
A predefined string which describes the error. The purpose of the message is to allow for future usage of translation.
A pre-defined code from the list of error codes.
The property from the request object which the error is linked to.
context
object
A json object containing a list of predefined properties which are filled based on the error.
{
"traceId": "string",
"errors": [
{
"message": "string",
"code": "string",
"property": "string",
"context": {
"type": "string",
"minimum": 0,
"maximum": 0,
"maxLength": 0,
"allowedValues": [
"string"
]
}
}
]
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "You are not authenticated to perform this request.",
"code": "unauthorized"
}
]
}
Forbidden
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Internally generated trace_id
for this error message so it can be found easily in the logs.
errors
object[]
A predefined string which describes the error. The purpose of the message is to allow for future usage of translation.
A pre-defined code from the list of error codes.
The property from the request object which the error is linked to.
context
object
A json object containing a list of predefined properties which are filled based on the error.
{
"traceId": "string",
"errors": [
{
"message": "string",
"code": "string",
"property": "string",
"context": {
"type": "string",
"minimum": 0,
"maximum": 0,
"maxLength": 0,
"allowedValues": [
"string"
]
}
}
]
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "You do not have permissions to perform this request.",
"code": "forbidden"
}
]
}
Not Found
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Internally generated trace_id
for this error message so it can be found easily in the logs.
errors
object[]
A predefined string which describes the error. The purpose of the message is to allow for future usage of translation.
A pre-defined code from the list of error codes.
The property from the request object which the error is linked to.
context
object
A json object containing a list of predefined properties which are filled based on the error.
{
"traceId": "string",
"errors": [
{
"message": "string",
"code": "string",
"property": "string",
"context": {
"type": "string",
"minimum": 0,
"maximum": 0,
"maxLength": 0,
"allowedValues": [
"string"
]
}
}
]
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Resource not found.",
"code": "not_found"
}
]
}
Internal Server Error
For error handling, please refer to this section.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Internally generated trace_id
for this error message so it can be found easily in the logs.
errors
object[]
A predefined string which describes the error. The purpose of the message is to allow for future usage of translation.
A pre-defined code from the list of error codes.
The property from the request object which the error is linked to.
context
object
A json object containing a list of predefined properties which are filled based on the error.
{
"traceId": "string",
"errors": [
{
"message": "string",
"code": "string",
"property": "string",
"context": {
"type": "string",
"minimum": 0,
"maximum": 0,
"maxLength": 0,
"allowedValues": [
"string"
]
}
}
]
}
{
"traceId": "00-1234567890abcdef0123456789abcdef-0123456789abcdef-00",
"errors": [
{
"message": "Internal server error."
}
]
}