Skip to main content

Apply Discount

Apply the discount to the existing subscription.

Request Parametersapplication/json
ApplyDiscountRequestModel
object
discountValue
number
The value of the discount you want to apply.
isPercentage
boolean
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.
applyDiscountForAllFuturePayments
boolean
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.
subscriptionId
integer
required
The subscription ID that needs to be updated.
vendorAccountId
integer
required
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
apiSecretKey
string
required
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.
Response Parametersapplication/json
ApplyDiscountResponseModel
object
request
object
discountValue
number
The value of the discount you want to apply.
isPercentage
boolean
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.
applyDiscountForAllFuturePayments
boolean
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.
subscriptionId
integer
The subscription ID that needs to be updated.
vendorAccountId
integer
The vendor account ID identifies your PayPro Global account.
It can be found in Account settings > Business info.
apiSecretKey
string
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.
errors
array[object]
propertyWithError
string
propertyErrorMessages
array[string]
isSuccess
boolean
Request Sample
{
"discountValue": 1.0,
"isPercentage": true,
"applyDiscountForAllFuturePayments": true,
"subscriptionId": 954874,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"request": {
"discountValue": 1.0,
"isPercentage": true,
"applyDiscountForAllFuturePayments": true,
"subscriptionId": 954874,
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
},
{
"propertyWithError": "orderId",
"propertyErrorMessages": [
"Error message 1",
"Error message 2"
]
}
],
"isSuccess": false
}