- Standard APIs (All Required)
- Webhooks (Add and Delete Subscription Webhooks Required)
Standard APIs
The following APIs are required for the Platform-managed integration:-
PUT /partnerSubscription/{id} -
GET /subscription/{id}/partner/statusNote: Merchants aren’t required to make theGET /subscription/{id}/partner/statuscall. Merchants only need to provide a response.
Update Partner Subscription Status API
The Merchant usesPUT /partnerSubscription/{id} to update the partnerSubscription status after the Merchant has activated the user’s subscription (based on the partnerSubscriptionID as the Id parameter).
Note: As of May 2021, v3 is used for this API.
Get Partner Subscription Status API
MarketONE usesGET /subscription/{id}/partner/status to get the partnerSubscription status from the Merchant. The Merchant is required to provide a response.
Response
At minimum, the Merchant should return the partnerSubscriptionId and status in the response body.
Here’s an example of the response body MarketONE expects to receive from the Merchant:
Webhooks
The Merchant webhooks are automatically generated API requests that allow a Merchant system to know about Partner Ecosystem Management service provisioning events as they occur. You can provide a webhook endpoint URL and when those events happen, Partner Ecosystem Management will automatically generate an HTTPS POST request with a JSON payload. Partner Ecosystem Management webhook actions will include the full related object(s) in JSON format. Merchants need to add webhooks to receive the webhook events. After adding the webhooks, Merchants are required to process the webhook events, internally implement changes, and respond with a call to the MarketONE OpenAPI to update thepartnerSubscription status.
Note: You must add one API key per Reseller in Partner Ecosystem Management for machine-to-machine authentication. Include the corresponding Reseller-specific API key in the HTTP header of the Partner Ecosystem Management webhook.
Information in this section is provided about the following MarketONE webhooks:
- Add Subscription (Required)
- Update Subscription - Downgrade or Upgrade
- Delete Subscription (Required)
- Update Subscription Metadata
- Pause Subscription
- Resume Subscription
Add Subscription (Required)
MarketONE sends the Add Subscription event when the customer purchases a subscription from the Reseller’s (Service Provider’s) website, or a subscription needs to be re-provisioned. Request Here’s an example of an Add Subscription request body:- If the redemption code (
registrationString) is generated by MarketONE, MarketONE can optionally configure its expiration time (redemptionCodeExpirationTime):- MarketONE calls the
AddSubscriptioncallback and sends the redemption code along with the configured expiration time. - MarketONE sends the redemption code and its expiration time to the Reseller (Service Provider) notification (which the Reseller could then send as a notification to the user).
- The Merchant is responsible for letting the user activate their subscription if the redemption code hasn’t expired.
- If the redemption code has expired, the user needs to request a new redemption code via the Reseller making a
POST /partnerSubscription/{id}/reprovisioncall.
- MarketONE calls the
- If the redemption code (
registrationString) is generated by the Merchant (enabled using the Partner Ecosystem Management UI), the Merchant needs to send back the redemption code in response to theAddSubscriptioncallback along with the optional expiration time (redemptionCodeExpirationTime):- MarketONE forwards the redemption code and the expiration time to the Reseller (Service Provider) notification.
- The Merchant is responsible for letting the user activate their subscription if the redemption code hasn’t expired.
- If the redemption code has expired, the user needs to request a new redemption code using the re-provisioning API.
- If
redemptionCodeExpirationTimeis not set, the redemption code is treated as non-expiring.
- Upon receiving the MarketONE callback, create a new entry for the new subscription, and keep the information from the request body (including the
partnerSubscriptionID,productCode, redemption code (registrationString), etc.). The start date/time should be counted when the Merchant receives the MarketONE callback. - Send the new entry
idasexternalPartnerSubscriptionIDin the response to MarketONE (with the status asINACTIVE).
AddSubscription callback to the Merchant. However, it will have the existing partnerSubscriptionID and a newly generated redemption code (registrationString) from MarketONE.
Perform the following steps:
- The Merchant receives the MarketONE callback with the
AddSubscriptionaction. If the Merchant finds the samepartnerSubscriptionIDin the request, it means it’s a re-provision. - The Merchant should replace the existing redemption code of this particular Merchant subscription with the new one from the callback request.
Update Subscription - Downgrade or Upgrade
MarketONE sends the Update Subscription event when the customer upgrades or downgrades the service subscription via the Reseller’s (Service Provider’s) website. Request Here’s an example of an Update Subscription request body:- Find the matching entry of the
partnerSubscriptionIDfrom the request body. - Replace the old product code with the new product code.
- Grant the user access to the new (upgrade/downgrade) product.
Delete Subscription (Required)
MarketONE sends the Delete Subscription event when the customer cancels the subscription or the subscription is no longer valid based on the status of the customer’s billing account. Request Here’s an example of a Delete Subscription request body:- Find the matching entry of the
partnerSubscriptionIDfrom the request body. - Mark the subscription status as
CANCELLED(or equivalent). - Send the response to MarketONE (with the status as
INACTIVE).

