# ChangeDeal

## POST /subscriptions/deal/change/

> Change a deal license and create amendment order

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/deal/change/":{"post":{"tags":["ChangeDeal"],"summary":"Change a deal license and create amendment order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeDealRequest"}}},"required":true},"responses":{"200":{"description":"Change deal success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeDealResponse"}}}},"400":{"description":"Change deal validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealErrorResponse"}}}},"500":{"description":"Change deal internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealErrorResponse"}}}}}}}},"components":{"schemas":{"ChangeDealRequest":{"type":"object","properties":{"Currency":{"type":"string","description":"The deal order currency code"},"Country":{"type":"string","description":"The deal order country code"},"Language":{"type":"string","description":"The deal order language code"},"CustomerIp":{"type":"string","description":"The deal order customer IP"},"Source":{"type":"string","description":"The deal order source"},"Items":{"type":"array","items":{"$ref":"#/components/schemas/DealRequestItem"},"description":"The deal order items"},"BillingDetails":{"$ref":"#/components/schemas/BillingDetails"},"DeliveryDetails":{"$ref":"#/components/schemas/DeliveryDetails"},"PaymentDetails":{"$ref":"#/components/schemas/PlaceOrder_PaymentDetails"},"ExtraInformation":{"$ref":"#/components/schemas/PlaceOrder_ExtraInformation"}}},"DealRequestItem":{"type":"object","properties":{"DealDate":{"type":"string","description":"The date and time when the deal will be operated"},"SubscriptionReference":{"type":"string","description":"The deal license code"},"ProductCode":{"type":"string","description":"The deal license product code"},"Quantity":{"type":"integer","description":"The deal license product quantity"},"DealPriceScenario":{"type":"string","description":"The deal price calculation scenario","enum":["using_last_order_price","using_last_product_price","price_total","product_price_difference"]},"DealSubscriptionScenario":{"type":"string","description":"The license upgrade scenario","enum":["prolong","does_not_affect","start_new_deal_contract_now","start_new_deal_contract_after_current_cycle"]},"Price":{"type":"object","description":"The deal item custom price details","properties":{"Amount":{"type":"number","description":"The price amount value"},"Type":{"type":"string","description":"the price type (use CUSTOM in this case)"},"AmountType":{"type":"string","description":"the price amount type (GROSS or NET)"}}},"SubscriptionCustomSettings":{"$ref":"#/components/schemas/Item_SubscriptionCustomSettings"},"PriceOptions":{"$ref":"#/components/schemas/DealItemPriceOptions"}}},"Item_SubscriptionCustomSettings":{"type":"object","required":["CycleUnit","CycleLength","CycleAmount","CycleAmountType"],"properties":{"CycleLength":{"type":"integer","nullable":true,"minimum":1},"CycleUnit":{"type":"string","enum":["DAY","MONTH"],"nullable":true},"CycleAmount":{"type":"number","format":"float","minimum":0,"exclusiveMinimum":true},"CycleAmountType":{"type":"string","enum":["NET","GROSS"]}}},"DealItemPriceOptions":{"type":"object","description":"item price options","properties":{"Code":{"type":"string","description":"price option group code"},"Options":{"type":"array","items":{"type":"object","properties":{"Value":{"type":"string","description":"priceo option  code or value"}}}}}},"BillingDetails":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Phone":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"},"Email":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"City":{"type":"string"},"Zip":{"type":"string"},"CountryCode":{"type":"string"},"State":{"type":"string"}}},"DeliveryDetails":{"type":"object","properties":{"Phone":{"type":"string"},"FirstName":{"type":"string"},"LastName":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"},"Email":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"City":{"type":"string"},"Zip":{"type":"string"},"CountryCode":{"type":"string"},"State":{"type":"string"}}},"PlaceOrder_PaymentDetails":{"required":["Currency","Type"],"type":"object","properties":{"Type":{"type":"string"},"Currency":{"type":"string","description":"The currency ISO code for the payment - ISO 4217. Can be changed for the method \"Place an order with manual renewal\" to set a common currency for multiple subscriptions renewed via the same order."},"CustomerIP":{"type":"string"},"PaymentMethod":{"$ref":"#/components/schemas/PlaceOrder_PaymentDetails_PaymentMethod"}}},"PlaceOrder_PaymentDetails_PaymentMethod":{"type":"object","properties":{"CardNumber":{"type":"string"},"CardType":{"type":"string"},"Vendor3DSReturnURL":{"type":"string"},"Vendor3DSCancelURL":{"type":"string"},"ExpirationYear":{"type":"string"},"ExpirationMonth":{"type":"string"},"CCID":{"type":"string"},"HolderName":{"type":"string"},"RecurringEnabled":{"type":"boolean"},"HolderNameTime":{"type":"integer"},"CardNumberTime":{"type":"integer"}}},"PlaceOrder_ExtraInformation":{"type":"object","properties":{"RetryFailedPaymentLink":{"type":"string","format":"url","description":"One of the url query params must be \"[REFNO]\""},"ProposalId":{"type":"string","maximum":36},"PurchaseOrderDownloadLink":{"type":"string","format":"url"},"AssistedSale":{"type":"boolean"},"AssistedSaleAccountManagerEmail":{"type":"string"}}},"ChangeDealResponse":{"type":"object","properties":{"Items":{"type":"array","items":{"$ref":"#/components/schemas/ChangeDealResponseItem"}},"Currency":{"type":"string"},"DealDueNowPriceNet":{"type":"number"},"DealDueNowPriceGross":{"type":"number"},"DealTaxAmount":{"type":"number"},"DealOrder":{"$ref":"#/components/schemas/DealOrder"}}},"ChangeDealResponseItem":{"type":"object","properties":{"SubscriptionReference":{"type":"string","description":"The deal license code"},"DealPriceScenario":{"type":"string","description":"The deal price calculation scenario","enum":["using_last_order_price","using_last_product_price","price_total","product_price_difference"]},"DealSubscriptionScenario":{"type":"string","description":"The license upgrade scenario","enum":["prolong","does_not_affect","start_new_deal_contract_now","start_new_deal_contract_after_current_cycle"]},"DealDate":{"type":"string","description":"The date and time when the deal will be operated"},"DealDueNowPriceNet":{"type":"number","description":"The deal net price due to the given deal date"},"DealDueNowPriceGross":{"type":"number","description":"The deal gross price due to the given deal date"},"DealTaxAmount":{"type":"number","description":"The deal tax amount"},"DealTaxPercent":{"type":"number","description":"The deal tax percent"},"CurrentInfo":{"$ref":"#/components/schemas/DealInfo"},"NewDealInfo":{"$ref":"#/components/schemas/DealInfo"},"TotalsDealInfo":{"$ref":"#/components/schemas/TotalsDealInfo"}}},"DealInfo":{"type":"object","properties":{"ProductCode":{"type":"string"},"ProductName":{"type":"string"},"ProductDescription":{"type":"string"},"BillingPriceNet":{"type":"number"},"BillingPriceGross":{"type":"number"},"NoOfBillingCycles":{"type":"integer"},"CurrentBillingCycles":{"type":"integer"},"PayedBillingCycles":{"type":"integer"},"RemainingBillingCycles":{"type":"integer"},"CurrentBillingCycleEndDate":{"type":"string"},"TaxAmount":{"type":"number"},"TaxPercent":{"type":"number"},"BillingCyclesFrequency":{"type":"integer"},"BillingCyclesFrequencyUnit":{"type":"string"},"ContractLength":{"type":"integer"},"ContractLengthUnit":{"type":"string"},"ProductOptions":{"type":"array","items":{"$ref":"#/components/schemas/DealItemPriceOptions"}}}},"TotalsDealInfo":{"type":"object","properties":{"DealsNumber":{"type":"integer"},"ContractsNumber":{"type":"integer"},"PaidBillingCycles":{"type":"integer"},"ElapsedBillingCycles":{"type":"integer"}}},"DealOrder":{"allOf":[{"$ref":"#/components/schemas/body_1"},{"$ref":"#/components/schemas/DealDeliveryDetails"}]},"body_1":{"type":"object","properties":{"BillingDetails":{"$ref":"#/components/schemas/orders0_BillingDetails"},"Affiliate":{"$ref":"#/components/schemas/orders0_Affiliate"},"ExternalCustomerReference":{"type":"string"},"CustomerReference":{"type":"string"},"Country":{"type":"string"},"Currency":{"type":"string"},"CustomerIP":{"type":"string"},"Items":{"type":"array","items":{"$ref":"#/components/schemas/orders0_Items"}},"Language":{"type":"string"},"PaymentDetails":{"$ref":"#/components/schemas/orders0_PaymentDetails"},"Source":{"type":"string"}}},"orders0_BillingDetails":{"type":"object","properties":{"Address1":{"type":"string"},"City":{"type":"string"},"CountryCode":{"type":"string"},"Email":{"type":"string"},"FirstName":{"type":"string"},"FiscalCode":{"type":"string"},"LastName":{"type":"string"},"Phone":{"type":"string"},"State":{"type":"string"},"Zip":{"type":"string"}}},"orders0_Affiliate":{"type":"object","properties":{"AffiliateCode":{"type":"string"},"AffiliateSource":{"type":"string"}}},"orders0_Items":{"type":"object","properties":{"Code":{"type":"string"},"Quantity":{"type":"string"},"CrossSell":{"$ref":"#/components/schemas/orders0_CrossSellCampaign"},"SubscriptionCustomSetting":{"$ref":"#/components/schemas/Item_SubscriptionCustomSettings"}}},"orders0_CrossSellCampaign":{"required":["ParentCode","CampaignCode"],"type":"object","properties":{"ParentCode":{"type":"string"},"CampaignCode":{"type":"string"}}},"orders0_PaymentDetails":{"type":"object","properties":{"Currency":{"type":"string"},"CustomerIP":{"type":"string"},"PaymentMethod":{"$ref":"#/components/schemas/orders0_PaymentDetails_PaymentMethod"},"Type":{"type":"string"}}},"orders0_PaymentDetails_PaymentMethod":{"type":"object","properties":{"CCID":{"type":"string"},"CardNumber":{"type":"string"},"CardNumberTime":{"type":"string"},"CardType":{"type":"string"},"ExpirationMonth":{"type":"string"},"ExpirationYear":{"type":"string"},"HolderName":{"type":"string"},"HolderNameTime":{"type":"string"},"RecurringEnabled":{"type":"boolean"}}},"DealDeliveryDetails":{"type":"object","properties":{"DeliveryDetails":{"$ref":"#/components/schemas/DeliveryDetails"}}},"DealErrorResponse":{"type":"object","properties":{"error_code":{"type":"string","description":"Error type code"},"message":{"type":"string","description":"Error message"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/api-reference/reference/changedeal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
