Billings
Throughout a subscription’s cycle, the vendor can perform an unlimited number of billings as long their total sum doesn’t exceed the maximum allowance set by the user. Billings can be triggered from the webapp or the 8Pay Javascript SDK.
Billings can fail if the subscriber hasn’t got enough funds on his wallet, hasn’t enabled the token or his spending limit fo the token is too low. They can be retried at a later time.
Get billings of a plan
GET
https://api.8pay.network/v1/:chain/on-demand/plans/:planId/billings
Path Parameters
Name | Type | Description |
---|---|---|
planId | string | ID of the plan |
chain | string |
Query Parameters
Name | Type | Description |
---|---|---|
triggeredBy | string | filter by the user who triggered the billing |
from | number | filter by |
to | number | filter by |
sort | string |
|
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer <api-key> |
Get billings of a subscription
GET
https://api.8pay.network/v1/:chain/on-demand/subscriptions/:subscriptionId/billings
Path Parameters
Name | Type | Description |
---|---|---|
subscriptionId | string | ID of the subscription |
chain | string |
Query Parameters
Name | Type | Description |
---|---|---|
from | number | filter by |
to | number | filter by |
sort | string |
|
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer <api-key> |
Last updated