You may use the Digistore24 IPN system for managing subscription and rebilling on your platform - e.g. on your membership area.
Handling product access
Use these events to manage access to your product based on the customer’s payment status:
-
on_payment (name in Digistore24 backoffice: payment):
grants access to your product when a payment is successful. -
on_payment_missed (name in Digistore24 backoffice: missed recurring payment):
temporarily suspends access when a recurring payment fails (e.g. due to insufficient funds).
Important: Do not use this event to handle cancellations or refunds.
After the failed payment, several retry attempts are made and the customer is notified via email. If payment ultimately fails, the subscription is automatically cancelled and the event last_paid_day is triggered.
For subscription cancellations or refunds, use the following event:
-
last_paid_day (name in Digistore24 backoffice: end of paid period):
signals the end of the paid period (due to cancellation or refund). Use this to permanently revoke access after the last paid day.
For details on how to set up an IPN connection in Digistore24, see our IPN setup guide.
Creating accounts
These parameters (and others) are sent as IPN data
Create an account for these user data.
If you want to pass user data to Digistore24, please see this article.
Accounts and orders
When implementing your platform, please be aware that a buyer may have multiple products.
It’s essential that you store the Digistore24 order id and track the order status for each order id.
Example:
| Step | Action | Change | Event |
|---|---|---|---|
| 1 | buyer buys product A | order id AA11AA11 created | on_payment sent for order AA11AA11 |
| 2 | buyer buys product B | order id BB22BB22 created | on_payment sent for order BB22BB22 |
| 3 | buyer cancels AA11AA11 | rebilling stopped for AA11AA11 | on_payment_missed sent for AA11AA11 |
If you implement product access on an account level, the buyer may end up without product access after step 3.
Please implement product access on an order level, so that a buyer may have multiple orders.
Upgrades
For upgrades and downgrades, the on_payment_missed event is not sent.
Access to the new product should be granted at a certain date.
For upgrade and downgrades, Digistore24 passes these IPN parameters:
| Parameter name | Type | Description | Example value |
|---|---|---|---|
| upgraded_order_id | string(15) | ID of the “upgraded” order, i.e. the order ID the buyer has purchased the upgrade for. | 1A2B3C4E |
| delivery_date | date | The date when the new product should be delivered and access to the previous (upgraded) product should be stopped. If empty, access to the new product should be granted immediately. | (empty) or 2014-03-12 |
Revoke access to the product of the previous order (upgraded_order_id) on the given date (delivery_date).
At the same time grant access to the new order (order_id).