Skip to main content

Subscriptions

Updated this week

Get subscriptions

GET /products

Optional filters

reference_id

subscriptions with a specific reference id

email

subscriptions with a specific email address

customer_id

subscriptions for a specific customer

Example request

/subscriptions?filter[email][email protected]

Example JSON response

{

"status": 200,

"success": true,

"data": [

{

"id": 29281116,

"customer_id": 15831253

},

{

"id": 24381116,

"customer_id": 23831253

}

],

"pagination": {

"count": 20,

"total": 27,

"perPage": 20,

"currentPage": 1,

"totalPages": 2,

"links": []

}

}


Get subscription

Returns a single subscription

GET /subscription/29281116

Example JSON response

{
"status": 200,
"success": true,
"data": {
"id": 29281116,
"customer_id": 15831253,
"price": 29900,
"vat": 2500,
"currency": "sek",
"renews_at": "2020-01-06T14:55:33+00:00",
"ends_at": null,
"reference_id": "102676",
"reference_name": "",
"status": "active",
"billing_method": {
"email": "[email protected]",
"type": "stripe"
},
"product": {
"id": 1225,
"name": "Base",
"type": "month",
"price": 29900,
"currency": "sek",
"vat_rate": 2500
}
}
}


Cancel subscription

A cancelled subscription has a null value for renews_at and the status: cancelled

POST /subscription/29281116/cancel

Example JSON response

{
"status": 200,
"success": true,
"data": {
"id": 70212202,
"customer_id": 452512733,
"price": 59900,
"vat": 2500,
"currency": "sek",
"renews_at": null,
"ends_at": "2020-02-17T13:35:14+00:00",
"reference_id": null,
"reference_name": null,
"status": "cancelled"
}
}


Change product

This will change the subscription product and price to a product with an ID of 1234 . Please note that you can't switch a recurring donation product.

/subscription/29281116/product?product=1234

Did this answer your question?