List subscriptions
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4000/v1/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://localhost:4000/v1/subscriptions \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "sub_7Hq2mV9kLp3RxT",
"object": "subscription",
"status": "incomplete",
"product": "<string>",
"customer": "<string>",
"checkout_session": "<string>",
"manage_url": "https://elapse.finance/account",
"rate_usd_per_second": "<string>",
"started_at": 123,
"paused_at": 123,
"paused_seconds": 123,
"canceled_at": 123,
"ended_reason": "canceled",
"max_duration_seconds": 123,
"max_escrow_usd": "<string>",
"funded_usd": "<string>",
"settled_usd": "<string>",
"seconds_elapsed": 123,
"stream_address": "<string>",
"chain_id": 123,
"currency": "ausd",
"livemode": true,
"created": 123,
"product_name": "<string>",
"customer_email": "<string>"
}
],
"has_more": true,
"url": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Subscriptions
List subscriptions
GET
/
v1
/
subscriptions
List subscriptions
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4000/v1/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://localhost:4000/v1/subscriptions \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "sub_7Hq2mV9kLp3RxT",
"object": "subscription",
"status": "incomplete",
"product": "<string>",
"customer": "<string>",
"checkout_session": "<string>",
"manage_url": "https://elapse.finance/account",
"rate_usd_per_second": "<string>",
"started_at": 123,
"paused_at": 123,
"paused_seconds": 123,
"canceled_at": 123,
"ended_reason": "canceled",
"max_duration_seconds": 123,
"max_escrow_usd": "<string>",
"funded_usd": "<string>",
"settled_usd": "<string>",
"seconds_elapsed": 123,
"stream_address": "<string>",
"chain_id": 123,
"currency": "ausd",
"livemode": true,
"created": 123,
"product_name": "<string>",
"customer_email": "<string>"
}
],
"has_more": true,
"url": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key: sk_test_… for test mode, sk_live_… for live. Server-side only.
Query Parameters
Required range:
1 <= x <= 100Example:
10
Id of the last object on the previous page.
Available options:
incomplete, active, paused, canceled