Context
You want to control the paln change process and ensure that your customers only upgrade to a specific offer from your offer catalog.
In this case, the customer does not choose the offer to upgrade to. They are directly redirected to subscribing to the new offer that you have specified.
Therefore, it is not necessary to present an offer change grid.
Procedure
Step 1: Retrieve the Id of the current subscription.
In this scenario, you first need to retrieve the Id of the customer’s current subscription through an API call.
You only need to know the reference of the corresponding customer.
Example: Retrieve a Subscription
GET https://api-2.proabono.com/v1/Subscription?ReferenceCustomer={ReferenceCustomer}
Response:
{ "Id": 594627, "IdSegment": 1441, "IdOffer": 9282, "IdCustomer": 786678, "IdCustomerBuyer": 786678, "ReferenceSegment": "1bis", "ReferenceOffer": "2", "ReferenceCustomer": "10381d0a-d1d1-4f6f-a67e-f9d0f0fb5cc9", "ReferenceCustomerBuyer": "10381d0a-d1d1-4f6f-a67e-f9d0f0fb5cc9", "StateSubscription": "Running", "DateStart": "2021-04-23T13:13:14.00Z", "DatePeriodStart": "2022-02-23T13:13:14.00Z", "DatePeriodEnd": "2022-03-23T13:13:14.00Z", "DateTerm": "2022-03-23T13:13:14.00Z", "DateResetConsumption": "2022-03-23T13:13:14.00Z", "StateSubscriptionAfterTerm": "Running", "IsEngaged": false, "IsCustomerBillable": true, "IsPaymentCappingReached": false, "DateNextBilling": "2022-03-23T19:13:14.00Z", "TitleLocalized": "Test 2", "AmountUpFront": 0, "AmountRecurrence": 6000, "DurationRecurrence": 1, "UnitRecurrence": "Month", "DateUpdate": "2022-02-24T11:14:19.91Z", "Links": [ { "rel": "self", "href": "/v1/Subscription/594627" }, { "rel": "hosted-related-subscription", "href": "https://https://sandbox-eur.proabono.com/portal-sub/{Unique-Encrypted-URL1}" }, { "rel": "hosted-upgrade", "href": "https://https://sandbox-eur.proabono.com/upgrades/{Unique-Encrypted-URL2}" } ] }
Step 2a: Perform the offer change to the target offer.
Once you have retrieved the Id, you can perform the offer change to the targeted offer.
To do this, you simply need to make a POST API call specifying the reference of the chosen offer to trigger the offer change to it.
This instantly performs the offer change.
Example: Upgrade a Subscription
POST https://api-2.proabono.com/v1/Subscription/{IdSubscription}/Upgrade?ReferenceOffer={ReferenceOffer}
Step 2b: Redirect the customer to the offer change tunnel to the target offer.
Once you have retrieved the Id, you can obtain a unique link to be provided to your customer to perform the offer change to the targeted offer.
To do this, you simply need to make a GET API call specifying the reference of the chosen offer. This allows you to retrieve the link called Hosted-Upgrade to redirect the customer to the offer change process to it.
Example: Upgrade a Subscription to an offer
GET https://api-2.proabono.com/v1/Subscription/{IdSubscription}/Upgrade?ReferenceOffer={ReferenceOffer}
Response:
{ "Id": 778811, "IdSegment": 1441, "IdOffer": 10539, "IdCustomer": 945238, "IdCustomerBuyer": 945238, "ReferenceSegment": "EUR", "ReferenceOffer": "offretest", "ReferenceCustomer": "9164b20e-fbb3-4fd7-a479-bf785176ee43", "ReferenceCustomerBuyer": "9164b20e-fbb3-4fd7-a479-bf785176ee43", "StateSubscription": "Running", "DateStart": "2022-09-22T07:38:12.00Z", "DatePeriodStart": "2022-11-22T07:38:12.00Z", "DatePeriodEnd": "2022-12-22T07:38:12.00Z", "DateTerm": "2022-12-22T07:38:12.00Z", "DateResetConsumption": "2022-12-22T07:38:12.00Z", "StateSubscriptionAfterTerm": "Running", "IsEngaged": false, "IsCustomerBillable": true, "IsPaymentCappingReached": false, "DateNextBilling": "2022-11-22T13:38:12.00Z", "TitleLocalized": "Offer Premium ", "AmountUpFront": 1000, "AmountRecurrence": 15000, "DurationRecurrence": 1, "UnitRecurrence": "Month", "Features": [ { "Id": 8993, "ReferenceFeature": "support-24", "IsVisible": true, "Properties": "UpdatableBeforeSubscription, UpdatableAfterSubscription", "TitleLocalized": "24/7 Support", "DescriptionLocalized": "Le support est essentiellement joignable depuis la bulle en bas de page. Vous pouvez néanmoins accéder au support depuis votre boite mail lorsque vous quitter l'application Web.", "PricingLocalized": "en option+10.00 €", "TypeFeature": "OnOff", "IsIncluded": false, "IsEnabled": true }, { "Id": 8994, "ReferenceFeature": "Nombre d'utilisateur", "IsVisible": true, "Properties": "None", "TitleLocalized": "Nombre d'utilisateur", "PricingLocalized": "1.00 €/unité", "TypeFeature": "Limitation", "QuantityIncluded": 0, "QuantityCurrent": 0 }, { "Id": 10661, "ReferenceFeature": "5a667ce6-e173-485a-9a3f-48937632583e", "IsVisible": true, "Properties": "UpdatableBeforeSubscription, UpdatableAfterSubscription", "TitleLocalized": "Caractéristique avec Tarif par défaut", "PricingLocalized": "à partir de2.50 €/unité suppl.", "TypeFeature": "Limitation", "QuantityIncluded": 5, "QuantityCurrent": 10 } ], "DateUpdate": "2022-11-22T07:38:17.52Z", "Links": [ { "rel": "self", "href": "/v1/Subscription/778811" }, { "rel": "hosted-related-subscription", "href": "https://Gestion-Relance-Commerciale-EUR.proabono.com/portal-sub/Y-pkLkckwBhAuaA9Zv4WRe4iqzJod8eyn7shenAiSVWgohfzUtWTKqe3F6Hj6vWURtpTMdKxyyFghoOxm8PxFtbwdpP6wQOBMNbg3Qpzjh4" }, { "rel": "hosted-upgrade", "href": "https://Gestion-Relance-Commerciale-EUR.proabono.com/upgrade-to-offer/Y-pkLkckwBhAuaA9Zv4WRe4iqzJod8eyn7shenAiSVWgohfzUtWTKqe3F6Hj6vWURtpTMdKxyyFghoOxm8PxFrY2LAJy8_NqOgvMcsJrs6V7yTDz7WV3fPC2dPndTyIH" } ] }
“