Executions

A schedule can be executed once or multiple times depending on its frequency.

In order for executions to be performed, the user will need to have enough funds on its gas-wallet to pay for blockchain fees.

An execution can fail if the sender hasn’t got enough funds on his wallet. In that case 8Pay will retry every 6 hours.

Get a list of executions

GET https://api.8pay.network/v1/:chain/scheduled-payments/executions

Path Parameters

Name
Type
Description

chain

string

Query Parameters

Name
Type
Description

from

number

filter by timestamp (default 0)

to

number

filter by timestamp (default current timestamp)

sort

string

asc or desc based on timestamp (default desc)

Headers

Name
Type
Description

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "scheduleId": "0xe63ba761797e289076f80a7c0916a31740684806aaf507da85f81ee785fec6ba",
            "timestamp": 1684819496,
            "transactionHash": "0xbb97a142aed61a7027b0a030f3c0ab7e1b39bb776201752829d96d562ed49782",
            "transactionStatus": "confirmed",
            "token": "8PAY",
            "receivers": [
                {
                    "user": "0x38B70aC0BEf71A46Fc9E07f9c64913b9F533e54A",
                    "amount": "1000",
                    "fee": "10"
                }
            ]
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get executions of a schedule

GET https://api.8pay.network/v1/:chain/scheduled-payments/schedules/:scheduleId/executions

Path Parameters

Name
Type
Description

scheduleId

string

ID of the schedule

chain

string

Query Parameters

Name
Type
Description

from

number

filter by timestamp (default 0)

to

number

filter by timestamp (default current timestamp)

sort

string

asc or desc based on timestamp (default desc)

Headers

Name
Type
Description

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "scheduleId": "0xe63ba761797e289076f80a7c0916a31740684806aaf507da85f81ee785fec6ba",
            "timestamp": 1684819496,
            "transactionHash": "0xbb97a142aed61a7027b0a030f3c0ab7e1b39bb776201752829d96d562ed49782",
            "transactionStatus": "confirmed",
            "token": "8PAY",
            "receivers": [
                {
                    "user": "0x38B70aC0BEf71A46Fc9E07f9c64913b9F533e54A",
                    "amount": "1000",
                    "fee": "10"
                }
            ]
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Last updated