8Pay
  • Introduction
  • Features
  • Chains
  • Payment flow
  • Sandbox Environment
  • Fees
  • Guides
    • Set up single payments
    • Set up recurring payments
    • Setup automatic buy (DCA) on Dex
  • Integrations
    • Overview
    • Short URLs
    • Buttons
      • One Time
      • Fixed Recurring
      • Variable Recurring
      • On Demand
    • Shopify
    • Woocommerce
    • Streaming Donations
    • JavaScript SDK
  • REST API
    • Overview
    • One Time
      • Payments
      • Transfers
      • Short Urls
    • Wallet to wallet
      • Payments
      • Transfers
    • Fixed Recurring
      • Plans
      • Subscriptions
      • Billings
      • Cancellations
      • Short Urls
      • Transfers
      • Webhook
    • Variable Recurring
      • Plans
      • Subscriptions
      • Billings
      • Cancellation Requests
      • Cancellations
      • Webhook
      • Transfers
      • Short Urls
    • On Demand
      • Plans
      • Subscriptions
      • Allowances
      • Billings
      • Cancellations
      • Webhook
      • Transfers
      • Short Urls
    • Scheduled Payments
      • Schedules
      • Executions
      • Cancellation
      • Transfers
    • Invest (DCA)
      • Strategies
      • Executions
      • Cancellation
    • Webhook Notifications
  • Webhook notifications
    • Overview
    • Events
      • One Time
      • Wallet-to-Wallet
      • Fixed Recurring
      • Variable Recurring
      • On Demand
  • Advanced Features
    • Gas Wallet
    • Autobiller
  • Appendix
    • Categories
    • Tokens
Powered by GitBook
On this page
  • Create a short url
  • Get a list of short urls
  • Get a short-url
  • Update a short url
  • Delete a short-url

Was this helpful?

  1. REST API
  2. One Time

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

Name
Type
Description

chain

sting

Headers

Name
Type
Description

Authorization

string

Bearer <api-key>

Request Body

Name
Type
Description

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

Name
Type
Description

chain

string

Headers

Name
Type
Description

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

Name
Type
Description

path

string

path of the short url

chain

string

Headers

Name
Type
Description

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

Name
Type
Description

path

string

path of the short url

chain

string

Headers

Name
Type
Description

Authorization

string

Bearer <api-key>

Request Body

Name
Type
Description

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

Name
Type
Description

path

string

path of the short url

chain

string

Headers

Name
Type
Description

Authorization

string

Bearer <api-key>

PreviousTransfersNextWallet to wallet

Last updated 1 year ago

Was this helpful?

chain identifier
chain identifier
chain identifier
chain identifier
chain identifier