Subscriptions
Last updated
Last updated
Subscriptions allow you to charge customers on a recurring basis. Customers can subscribe through 8Pay’s hosted checkout pages that can be reached by embedded buttons, short urls and QR codes.
Subscriptions can be in three different statuses:
ACTIVE
: a cycle is in progress, no payment is due
EXPIRED
: the latest cycle is over and billing can be triggered
CANCELLATION_REQUESTED
: user has requested cancellation and he’s waiting for vendor’s action
CANCELLED
: the subscription was cancelled by the user
TERMINATED
: the subscription was terminated by the vendor
GET
https://api.8pay.network/v1/:chain/variable-recurring/subscriptions
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
GET
https://api.8pay.network/v1/:chain/variable-recurring/plans/:planId/subscriptions
GET
https://api.8pay.network/v1/:chain/variable-recurring/subscriptions/:subscriptionId
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
chain
string
user
string
filter by user
status
string
filter by status (ACTIVE
, EXPIRED
, CANCELLATION_REQUESTED
, CANCELLED
or TERMINATED
)
from
number
filter by subscribedAt
(default 0)
to
number
filter by subscribedAt
(default current timestamp)
sortBy
string
order by subscribedAt
, cycleStart
or cycleEnd
(default subscribedAt
)
sort
string
asc
or desc
(default desc
), sort based on sortBy
query parameter
Authorization
string
Bearer <api-key>
planId
string
ID of the plan
chain
string
user
string
filter by user
status
string
filter by status (ACTIVE
, EXPIRED
, CANCELLATION_REQUESTED
, CANCELLED
or TERMINATED
)
from
number
filter by subscribedAt
(default 0)
to
number
filter by subscribedAt
(default current timestamp)
sortBy
string
order by subscribedAt
, cycleStart
or cycleEnd
(default subscribedAt
)
sort
string
asc
or desc
(default desc
), sort based on sortBy
query parameter
Authorization
string
Bearer <api-key>
subscriptionId
string
ID of the subscription
chain
string
Authorization
string
Bearer <api-key>