Short Urls

Short urls are easy ways to share subscription links to your plans.

Create a short url

POST https://api.8pay.network/v1/:chain/fixed-recurring/short-urls

Path Parameters

NameTypeDescription

chain

string

Query Parameters

NameTypeDescription

name

string

name of the short url

planId

string

id of the

params

object

object containing short url param

params.callbackSuccess

string

redirect url after success

params.callbackError

string

redirect url after failure

params.extra

string

extra parameters to be sent to webhook

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "path": "f9yth",
    "name": "Facebook banner",
    "planId": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
    "createdAt": 1574954504,
    "updatedAt": 1574954504,
    "params": {
        "callbackSuccess": "https://www.google.com/",
        "callbackError": "https://www.google.com/",
        "extra": {
            "banner": "BR69",
            "traffic": "facebook"
        }
    },
    "link": "https://8pay.me/f9yth"
}

Get a list of short urls

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

Retrive a list of short url created by the authenticated user.

Path Parameters

NameTypeDescription

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "path": "f9yth",
            "name": "Facebook banner",
            "planId": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
            "createdAt": 1574954504,
            "updatedAt": 1574954504,
            "params": {
                "callbackSuccess": "https://www.google.com/",
                "callbackError": "https://www.google.com/",
                "extra": {
                    "banner": "BR69",
                    "traffic": "facebook"
                }
            },
            "link": "https://8pay.me/f9yth"
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get short urls of a plan

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

Path Parameters

NameTypeDescription

planId

string

ID of the plan

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "path": "f9yth",
            "name": "Facebook banner",
            "planId": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
            "createdAt": 1574954504,
            "updatedAt": 1574954504,
            "params": {
                "callbackSuccess": "https://www.google.com/",
                "callbackError": "https://www.google.com/",
                "extra": {
                    "banner": "BR69",
                    "traffic": "facebook"
                }
            },
            "link": "https://8pay.me/f9yth"
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get a short url

GET https://api.8pay.network/v1/bsc/fixed-recurring/short-urls/:path

Path Parameters

NameTypeDescription

path

string

path of the short url

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "path": "f9yth",
    "name": "Facebook banner",
    "planId": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
    "createdAt": 1574954504,
    "updatedAt": 1574954504,
    "params": {
        "callbackSuccess": "https://www.google.com/",
        "callbackError": "https://www.google.com/",
        "extra": {
            "banner": "BR69",
            "traffic": "facebook"
        }
    },
    "link": "https://8pay.me/f9yth"
}

Update a short url

PUT https://api.8pay.network/v1/bsc/fixed-recurring/short-urls/:path

Path Parameters

NameTypeDescription

path

string

path of the short url

chain

string

Query Parameters

NameTypeDescription

name

string

name of the short url

planId

string

id of the

params

object

object containing short url param

params.callbackSuccess

string

redirect url after success

params.callbackError

string

redirect url after failure

params.extra

string

extra parameters to be sent to webhook

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "path": "f9yth",
    "name": "Facebook banner",
    "planId": "0x57b2059e526841b3dfd964144513359c9fcfd6d91040b6c47f589c1e032b6bf7",
    "createdAt": 1574954504,
    "updatedAt": 1574973485,
    "params": {
        "callbackSuccess": "https://www.google.com/",
        "callbackError": "https://www.google.com/",
        "extra": {
            "banner": "BR69",
            "traffic": "facebook"
        }
    },
    "link": "https://8pay.me/f9yth"
}

Delete a short url

DELETE https://api.8pay.network/v1/bsc/fixed-recurring/short-urls/:path

Path Parameters

NameTypeDescription

path

string

path of the short url

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

Last updated