Context
During the lifecycle of a subscription, there are situations where it may be suspended. This suspension can be initiated by you (at the request of the customer, for example) or automatically by ProAbono based on management rules (such as when the customer has too many unpaid invoices or when the customer’s payment method is no longer valid).
If a subscription is in the “suspended” state, there are three ways to restart it:
- Allow the customer to restart the subscription autonomously from the customer portal.
- Send a link to a restart page to your customer.
- Restart the subscription from the ProAbono backoffice.
Here, we will see the actions to take if you let the customer restart the subscription from the customer portal.
Procedure
In this case, the customer is directly redirected to restart their currently suspended subscription.
An API call is made to retrieve the restart link for the subscription.
This retrieves the link called Hosted-Restart to redirect the customer to the restart process.
Request
GET https://api-{IdBusiness}.proabono.com/v1/Subscription/{IdSubscription}
Response
{ "Id": 603343, "IdSegment": 1441, "IdOffer": 9320, "IdCustomer": 800566, "IdCustomerBuyer": 800566, "ReferenceSegment": "1bis", "ReferenceOffer": "5", "ReferenceCustomer": "565d2a63-6157-4b40-a432-c9f3a7f22e20", "ReferenceCustomerBuyer": "565d2a63-6157-4b40-a432-c9f3a7f22e20", "StateSubscription": "SuspendedPaymentDue", "DateStart": "2021-05-21T00:00:00.00Z", "TitleLocalized": "Starter Annual", "AmountRecurrence": 1000, "DurationRecurrence": 1, "UnitRecurrence": "Month", "Features": [ { "Id": 9756, "ReferenceFeature": "f4d635b3-159f-4cf4-a5e8-48eb39f8d64f", "IsVisible": true, "Properties": "None", "TitleLocalized": "Mypulse Access", "TypeFeature": "OnOff", "IsIncluded": true, "IsEnabled": true }, { "Id": 9757, "ReferenceFeature": "cf571046-b29c-4e65-84e0-3331e4c95af5", "IsVisible": true, "Properties": "UpdatableBeforeSubscription", "TitleLocalized": "Users 2", "PricingLocalized": 50.00, "TypeFeature": "Limitation", "QuantityIncluded": 0, "QuantityCurrent": 2 } ], "Links": [ { "rel": "self", "href": "/Subscription/603343" }, { "rel": "hosted-related-subscription", "href": "https://sandbox-eur.proabono.com/portal-sub/{Unique-Encrypted-URL1}" }, { "rel": "hosted-restart", "href": "https://sandbox-eur.proabono.com/portal-sub/{Unique-Encrypted-URL2}" }, { "rel": "hosted-register", "href": "https://sandbox-eur.proabono.com/register/{Unique-Encrypted-URL3}" } ] }