Externally-Managed Purchases - Recurring Billing
Check our Reference Materials for more details about a payment connector.
Recurring billing as part of Externally-Managed Purchases means that a subscription is created and managed outside of Cleeng, for example inside either a given payment gateway or the Broadcasterās billing engine.
It is then gateway-specific how to notify the connector about successful/failed payment attempts or subscription status changes (e.g. new payment, refund, or subscription termination).
How to set up listeners in the connector to receive status change notifications?
A listener is an endpoint in the connector to which payment gateway notifications are sent.
You need to create an endpoint and register its URL within the payment gateway so that notifications will be sent there. You might create one endpoint for all notifications or one endpoint for each message type, depending on what a payment gateway allows.
After a gateway notification is received by the connector it must call appropriate Payment API endpoints to notify Cleeng about the changes. For example, if a notification about a successful payment capture is received by the connector, it should call POST /3.1/payments
to create a captured payment.
For smooth integration, Cleeng should be informed about the following:
- New payments - using
POST /3.1/payments
orPATCH /3.1/payments
with appropriate statuses - Subscription status changes in a payment gateway, especially those that result in the user not having access to content (e.g. termination of subscription - using
PATCH /3.1/subscriptions/{subscriptionId}
) - Rejected payments - using
POST /3.1/payments
orPATCH /3.1/payments
with "rejected" status - Refunds.
Note
It is important that notifications are set up in such a way that all the events that happen on the payment gateway are also registered at Cleeng.
Updated 3 months ago