reserveCoupon()


Method reserves the selected coupon for a limited time (e.g. 24 hours). Upon completing the payment, the coupon is marked as used. Otherwise, the coupon is available again after expiration time.

Parameters:

Name Type Description
publisherToken string Your publisher token. To open enterprise account contact us.
offerId string Offer ID, e.g. S123123123_US
customerEmail string Customer's email
coupon string Coupon code e.g. EN7p8E
reservationTime integer Reservation time in hours (default: 24)

- required parameter

Response Parameters:

Name Type Description
reservation_expires integer Expiration time of the reservation in UNIX timestamp format

Error Codes:

Code Description
13 Coupon code used
17 Invalid coupon code (coupon does not exist)

Request:

[
    {
        "method": "reserveCoupon",
        "params": {
            "publisherToken": "ecD_Yg3psd9q3botBKc2fJP2GL1oF_D1RujQs2cuM-lo2Dyh",
            "offerId": "A758340123_PA",
            "customerEmail": "test@gmail.com",
            "coupon": "EN9p8E",
            "reservationTime": 24
        },
        "id": 1,
        "json-rpc": "2.0"
    }
]

Response:

[
    {
        "result": {
            "reservation_expires": 1512130097
        },
        "id": "1"
    }
]

Remember! you can always check it by yourself using API Console - reserveCoupon()

Back to Subscription Offers


We use cookies to ensure that we provide you the best service and website experience. Read our Cookie policy for more details.