Create Percentage Discount Coupon
Create a percentage discount coupon.
Post
https://store.payproglobal.com/api/Products/CreatePercentageDiscountCouponRequest Parameters
application/jsonCreatePercentageDiscountCouponRequestModel
objectcouponName
stringrequired
The name of the coupon you want to create.
percentageValue
integerrequired
The value of the percentage discount.
It must be greater than 0 and less than or equal to 100.
It must be greater than 0 and less than or equal to 100.
couponCodes
array[string]required
The coupon codes you want to create.
validFrom
string<date-time>optional
If defined, the date when the coupon will be activated.
validTill
string<date-time>optional
If defined, the date when the coupon will be expired.
productIds
array[integer]optional
The product IDs to which you want to assign the coupon.
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/jsonCreatePercentageDiscountCouponResponseModel
objectresponse
objectcouponId
integerThe ID of the created coupon.
request
objectcouponName
stringThe name of the coupon you want to create.
percentageValue
integerThe value of the percentage discount.
It must be greater than 0 and less than or equal to 100.
It must be greater than 0 and less than or equal to 100.
couponCodes
array[string]The coupon codes you want to create.
validFrom
string<date-time>If defined, the date when the coupon will be activated.
validTill
string<date-time>If defined, the date when the coupon will be expired.
productIds
array[integer]The product IDs to which you want to assign the coupon.
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
{
"couponName": "your_coupon_name",
"percentageValue": 20,
"couponCodes": [
"coupon_code_1",
"coupon_code_2"
],
"validFrom": "2022-12-28T11:19:34.6559308-05:00",
"validTill": "2024-12-28T11:19:34.6559308-05:00",
"productIds": [
12345,
12345
],
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
}
Response Sample
{
"response": {
"couponId": 22222
},
"request": {
"couponName": "your_coupon_name",
"percentageValue": 20,
"couponCodes": [
"coupon_code_1",
"coupon_code_2"
],
"validFrom": "2022-12-28T11:19:34.6559308-05:00",
"validTill": "2024-12-28T11:19:34.6559308-05:00",
"productIds": [
12345,
12345
],
"vendorAccountId": 123456,
"apiSecretKey": "your_api_secret_key"
},
"errors": [],
"isSuccess": true
}