> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/api-reference/reference/change-deal.md).

# Change Deal

## 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","description":"Shopper IP."},"UniToken":{"type":"string","description":"The UUID of a previously issued UniToken to use as the payment method. Required when Type is UNITOKEN. When an order is placed and authorized with a card and a UniToken already exists for the same customer (matched on CustomerReference/ExternalCustomerReference plus the card's first 4 and last 4 digits), that UniToken is updated with the new order reference and its ID is returned in the response, instead of a new UniToken being created."},"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","description":"The affiliate unique code (as returned by the affiliates API methods)."},"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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/api-reference/reference/change-deal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
