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>
Subscription-4903f0f3-d718-404b-a675-167eacfabe12Unique Identifier of the created Billing Cycle. Format: BillingCycle + - + <UUID>
BillingCycle-44401c1b-c762-42dd-81bc-fd1fbad54af2Header 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 (auto)
- Example
Schema
Unique Identifier of the Billing Cycle. Format: BillingCycle + - + <UUID>
BillingCycle-90d9e9bc-fd51-4698-b254-b8a57d3a72d9Timestamp of when the Billing Cycle was created.
2021-02-11T15:00:44.718ZTimestamp of when the Billing Cycle was last updated.
2021-02-11T15:00:44.718ZTimestamp of when the Billing Cycle was paid, if applicable.
2021-02-11T15:00:44.718ZThe date of billing.
2021-03-31The start date of the billing period.
2021-03-01The end date of the billing period.
2021-03-31Status of the billing cycle. Default: PENDING.
Possible values: [PENDING, CREATED, AUTHORIZATION PENDING, AUTHORIZATION COMPLETED, FAILED, CAPTURE PENDING, EXPIRED, CAPTURED, ERROR]
PENDINGAmount of the transaction.
10Currency code of the transaction. Format ISO 4217.
Possible values: >= 3 characters and <= 3 characters
EURMasked PAN for card, masked IBAN for SEPA, or masked email for PayPal.
Possible values: <= 255 characters
520000****0072Display name of the payment option which has been stored.
Possible values: <= 255 characters
MastercardID of the associated billing agreement.
BillingAgreement-df9cae2e-e424-490f-8bcb-ce52e81e6781Carrier number of the associated billing agreement.
12541****1235{
"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 (auto)
- 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 (auto)
- 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 (auto)
- 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 (auto)
- 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 (auto)
- 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."
}
]
}