Subscription API - How to charge random amount as subscription cancellation Charges.

Shopify Partner
4 0 1

Is there any way that by using shopify subscription API, I can charge different amount against customer vaulted card. 

Like I have 150 per month subscription, but in case of cancellation, How can I charge customer 250 as cancellation and machine collection charges.

Replies 2 (2)

Shopify Staff (Retired)
12 2 3

Hi @Ahmadgill,


Hope you're doing great!


Yes, there is! I suggest you to check the subscriptions billing cycle API to edit the contract information for a single cycle (as opposed to updating the entire contract):


Thus you could either change the price of the line item on that cycle (i.g. from $150 to $250), or alternatively add a second line item which will be the $100 surcharge for cancellation.





To learn more visit the Shopify Help Center or the Community Blog.

Shopify Partner
588 48 77

Hello there  

Yes, it is possible to charge a different amount against a customer's vaulted card using the Shopify Subscription API. You can achieve this by creating a one-time charge with a custom amount for the customer.

Here are the general steps you can follow to charge a customer a custom amount using the Subscription API:


  1. Retrieve the customer's payment token or card details from the customer vault using the Shopify API.

  2. Create a one-time charge using the Shopify API and set the amount to the custom amount you want to charge the customer. You can specify the charge as a one-time fee or as a prorated amount if the customer is canceling their subscription early.

  3. Use the Shopify API to apply the charge to the customer's payment method.

  4. Update the customer's subscription to reflect the new payment status.

It's important to note that any custom charges you apply to a customer's payment method should be clearly communicated to the customer in advance and be included in your subscription terms and conditions.