Subscription Management
Vrio has multiple API's that allow you to manage a customer subscription.
A Subscription in Sublytics is technically a recurring Order Offer. The order_offer_id
is the primary key that will allow you to manage a subscription over the API.
Search
You can search for all of the offers that a customer has purchased by email using the GET /order_offer API method by passing a customer_email. If you pass with=actions along with the call, it will return everything that the customer is able to do to each offer. These look at settings in Vrio to determine if the rules you have set allow for each action.
Those actions are the following:
- can_cancel = Can the subscription be cancelled. Example, if the subscription is currently active, can the customer cancel it.
- can_reactivate = Can the order offer be reactivated. Example, if the subscription is currently cancelled, can the customer reactivate it.
- can_swap = Can the customer swap to a different offer. You can set up swap options in the offer settings. For example, if the customer wants to swap from a Month to Month subscription to one where they pay every 3 months.
- can_pause = Can the customer pause the subscription, which would allow them to not cancel, but pause for a period of time.
- can_unpause = Can the customer unpause the subscription because its currently paused.
- can_change_quantity = Can the customer change how many they get on a subscription.
- can_change_frequency = Can the customer change the frequency of which they get a shipment. For example, if the customer wants to swap from a Month to Month subscription to one where they pay every 3.
- can_edit_gift = If the order offer was purchased as a gift, this will allow them to change details of the gift before its sent out.
- can_resend_gift = If the order offer was purchased as a gift, can they resend the gift notification in case the giftee did not receive it.
- can_manage = Can the customer manage the order offer. This would only be true if the order offer is a Subscription, so it allows you to not show options for one time sales.
Notes
Internal notes will be left for all actions that happen within the API as well as the UI. The endpoint you are using, when leaving a note will set the note on that objects history tab, as well as be rolled up to the Customer History.
See it in Action
Check out our recipe using the GET /order_offer API to determine if an order offer can be cancelled, and then using the POST /order_offers/{order_offer_id}/cancel
API endpoint to cancel it. Check out all the options available here.
Updated 14 days ago