Get subscription

Subscriptions API v1

Warning

The v1 API has been deprecated. The v1 API will be supported for the foreseeable future, at least until July 2023. However, new features will only be added to the v2 API.

The documentation for retrieving subscriptions in the new v2 API can be found here. For more information on the v2 API, refer to our v2 migration guide.

GEThttps://api.mollie.com/v1/customers/*customerId*/subscriptions/*id*

Retrieve a subscription by its ID and its customer’s ID.

Parameters

Replace customerId in the endpoint URL by the customer’s ID, and replace id by the subscription’s ID. For example /v1/customers/cst_8wmqcHMN4U/subscriptions/sub_rVKGtNd6s3.

Access token parameters

If you are using organization access tokens or are creating an OAuth app, the testmode query string parameter is also available.

testmodebooleanoptional

Response

200 application/json

resourcestring
Indicates the response contains a subscription object. Will always contain subscription for this endpoint.
idstring
The identifier uniquely referring to this subscription. Mollie assigns this identifier at subscription creation time. For example sub_rVKGtNd6s3.
customerIdstring
The customer’s unique identifier, for example cst_8wmqcHMN4U.
modestring

The mode used to create this subscription. Mode determines whether the subscription’s payments are real or test payments.

Possible values: live test

createdDatetimedatetime
The subscription’s date and time of creation, in ISO 8601 format.
statusstring

The subscription’s current status, depends on whether the customer has a pending, valid or invalid mandate.

Possible values: pending active cancelled suspended completed

amountdecimal
The constant amount that is charged with each subscription payment.
timesinteger
Total number of charges for the subscription to complete.
intervalstring

Interval to wait between charges, for example 1 month or 14 days.

Possible values: ... months ... weeks ... days

startDatedate
The start date of the subscription in YYYY-MM-DD format.
descriptionstring
The description specified during subscription creation. This will be included in the payment description.
methodstring

The payment method used for this subscription, either forced on creation or null if any of the customer’s valid mandates may be used.

Possible values: creditcard directdebit paypal null

cancelledDatetimedatetime
The subscription’s date and time of cancellation, in ISO 8601 format.
linksobject

An object with URLs important to the subscription.

Show child parameters

webhookUrlstring
The URL Mollie will call as soon a payment status change takes place.

Example

Request

1
2
curl -X GET https://api.mollie.com/v1/customers/cst_stTC2WHAuS/subscriptions/sub_rVKGtNd6s3 \
    -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
HTTP/1.1 200 OK
Content-Type: application/json

{
    "resource": "subscription",
    "id": "sub_rVKGtNd6s3",
    "customerId": "cst_stTC2WHAuS",
    "mode": "live",
    "createdDatetime": "2016-06-01T12:23:34.0Z",
    "status": "active",
    "amount": "25.00",
    "times": 4,
    "interval": "3 months",
    "description": "Quarterly payment",
    "method": null,
    "cancelledDatetime": null,
    "links": {
        "webhookUrl": "https://webshop.example.org/payments/webhook"
    }
}