> 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":{"description":"Billing cycle length. Can be NULL.","type":"integer","nullable":true,"minimum":1},"CycleUnit":{"description":"DAY/MONTH. Can be NULL.","type":"string","enum":["DAY","MONTH"],"nullable":true},"CycleAmount":{"description":"Billing cycle (renewal) price.","type":"number","format":"float","minimum":0,"exclusiveMinimum":true},"CycleAmountType":{"description":"Billing cycle unit NET/GROSS.","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":{"description":"\"The payment method:","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":{"description":"Shopper IP.","type":"string"},"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":{"description":"The credit/debit card number.","type":"string"},"CardType":{"description":"visa, visaelectron, mastercard, maestro, amex, discover, dankort, cartebleue, jcb, hipercard, elo","type":"string"},"Vendor3DSReturnURL":{"description":"URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.","type":"string"},"Vendor3DSCancelURL":{"description":"URL address to which customers are redirected if the 3DS details were not validated or the order could not be authorized.","type":"string"},"ExpirationYear":{"description":"The year in which the card expires.","type":"string"},"ExpirationMonth":{"description":"The month in which the card expires.","type":"string"},"CCID":{"description":"Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2.","type":"string"},"HolderName":{"description":"Cardholder name.","type":"string"},"RecurringEnabled":{"description":"\"• true – shopper checks the auto-renewal checkbox and 2Checkout charges subscription renewals using a recurring billing process.","type":"boolean"},"HolderNameTime":{"description":"The interval of time in seconds in which shoppers enter their name in the HolderName field. An abnormally short interval is usually a red flag for fraud attempts. Can be NULL, but not a negative number.","type":"integer"},"CardNumberTime":{"description":"The interval of time in seconds in which shopper enters their card number in the CardNumber field. An abnormally short interval is usually a red flag for fraud attempts.","type":"integer"}}},"PlaceOrder_ExtraInformation":{"type":"object","properties":{"RetryFailedPaymentLink":{"type":"string","format":"url","description":"One of the url query params must be \"[REFNO]\""},"ProposalId":{"description":"The unique merchant proposal ID generated by the 2Checkout system.","type":"string","maximum":36},"PurchaseOrderDownloadLink":{"description":"Purchase order download link","type":"string","format":"url"},"AssistedSale":{"description":"True/False","type":"boolean"},"AssistedSaleAccountManagerEmail":{"description":"Account manager email","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":{"description":"The affiliate unique code (as returned by the affiliates API methods).","type":"string"},"AffiliateSource":{"description":"The affiliate source.","type":"string"}}},"orders0_Items":{"type":"object","properties":{"Code":{"description":"Unique product identifier your control. Max length 256 characters. Only for catalog products.","type":"string"},"Quantity":{"description":"Number of units","type":"string"},"CrossSell":{"$ref":"#/components/schemas/orders0_CrossSellCampaign"},"SubscriptionCustomSetting":{"$ref":"#/components/schemas/Item_SubscriptionCustomSettings"}}},"orders0_CrossSellCampaign":{"required":["ParentCode","CampaignCode"],"type":"object","properties":{"ParentCode":{"description":"The product code of the master product you set to trigger the campaign.","type":"string"},"CampaignCode":{"description":"Unique, system-generated identifier for cross-sell campaigns.","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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
