Short Urls

Short urls allow you to share pre-formatted payment requests.

Create a short url

POST https://api.8pay.network/v1/:chain/one-time/short-urls

Path Parameters

NameTypeDescription

chain

sting

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

Request Body

NameTypeDescription

name

string

short url's name

params

object

object containing short url parameters

params.description

string

payment's description

params.receivers

array

array of ethereum addresses

params.amounts

array

array of amounts to send to the respective receivers

params.token

string

erc20 token symbol, see Tokens

params.category

string

category of the service/product, see Categories

params.tag

string

label used for identification or classification (max 32 bytes)

params.callbackSuccess

string

redirect url after success

params.callbackError

string

redirect url after failure

params.webhook

string

url for server-side notification

params.extra

object

extra parameters to be sent to webhook

params.chargeReceiversForServiceFee

boolean

when set to true receivers will be charged for service fee instead of sender (default false)

{
    "path": "outwE",
    "name": "Ebook",
    "createdAt": 1574954504,
    "updatedAt": 1574954504,
    "params": {
        "description": "Ebook",
        "receivers": ["0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff"],
        "amounts": ["5"],
        "token": "8PAY",
        "category": "Shop",
        "tag": "ebook_859294",
        "chargeReceiversForServiceFee": false,
        "callbackSuccess": "https://yoursite.com/thankyou",
        "callbackError": "https://yoursite.com/error",
        "webhook": "https://yoursite.com/notifications",
        "extra": {
            "banner": "BR69",
            "traffic": "facebook"
        }
    },
    "link": "https://8pay.me/outwE"
}

Get a list of short urls

GET https://api.8pay.network/v1/:chain/one-time/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": "outwE",
            "name": "Ebook",
            "createdAt": 1574954504,
            "updatedAt": 1574954504,
            "params": {
                "description": "Ebook",
                "receivers": ["0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff"],
                "amounts": ["5"],
                "token": "8PAY",
                "category": "Shop",
                "tag": "ebook_859294",
                "chargeReceiversForServiceFee": false,
                "callbackSuccess": "https://yoursite.com/thankyou",
                "callbackError": "https://yoursite.com/error",
                "webhook": "https://yoursite.com/notifications",
                "extra": {
                    "banner": "BR69",
                    "traffic": "facebook"
                }
            },
            "link": "https://8pay.me/outwE"
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get a short-url

GET https://api.8pay.network/v1/:chain/one-time/short-urls/:path

Retrive a short url created by the authenticated user.

Path Parameters

NameTypeDescription

path

string

path of the short url

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "path": "outwE",
    "name": "Ebook",
    "createdAt": 1574954504,
    "updatedAt": 1574954504,
    "params": {
        "description": "Ebook",
        "receivers": ["0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff"],
        "amounts": ["5"],
        "token": "8PAY",
        "category": "Shop",
        "tag": "ebook_859294",
        "chargeReceiversForServiceFee": false,
        "callbackSuccess": "https://yoursite.com/thankyou",
        "callbackError": "https://yoursite.com/error",
        "webhook": "https://yoursite.com/notifications",
        "extra": {
            "banner": "BR69",
            "traffic": "facebook"
        }
    },
    "link": "https://8pay.me/outwE"
}

Update a short url

PUT https://api.8pay.network/v1/:chain/one-time/short-urls/:path

Path Parameters

NameTypeDescription

path

string

path of the short url

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

Request Body

NameTypeDescription

name

string

short url’s name

params

string

object containing short url parameters

params.description

string

payment's description

params.receivers

array

array of ethereum addresses

params.amounts

array

array of amounts to send to the respective receivers

params.token

string

erc20 token symbol

params.category

string

category of the service/product, see categories

params.tag

string

label used for identification or classification (max 32 bytes)

params.callbackSuccess

string

redirect url after success

params.callbackError

string

redirect url after failure

params.webhook

string

url for server-side notification

params.extra

string

extra parameters to be sent to webhook

params.chargeReceiversForServiceFee

boolean

when set to true receivers will be charged for service fee instead of sender (default false)

{
    "path": "outwE",
    "name": "Ebook",
    "createdAt": 1574954504,
    "updatedAt": 1574973485,
    "params": {
        "description": "Ebook",
        "receivers": ["0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff"],
        "amounts": ["5"],
        "token": "8PAY",
        "description": "Ebook",
        "category": "Shop",
        "tag": "ebook_859294",
        "chargeReceiversForServiceFee": false,
        "webhook": "https://yoursite.com/notifications",
        "extra": {
            "banner": "BR69",
            "traffic": "facebook"
        }
    },
    "link": "https://8pay.me/outwE"
}

Delete a short-url

DELETE https://api.8pay.network/v1/:chain/one-time/short-urls/:path

Delete a short url created by the authenticated user.

Path Parameters

NameTypeDescription

path

string

path of the short url

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

Last updated