Subscription change deal
Use the changeDeal method to change the existing deal for a given subscription and operate the amendment order necessary to transition to the proposed deal immediately. The amendment order will use the due now prices returned by the getDealInfo method when called with the same relevant request parameters.
Request parameters
Currency
Required (string)
The currency.
Country
Required (string) The country.
Language
Required (string) The language.
CustomerIp
Optional (string) The customer's IP address.
Items
Required (array) Each item corresponds to a subscription.
Items.DealDate
Required (string) The date when the deal is set to come into effect.
Items.SubscriptionReference
Required (string) The subscription code.
Items.ProductCode
Required (string) The product code.
Items.Quantity
Required (string) The product quantity.
Items.DealPriceScenario
Required (string) The upgrade scenario to be applied. Must be one of: using_last_order_price, using_last_product_price, price_total, product_price_difference.
Items.DealSubscriptionScenario
Required (string) The scenario for price calculation. Must be one of prolong, does_not_affect, disable_existing.
Items.PriceOptions
Optional (array) The array of price options.
Items.PriceOptions.Code
Required (string) The price options group code.
Items.PriceOptions.Options
Required (array) The list of price option value (if the group is of type interval) or the price option code (otherwise).
Items.Price
Required (object) The product price.
Items.Price.Amount
Required (float) The actual numeric amount.
Items.Price.Type
Required (string) Describes if the price type is catalog or custom. Can be only CUSTOM.
Items.Price.AmountType
Required (string) Describes if the price is NET or GROSS. Can be on of NET, GROSS.
Items.SubscriptionCustomSettings
Required (object) Product license custom settings.
Items.SubscriptionCustomSettings.CycleLength
Required (int) The length of a single billing cycle.
Items.SubscriptionCustomSettings.CycleUnit
Required (string) The unit of a single billing cycle. Can be one of MONTH, DAY.
Items.SubscriptionCustomSettings.CycleAmount
Required (float) The price of a single billing cycle.
Items.SubscriptionCustomSettings.CycleAmountType
Required (string) Describes the price type. Can be one of NET, GROSS.
Items.SubscriptionCustomSettings.ContractLength
Required (int) The number of billing cycles contained in a single contract.
Items.SubscriptionCustomSettings.ClientDealAutoRenewal
Optional (boolean) CDAR value (default false).
Items.SubscriptionCustomSettings.MerchantDealAutoRenewal
Optional (boolean) MDAR value (default false).
BillingDetails
Required (object) The billing details.
BillingDetails.FirstName
Required (string) The first name.
BillingDetails.LastName
Required (string) The last name.
BillingDetails.CountryCode
Required (string) The country code. Must be one of the seller's associated country codes.
BillingDetails.State
Optional (string) Required only if the business model requires it.
BillingDetails.City
Required (string) The city name.
BillingDetails.Address1
Required (string) The address.
BillingDetails.Zip
Required (string) The zip code.
BillingDetails.Email
Required (string) The email address.
BillingDetails.Phone
Required (string) The phone number.
BillingDetails.Company
Required (string) The company's legal name.
BillingDetails.FiscalCode
Required (string) The fiscal code.
DeliveryDetails
Required (object) The delivery details.
DeliveryDetails.FirstName
Required (string) The first name.
DeliveryDetails.LastName
Required (string) The last name.
DeliveryDetails.CountryCode
Required (string) The country code. Must be one of the seller's associated country codes.
DeliveryDetails.State
Optional (string) Required only if the business model requires it.
DeliveryDetails.City
Required (string) The city name.
DeliveryDetails.Address1
Required (string) The address.
DeliveryDetails.Zip
Required (string) The zip code.
DeliveryDetails.Email
Required (string) The email address.
DeliveryDetails.Phone
Required (string) The phone number.
DeliveryDetails.Company
Required (string) The company's legal name.
PaymentDetails
Optional (object) The payment details.
PaymentDetails.Type
Required (string) Payment type. Can be CC (credit card) or EES_TOKEN_PAYMENT (2payJs token).
PaymentDetails.Currency
Required (string) Payment currency code.
PaymentDetails. CustomerIP
Required (string) Payment customer IP.
PaymentDetails.PaymentMethod
Required (object) The payment method information.
PaymentDetails.PaymentMethod.EesToken
Optional (string) EES token (required when payment type is EES_TOKEN_PAYMENT).
PaymentDetails.PaymentMethod.CardNumber
Optional (int)
CC number (required when payment type is CC).
PaymentDetails.PaymentMethod.CardType
Optional (string) CC type (ex: VISA, MC; required when payment type is CC).
PaymentDetails.PaymentMethod.ExpirationYear
Optional (int) 4 digits CC expiration year (required when payment type is CC).
PaymentDetails.PaymentMethod.ExpirationMonth
Optional (int) CC expiration month (required when payment type is CC).
PaymentDetails.PaymentMethod.CCID
Optional (string) CC CVV value (required when payment type is CC).
PaymentDetails.PaymentMethod.HolderName
Optional (string) CC holder name.
PaymentDetails.PaymentMethod.Vendor3DSReturnURL
Required (string) Merchant 3DS return URL.
PaymentDetails.PaymentMethod.Vendor3DSCancelURL
Required (string) Merchant 3DS cancel URL.
PaymentDetails.PaymentMethod.RecurringEnabled
Optional (boolean) Flag to enable recurring on the new license when set true.
ExtraInformation
Optional (object) Order extra information.
ExtraInformation.ProposalId
Optional (string) Related proposal object ID.
ExtraInformation.PurchaseOrderDownloadLink
Optional (string) PO Download link.
ExtraInformation.AMEmailB2B
Optional (string) AM email for B2B.
ExtraInformation.RetryFailedPaymentLink
Optional (string) Retry failed payment link.
Request sample
Response
The changeDeal method has (almost) the same response parameters as the getDealInfo method, plus the deal order details returned under the DealOrder key. These order details have the same structure as any placeOrder API method response (see here).
Error handling
Whenever there is a validation error, an error response is returned, for example:
In this case, the deal order is not created, and you must correct the request parameters and retry the API call.
Most of the validation errors are common with the ones listed for the getDealInfo method (see the Errors handling).
Whenever there is a payment level error encountered, the amendment order is still created, and the payment processing error will be returned in the DealOrder.Errors element, in the usual format used by the placeOrder response. Example:
You can check the list of possible order-level errors on this page.
Last updated
Was this helpful?