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
  • Subscription
  • Billing
  • BillingFailed
  • SubscriptionCancellationRequested
  • SubscriptionCancelled
  • SubscriptionTerminated

Was this helpful?

  1. Webhook notifications
  2. Events

Variable Recurring

Subscription

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

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

Billing

The Billing event is notified when a subscriber is charged.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "variable-recurring",
    "event": "Billing",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4",
        "amount": "5.4",
        "cycleStart": "1585218045",
        "cycleEnd": "1585219844"
    }
}

BillingFailed

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

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

SubscriptionCancellationRequested

The SubscriptionCancellationRequested event is notified when a user requests to cancel a subscription.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "variable-recurring",
    "event": "SubscriptionCancellationRequested",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4"
    }
}

SubscriptionCancelled

The SubscriptionCancelled event is notified when a cancellation was requested and, after the final billing, the subscription is cancelled.

{
    "id": "5ccf8bdc7707a8effa371d01452644d3a388b975290b968874d0a44ec0219226",
    "type": "variable-recurring",
    "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": "variable-recurring",
    "event": "SubscriptionTerminated",
    "timestamp": 1585220116,
    "transactionHash": "0xb0f21bf5d722d981330d45d8625568cd0b356e8c7c464857131a6ebf99eadf80",
    "transactionStatus": "confirmed",
    "data": {
        "planId":  "0xb7934ebf676eb81606da5dded26433ce994d9767924387d65378f263845f3af9",
        "subscriptionId": "0xf0e6a20e8069d403a538729549a17544a2bca3672312a4aed571d115e1fde7d4"
    }
}
PreviousFixed RecurringNextOn Demand

Last updated 3 years ago

Was this helpful?