List subscriptions
Subscriptions API

GET
https://api.mollie.com/v1/customers/customerId/subscriptions
Authentication: API keys OAuth access tokens

Retrieve all subscriptions of the customer.

Parameters

Replace customerId in the endpoint URL by the customer ID, for example cst_7UhSN1zuXS.

offset
integer

Optional – The number of objects to skip.

count
integer

Optional – The number of objects to return (with a maximum of 250).

Mollie Connect/OAuth parameters

If you're creating an app with Mollie Connect/OAuth, the following parameters are also available. With the profileId parameter, you can specify which profile you want to look at when listing subscriptions. If you omit the profileId parameter, you will get all subscriptions on the organization. Organizations can have multiple profiles for each of their websites. See Profiles API for more.

profileId
string

Optional – The payment profile's unique identifier, for example pfl_3RkSN1zuPE.

testmode
boolean

Optional – Set this to true to only consider subscriptions made in testmode.

Includes

Some endpoints allow you to indicate if you want more information to be included in the API response via the include querystring parameter.

  • No includes supported for this endpoint.

Response

200
application/json; charset=utf-8
totalCount
integer

The total number of objects available.

offset
integer

The number of skipped objects as requested.

count
integer

The number of objects found in data, which is either the requested number (with a maximum of 250) or the default number.

data
array

A list of subscriptions as described in Get subscription.

links
object

Optional – Links to help navigate through the lists of objects, based on the given offset.

previous
string | null

Optional – The previous set of objects, if available.

next
string | null

Optional – The next set of objects, if available.

first
string | null

Optional – The first set of objects, if available.

last
string | null

Optional – The last set of objects, if available.

Example

Request code

$mollie = new Mollie_API_Client;
$mollie->setApiKey('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$subscriptions = $mollie->customers_subscriptions->withParentId("cst_stTC2WHAuS")->all();

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "totalCount": 3,
    "offset": 0,
    "count": 3,
    "data": [
        {
            "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"
            }
        }
        { ... },
        { ... }
    ]
}