Skip to main content

Update Coupon

Last updated: 04-Jan-2022
Rate this article:


The update_coupon call is used to update a coupon.



Input Parameters

Parameter Description
coupon_code The string value of the existing coupon code. Required.
new_code String value of new coupon code. Optional.
date_expire New expiration date of coupon. (YYYY-MM-DD) Optional.
type Denotes if coupon applies to shipping, sale or product. Required.
percentage_off Percentage, if supplied, to discount from purchase price. (value_off must be NULL, if percentage_off used) Optional.
value_off Decimal value of amount to discount. (percentage_off must be NULL, if value_off used) Optional.
minimum_purchase Decimal value indicating minimum purchase required before discount applies. Required if percentage_off or value_off are specified.
product_id Can accept multiple product_ids in querystring. (i.e. product_id=1112223333&product_id=2223334444) Required for product coupons if select_all is not specified.
select_all Set to 1 to enable. Set to 0 to remove all product assignments. Required for product coupons if product_id is not specified.

Data Returned

Parameter Description
response_code Tells the user whether or not the operation was successful.
response_message Tells the user why the operation was or was not successful.

Example API Call

curl -X POST \
    -H 'Accept: application/json' -u 'username:password' \
    -d 'coupon_code=APIMODIFY002' -d 'date_expire=2099-12-22' -d 'type=sale'

Example Successful Response

       "coupon_code" : "APIMODIFY002",
       "response_code" : "OK",
       "response_message" : "Coupon updated successfully"

Common Error Codes

Code Description
PARAMETER_MISSING Required parameter missing:
PARAMETER_INVALID Invalid value for parameter:
RECORD_NOT_FOUND Unable to find record.
Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo