# Remove discount from subscription Removes a specific discount from a subscription contract based on the discount ID. This will affect the pricing of all future orders generated by the subscription. Key Features: - Removes any type of discount: automatic, manual, or code-based - Uses Shopify's draft system for safe removal - Immediate effect on future order pricing - Cannot be undone - discount must be re-applied if needed - Activity log tracks removed discounts Finding Discount IDs: Discount IDs can be found in the subscription contract's discount collection: - Query the subscription contract to see discounts.edges[].node.id - Format: gid://shopify/SubscriptionManualDiscount/123456 - Each discount has a unique ID regardless of type Types of Discounts: - Manual Discounts: Applied via API (percentage, fixed, price) - Code Discounts: Applied using discount codes - Automatic Discounts: Applied by Shopify based on rules - Build-a-Box Discounts: Volume-based discounts - Selling Plan Discounts: Built into the subscription plan Impact on Pricing: When a discount is removed: - Future orders use full price (no discount) - Existing orders are not affected - Other discounts remain active - Shipping prices may be recalculated - Customer sees updated pricing immediately Common Use Cases: - End promotional period discounts - Remove expired or invalid discount codes - Clear discounts before applying new ones - Customer service adjustments - Correct pricing errors Important Notes: - Cannot remove selling plan built-in discounts - No customer notification sent (consider sending separately) - Cannot selectively remove - removes entire discount - Build-a-Box discounts may auto-reapply based on quantity - Some discounts may be required by business rules Post-Removal Considerations: - Customer may notice price increase on next order - May affect customer retention if unexpected - Consider grace periods or notifications - Document reason for removal in your system Authentication: Requires valid X-API-Key header Endpoint: PUT /api/external/v2/subscription-contracts-remove-discount Version: 0.0.1 ## Query parameters: - `contractId` (integer, required) Subscription contract ID to remove discount from Example: 123456789 - `discountId` (string, required) ID of the discount to be removed. Must be the full GraphQL ID including the gid:// prefix. You can find discount IDs by querying the subscription contract and looking at the discounts collection. Format example: gid://shopify/SubscriptionManualDiscount/123456789 Example: "gid://shopify/SubscriptionManualDiscount/123456789" - `api_key` (string) API Key (Deprecated - Use X-API-Key header instead) ## Header parameters: - `X-API-Key` (string, required) API Key for authentication ## Response 200 fields (application/json): - `get__typename` (string) - `id` (string) - `createdAt` (object) - `updatedAt` (object) - `nextBillingDate` (object) - `status` (string) Enum: "ACTIVE", "PAUSED", "CANCELLED", "EXPIRED", "FAILED", "$UNKNOWN" - `deliveryPrice` (object) - `deliveryPrice.amount` (object) - `deliveryPrice.currencyCode` (string) Enum: "USD", "EUR", "GBP", "CAD", "AFN", "ALL", "DZD", "AOA", "ARS", "AMD", "AWG", "AUD", "BBD", "AZN", "BDT", "BSD", "BHD", "BIF", "BYN", "BZD", "BMD", "BTN", "BAM", "BRL", "BOB", "BWP", "BND", "BGN", "MMK", "KHR", "CVE", "KYD", "XAF", "CLP", "CNY", "COP", "KMF", "CDF", "CRC", "HRK", "CZK", "DKK", "DJF", "DOP", "XCD", "EGP", "ERN", "ETB", "FKP", "XPF", "FJD", "GIP", "GMD", "GHS", "GTQ", "GYD", "GEL", "GNF", "HTG", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "ILS", "IRR", "IQD", "JMD", "JPY", "JEP", "JOD", "KZT", "KES", "KID", "KWD", "KGS", "LAK", "LVL", "LBP", "LSL", "LRD", "LYD", "LTL", "MGA", "MKD", "MOP", "MWK", "MVR", "MRU", "MXN", "MYR", "MUR", "MDL", "MAD", "MNT", "MZN", "NAD", "NPR", "ANG", "NZD", "NIO", "NGN", "NOK", "OMR", "PAB", "PKR", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "RON", "RUB", "RWF", "WST", "SHP", "SAR", "RSD", "SCR", "SLL", "SGD", "SDG", "SOS", "SYP", "ZAR", "KRW", "SSP", "SBD", "LKR", "SRD", "SZL", "SEK", "CHF", "TWD", "THB", "TJS", "TZS", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "UYU", "UZS", "VUV", "VES", "VND", "XOF", "YER", "ZMW", "USDC", "BYR", "STD", "STN", "VED", "VEF", "XXX", "$UNKNOWN" - `lastPaymentStatus` (string) Enum: "SUCCEEDED", "FAILED", "$UNKNOWN" - `billingPolicy` (object) - `billingPolicy.interval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR", "$UNKNOWN" - `billingPolicy.intervalCount` (integer) - `billingPolicy.anchors` (array) - `billingPolicy.anchors.cutoffDay` (integer) - `billingPolicy.anchors.day` (integer) - `billingPolicy.anchors.month` (integer) - `billingPolicy.anchors.type` (string) Enum: "WEEKDAY", "MONTHDAY", "YEARDAY", "$UNKNOWN" - `billingPolicy.maxCycles` (integer) - `billingPolicy.minCycles` (integer) - `deliveryPolicy` (object) - `lines` (object) - `lines.nodes` (array) - `lines.nodes.sellingPlanId` (string) - `lines.nodes.sellingPlanName` (string) - `lines.nodes.productId` (string) - `lines.nodes.sku` (string) - `lines.nodes.title` (string) - `lines.nodes.variantId` (string) - `lines.nodes.quantity` (integer) - `lines.nodes.customAttributes` (array) - `lines.nodes.customAttributes.key` (string) - `lines.nodes.customAttributes.value` (string) - `lines.nodes.lineDiscountedPrice` (object) - `lines.nodes.variantImage` (object) - `lines.nodes.variantImage.transformedSrc` (object) - `lines.nodes.variantTitle` (string) - `lines.nodes.currentPrice` (object) - `lines.nodes.discountAllocations` (array) - `lines.nodes.discountAllocations.discount` (object) - `lines.nodes.pricingPolicy` (object) - `lines.nodes.pricingPolicy.basePrice` (object) - `lines.nodes.pricingPolicy.cycleDiscounts` (array) - `lines.nodes.pricingPolicy.cycleDiscounts.afterCycle` (integer) - `lines.nodes.pricingPolicy.cycleDiscounts.computedPrice` (object) - `lines.nodes.pricingPolicy.cycleDiscounts.adjustmentType` (string) Enum: "PERCENTAGE", "FIXED_AMOUNT", "PRICE", "$UNKNOWN" - `lines.nodes.pricingPolicy.cycleDiscounts.adjustmentValue` (object) - `lines.nodes.taxable` (boolean) - `lines.pageInfo` (object) - `lines.pageInfo.hasPreviousPage` (boolean) - `lines.pageInfo.hasNextPage` (boolean) - `lines.pageInfo.startCursor` (string) - `lines.pageInfo.endCursor` (string) - `customerPaymentMethod` (object) - `customerPaymentMethod.instrument` (object) - `customerPaymentMethod.revokedAt` (object) - `customerPaymentMethod.revokedReason` (string) Enum: "AUTHORIZE_NET_GATEWAY_NOT_ENABLED", "AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD", "FAILED_TO_UPDATE_CREDIT_CARD", "STRIPE_API_AUTHENTICATION_ERROR", "STRIPE_API_INVALID_REQUEST_ERROR", "STRIPE_GATEWAY_NOT_ENABLED", "STRIPE_RETURNED_NO_PAYMENT_METHOD", "STRIPE_PAYMENT_METHOD_NOT_CARD", "BRAINTREE_API_AUTHENTICATION_ERROR", "BRAINTREE_GATEWAY_NOT_ENABLED", "BRAINTREE_RETURNED_NO_PAYMENT_METHOD", "BRAINTREE_PAYMENT_METHOD_NOT_CARD", "PAYMENT_METHOD_VERIFICATION_FAILED", "THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED", "MANUALLY_REVOKED", "FAILED_TO_RETRIEVE_BILLING_ADDRESS", "MERGED", "CUSTOMER_REDACTED", "TOO_MANY_CONSECUTIVE_FAILURES", "CVV_ATTEMPTS_LIMIT_EXCEEDED", "$UNKNOWN" - `deliveryMethod` (object) - `originOrder` (object) - `originOrder.name` (string) - `originOrder.fulfillmentOrders` (object) - `customer` (object) - `customer.displayName` (string) - `customer.firstName` (string) - `customer.lastName` (string) - `customer.email` (string) - `customer.phone` (string) - `discounts` (object) - `note` (string) - `billingAttempts` (object) ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields ## Response 422 fields