Docs
You are viewing:
Product Catalog 2.0
How to provide prorate refund on immediate contract terms cancellation using API? Why am I able to prorate refunds on cancelling contract terms via UI but not via API?
By default a subscription in contract term can be cancelled via UI, API and Portal; however, processing a prorate credits while cancelling immediately is available only via UI and API as it is restricted on the portal. If you would like to customize the front end on your site, you can use the below parameters to process prorated credit on immediate contract cancellation.
cancel_option= immediately credit_option_for_current_term_charges= prorate refundable_credits_handling= schedule_refund
Ideally, a subscription that is created on contract for a specific number of billing cycles should not be cancelled during the contract term. It kills the purpose of creating contract terms. However, a merchant can cancel their customer's subscription on contract via UI (screenshot for reference).
But if you allow the customer to cancel the subscription on contract via portal, they will be able to terminate only at the end of the contract term as per the configuration.
Contract cancellation via Portal
If you would like to customize it, you can use an API call and pass the below parameters, which allow the users to cancel the contract immediately and process prorated credits.
--data-urlencode 'cancel_option=immediately' --data-urlencode 'credit_option_for_current_term_charges=prorate' --data-urlencode 'refundable_credits_handling=schedule_refund' \
Please refer to this link for more details.
Was this article helpful?