Cancellation Requests

Customers can request to cancel a subscription anytime from the web app. When the cancellation request is received by the vendor, he will perform one last billing to account for the remaining unpaid period. After the billing, the subscription is automatically cancelled.

Get cancellation requests of a plan

GET https://api.8pay.network/v1/:chain/variable-recurring/plans/:planId/cancellation-requests

Path Parameters

NameTypeDescription

id

string

ID of the plan

chain

string

Query Parameters

NameTypeDescription

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

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "subscriptionId": "0xe63ba761797e289076f80a7c0916a31740684806aaf507da85f81ee785fec6ba",
            "timestamp": 1571686335,
            "transactionHash": "0x9ed2fdc68aa1253d206b954ea065a38a6332bd1732d0992e9bcb7056e720e381",
            "transactionStatus": "confirmed"
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get cancellation request of a subscription

GET https://api.8pay.network/v1/:chain/variable-recurring/subscriptions/:subscriptionId/cancellation-request

Path Parameters

NameTypeDescription

id

string

ID of the subscription

chain

string

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "subscriptionId": "0xe63ba761797e289076f80a7c0916a31740684806aaf507da85f81ee785fec6ba",
    "timestamp": 1571646052,
    "transactionHash": "0xbb97a142aed61a7027b0a030f3c0ab7e1b39bb776201752829d96d562ed49782",
    "transactionStatus": "confirmed"
}

Last updated