Describing how REST APIs and Events Integrate Systems with SAP Subscription Billing
Explaining the Difference Between Integrating SAP S/4HANA Public and Private Cloud Edition
Analyzing the Standard Integration Content of SAP Subscription Billing with SAP Systems
Integrating SAP Subscription Billing with Other SAP and Non-SAP Systems
Using REST APIs in SAP Subscription Billing
Exploring Subscription APIs
Managing Usage APIs in SAP Subscription Billing
Managing Bill APIs in SAP Subscription Billing

Cancelling a Subscription With an API

Objective

After completing this lesson, you will be able to cancel a subscription with an API.

Canceling of a Subscription with an API

Canceling a subscription with an API typically involves sending a request to the Subscription Billing API endpoint with the necessary parameters and authentication credentials. With a Subscription ID, you can send a subscription cancellation request using an API. Note that the URL remains the same; you only need to change the endpoint.

Next, let’s continue with a video to see how to cancel a subscription with an API.

Summary

Now that we’ve explored everything from subscription API options and testing with REST Clients to creating and canceling subscriptions with APIs, let’s move to the next unit and learn about APIs that manage usage.

Cancel a Subscription Using the POST Subscription Cancellation API

Business Scenario

You are a developer implementing Subscription Billing for your company. The business scenario is that your company has received a cancellation request from a customer for their running subscription. The exercise requires you to use the Subscriptions API to cancel the subscription.

Steps

  1. Create a new POST Request in Bruno.

    1. Enter the URL: https://eu10.revenue.cloud.sap/api/subscription/v1/subscriptions/ID/cancellation.

    2. Go to the Auth tab and enter the bearer token from the Exercise Generate a Bearer Token to Get Authorization for the APIs.

    3. Replace the ID in the URL with the subscription ID from the Exercise Get Customer ID and Create a Subscription Using the POST Subscription API.

    4. Go to the Body tab.

    5. Select JSON.

    6. Enter JSON.

      Code Snippet
      123456789
      { "metaData": { "version": 1 }, "requestedCancellationDate": "2024-08-01", "cancellationReason": "Not Paid", "cancellationNoticeDate": "2024-07-24T05:00:00.000Z" }