Apply Discount
Apply the discount to the existing subscription.
Post
https://store.payproglobal.com/api/Subscriptions/ApplyDiscountRequest Parameters
application/jsonApplyDiscountRequestModel
objectdiscountValue
numberrequired
The value of the discount you want to apply.
isPercentage
booleanoptional
Possible values are true or false.
If true, the discount value is considered as a percentage one.
If false, the discount is a fixed value.
If true, the discount value is considered as a percentage one.
If false, the discount is a fixed value.
applyDiscountForAllFuturePayments
booleanoptional
Possible values are true or false.
If true, the discount will be applied to all future recurring charges.
If false, the discount will be applied only to one upcoming subscription payment.
If true, the discount will be applied to all future recurring charges.
If false, the discount will be applied only to one upcoming subscription payment.
applyDiscountForXFuturePayments
numberThe number of billing cycles for which the discount should be applied.
subscriptionId
integerrequired
The subscription ID that needs to be updated.
vendorAccountId
integerrequired
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
It can be found in Account settings > Business info.
apiSecretKey
stringrequired
The vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
Response Parameters
application/jsonApplyDiscountResponseModel
objectisDiscountApplied
booleanPossible values are true or false. If true, the discount has been successfully applied; if false, otherwise.
request
objectdiscountValue
numberThe value of the discount you want to apply.
isPercentage
booleanPossible values are true or false.
If true, the discount value is considered as a percentage one.
If false, the discount is a fixed value.
If true, the discount value is considered as a percentage one.
If false, the discount is a fixed value.
applyDiscountForAllFuturePayments
booleanPossible values are true or false.
If true, the discount will be applied to all future recurring charges.
If false, the discount will be applied only to one upcoming subscription payment.
If true, the discount will be applied to all future recurring charges.
If false, the discount will be applied only to one upcoming subscription payment.
applyDiscountForXFuturePayments
numberThe number of billing cycles for which the discount should be applied.
subscriptionId
integerThe subscription ID that needs to be updated.
vendorAccountId
integerThe vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
It can be found in Account settings > Business info.
apiSecretKey
stringThe vendor account API secret key is a unique key
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
that was generated specifically for authenticating API requests.
It can be found in Store settings > General settings > Integration tab.
errors
array[object]propertyWithError
stringpropertyErrorMessages
array[string]isSuccess
booleanRequest Sample
{
"discountValue": 10.0,
"isPercentage": true,
"applyDiscountForAllFuturePayments": true,
"applyDiscountForXFuturePayments": 3,
"subscriptionId": 1111111,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"isDiscountApplied": true,
"request": {
"discountValue": 1.0,
"isPercentage": true,
"applyDiscountForAllFuturePayments": true,
"applyDiscountForXFuturePayments": 3,
"subscriptionId": 954874,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [],
"isSuccess": false
}