On Demand

Subscription

The Subscription event is notified when a new user subscribes to a plan.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "on-demand",
    "event": "Subscription",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4",
        "user": "0xB2e9F6F9414ea12A33302923A55b9B4Cf99CCD90",
        "allowance": 50
    },
    "extra": {
        "banner": "BR69",
        "traffic": "facebook"
    }
}

Billing

The Billing event is notified when a subscriber is charged.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "on-demand",
    "event": "Billing",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4",
        "amount": "7.8"
    }
}

BillingFailed

The BillingFailed event is notified when charging a subscriber fails due to unsufficient funds.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "on-demand",
    "event": "BillingFailed",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4",
        "amount": "5.4",
    }
}

AllowanceChanged

The AllowanceChanged event is notified when a user changed the allowance for a subscription.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "on-demand",
    "event": "AllowanceChanged",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4",
        "allowance": 40
    }
}

SubscriptionCancelled

The SubscriptionCancelled event is notified when a user cancels a subscription.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "on-demand",
    "event": "SubscriptionCancelled",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4"
    }
}

SubscriptionTerminated

The SubscriptionTerminated event is notified when a subscription is terminated by the vendor.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "on-demand",
    "event": "SubscriptionTerminated",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4"
    }
}

Last updated