Plans

Plans define the amount, token and billing period for subscriptions to recurring services and products. You can create plans using the web app.

Get a list of plans

GET https://api.8pay.network/v1/:chain/fixed-recurring/plans

Path Parameters

NameTypeDescription

chain

string

Query Parameters

NameTypeDescription

admin

string

filter by admin

receiver

string

filter by receiver

from

number

filter by createdAt (default 0)

to

number

filter by createdAt (default current timestamp)

sort

string

asc or desc (default desc), sort based on createdAt

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "id": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
            "name": "FlixGo",
            "admin": "0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff",
            "amount": "5.5",
            "token": "8PAY",
            "period": 2592000,
            "receiver": "0x5A4278004294D3C8Ba351c2533951A79EE48D9b8",
            "category": "Streaming",
            "createdAt": 1575107256,
            "transactionHash": "0x54587230024701c54878c32ca0951c070666f2afccec09ddc1d6921d584cca3c",
            "transactionStatus": "confirmed"
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get a plan

GET https://api.8pay.network/v1/:chain/fixed-recurring/plans/:planId

Path Parameters

NameTypeDescription

planId

string

ID of the plan

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "id": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
    "name": "FlixGo",
    "admin": "0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff",
    "amount": "5.5",
    "token": "8PAY",
    "period": 2592000,
    "receiver": "0x5A4278004294D3C8Ba351c2533951A79EE48D9b8",
    "category": "Streaming",
    "createdAt": 1575107256,
    "transactionHash": "0x54587230024701c54878c32ca0951c070666f2afccec09ddc1d6921d584cca3c",
    "transactionStatus": "confirmed"
}

Last updated