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

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.