1. Subscriptions
Saaslogic
  • Enum Reference
  • Authentication
  • Introduction
  • Products
    • Resources
      • Create Product Resource
    • Coupons
      • Publish Coupon
      • Create Coupon
      • Update Coupon
      • Get Coupon
      • Get Coupons
    • Configurations
      • Update Product Configurations
    • Create Product
    • Get Product
    • List all products
    • Update Product
  • Authentication
    • saaslogic token
      • Get the saaslogic access token
    • login Url
      • Gives the login URL
    • logout Url
      • Gives the logout URL
  • Countries
    • Get list of countries
  • Plans
    • Create Plan
    • Update Plan
    • Publish Plan
    • Get Plan
    • Get Plans
    • List all plans for a product
  • Subscriptions
    • Get Subscriptions
      POST
    • Change subscription plan
      PUT
    • Cancel the subscription
      PUT
    • Refund amount calculation
      POST
    • Create a product subscription
      POST
    • Retrieve a subscription
      GET
    • Create Customer and Subscription
      POST
    • Subscription with details permissions, menus and features
      GET
    • The Saaslogic URL for creating subscription
      POST
  • Usage Reporting
    • Report the resource usages in subscription for invoicing
    • Retrieves the resource usages of a subscription in the current billing cycle
  • Customers
    • addresses
      • Create an address
      • List all addresses
      • Update an address
      • Retrieve an address
      • Delete an address
    • contacts
      • Create a contact
      • List all contacts
      • Update a contact
      • Retrieve a contact
      • Delete a contact
    • Create a customer
    • List all customers
    • Update a customer
    • Retrieve a customer
    • Delete a customer
  • Vendors
    • vendor addresses
      • Create a vendor address.
      • List all vendor addresses.
      • Update a vendor address.
      • Retrieve a vendor address..
      • Delete a vendor address.
    • vendor contacts
      • Create a vendor contact.
      • List all vendor contacts.
      • Update a vendor contact.
      • Retrieve a vendor contact.
      • Delete a vendor contact.
    • vendor bills
      • Create a vendor bill
      • Cancel a vendor bill.
    • vendor bills payout
      • Update payment details to vendor bills.
    • Create a vendor
    • Update a vendor.
    • Activate a vendor.
    • Deactivate a vendor
  • Invoices
    • subscriptions
      • Get the invoices
      • Get the invoices by subscription
    • payments
      • Mark the invoice payment status
    • Approve the invoice
    • Get Invoices
    • Refund amount calculation
    • Invoice Refund
    • Get the invoice details
    • Cancel the invoice
    • Send invoice as pdf with payment link.
    • Create an on-demand invoice
  • States
    • Get list of states
  • Addons
    • List all addons for a product
  • Submerchant
    • Create a submerchant
  • UOM
    • Create UOM
    • Update UOM
    • List UOMs
    • Get UOM
  • HostedPages
    • Disable Hosted Page
    • Enable Hosted Page
  • Configurations
    • Update Configurations
  • Integrations
    • Update SMTP Integration
    • Save SMTP integration
  • Schemas
    • Invoice
      • InvoiceSubscriptionDTO
      • InvoiceInfo
      • InvoiceDetail
      • InvoiceProduct
      • InvoiceLineItemDTO
      • InvoicePayment
      • InvoiceAttributeDTO
      • InvoiceRequestDTO
      • InvoiceRequestProduct
      • InvoiceRequestLineItem
      • InvoiceRequestLineItemTax
      • InvoiceRequestDiscount
      • InvoicePaginatedResponse
      • InvoiceRefundCalculationRequest
      • InvoiceRefundCalculationResponse
    • Vendor
      • Vendor
      • VendorContact
      • VendorAddress
      • VendorBill
    • Subscriptions
      • SubscritpionPaginatedResponse
      • Subscription
      • ResourceQuantities
      • ChangeSubscriptionRequest
    • Pagination
      • PageRequest
      • SortCriteria
      • FilterCriteria
      • Pagination
      • InvoiceList
      • PageResponse
    • Plan
      • Plan
      • PlanSearchRequest
    • UOM
      • UOM
    • Product
      • ProductResource
      • Product
      • ProductFeature
      • ProductAttribute
      • Coupon
      • CouponSearchRequest
    • Integrations
      • SmtpIntegrationRequest
    • AccessTokenResponse
    • ProductAPIKey
    • Country
    • CustomerAddress
    • PaymentInfo
    • CustomerWithSubscription
    • State
    • Addon
    • CustomerContact
    • Submerchant
    • Customer
    • ExternalCancelSubscriptionRequest
    • SubscriptionRefundCalculationRequest
    • SubscriptionRefundCalculationResponse
    • RefundBreakdownItem
    • HostedPageAccessRequest
    • ProratedRefundDetails
  1. Subscriptions

Cancel the subscription

PUT
/subscriptions/{subscriptionId}/cancel
Cancel an active subscription using the specified cancellation type. The cancellation can be processed immediately or at the end of the current billing cycle, depending on the provided cancellationType. Optionally, a refundAmount can be specified when a refund is applicable. The request validates the subscription status, cancellation type, and refund eligibility before processing the cancellation.

Request

Path Params

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200Success
This response does not have a body.
🔴500ErrorResponse
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api-sandbox.saaslogic.io/v1/subscriptions//cancel' \
--header 'Authorization: Bearer ' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "cancellationType": "IMMEDIATE_EFFECT",
    "refundAmount": 120
}'
Response Response Example
{
    "message": "UN_AUTHORIZED"
}
Previous
Change subscription plan
Next
Refund amount calculation
Built with