Time to read: 10 min.

The article covers the following topics:

⚠️ The Promo codes feature is available only for certain plans. Contact your Affise account manager to get the feature.

What is a Promo Code?

Promo code (coupon, vanity code, discount code, referral code) is a code generated for an affiliate to track the campaign performance without the usage of the tracking URL. However, the tracking link can be used in some specific flows. Basically, a promo code contains a set of symbols, generated and given by you to your affiliate, who places it on his sources. The end-user gets this code (whenever possible, not even on the affiliate's sources), goes to the offer page, makes a conversion. As the tracking link is not necessary in most cases, the conversion is attributed to the offer and the affiliate by this very code.

Promo code is an integral part of e-commerce. If you're engaged in e-commerce, we recommend you to try this feature out!

How to Work with Promo Codes In Affise?

Promo codes settings are located in Offers section -> Offers settings -> Promo codes tab.


To start working with promo codes in Affise you need to get permissions to a particular offer. Go to Users section -> User Management -> A particular user:

  • Offers flag in Sections:

  • Write access to Advertisers editing. You need to have such a level of access for the advertiser, whom the offer belongs to in order to be able to edit this offer:

  • Write access to Affiliates editing to generate a promo code for a particular affiliate:


Promo Codes Settings

Promo codes tab in the offer look like:

To create a promo code, click Add code button.



  • Promo code type: at the moment, only manual type of promo code generation is available. We're working on the auto generation that will make the generation process easier and more flexible.

  • Promo code: add a promo code. Usually the code is given by your advertiser. Symbols requirements: from 3 to 36, a-z, A-Z, 0-9 -_. {}+=/:~. It is not possible to save two same promo codes with different case (uppercase & lowercase), otherwise the following error message will occur: The promo code's value you're trying to add is already used for other offer or affiliate. Re-check your code. The mandatory field.

  • Affiliate: choose an affiliate you would like to give the promo code to. It is possible to choose only one affiliate. The mandatory field.

  • Description: write a description for this promo code. This description will be shown in the Affiliate panel. Use up to 140 symbols.

  • Start date: the date when the promo code becomes active. Today's date is set by default. The mandatory field.

  • End date: the date when the promo code becomes invalid. The default end date is set as today's date + 7 days. The mandatory field.

❗ If the conversion comes with the promo code which lifespan is expired, it will be declined with the comment [Promo code is expired]

  • Usage: the number of conversion you would like to receive with this particular promo code. When the limit is exceeded, the system stops receiving conversions with this promo code. You'll see a relevant error in Server postbacks slice of Statistics.

❗ Only conversions of Approved, Pending and Hold statuses are counted in the Usage limit.

There is the limit of 5 000 000 promo codes per all the offers in the Admin panel.

One affiliate should have only unique promo codes within one or more offers. One promo code should not be used for several affiliates within one or more offers.

❗ It is not possible to edit the promo code itself and the affiliate. If you want to change the affiliate for a particular promo code, you need to delete it and to create a new one.

In the promo codes list, you can see a progress bar in 'Usage' column:

The progress bar is updated in real time. If you delete the promo code, but then create a new one (absolutely the same) - the progress bar will be reduced to zero. If the promo code doesn't have a limit for conversions, you'll see 'No limit' message, however once the first conversion comes, the progress bar will depict the number of conversions.

Promo codes import

If you have many promo codes, it might be difficult to add them one by one. Instead, you can import them with the help of the .CSV file.

To start the import, in the list of promo codes in the offer, click Import code. An import window appears.

Promocodes _ Rocketcompany - Google Chrome 2022-02-09 at 12.38.54 PM

The requirements:

  • The .CSV format of the uploaded file.

  • The data must have the semicolon ( ; ) or a comma ( , ) separator.

❗ If after the import you see the data aggregated into one column, it means the wrong separator was used while importing. You will need to delete the imported promocodes and upload them in the right format.

  • Each type of data must be indicated in a separate column in the file.

  • The file must contain two mandatory types of data: affiliate ID and the promo code value. All other values are optional:

    • Description

    • Period from: if you don't upload this data, it is the import date. Format: YYYY-MM-DD.

    • Till: if you don't upload this data, it is the import date + 7 days. Format: YYYY-MM-DD.

    • Usage

Select the Import with headers flag, if you have a header (name) for each type of data in the very first row, in the file. Once the flag is checked, the import is carried out starting from the second row.

Click Choose file to upload the file from your device and pick up the needed file. A matching window appears.

  • The From your file column stands for values arranged in columns in the .CSV file.

  • The In our system column stands for the type of data in Affise, in the offer settings.

You need to match values in the .CSV file and types of data in Affise. The system takes the data from columns one by one.

Click Approve column to confirm that values to the left are considered as the selected type of data.

Click Exclude column if you want the system to ignore the values in column.

Once you're ready with matching, you can either to review the matching or approve the arrangement of values by the type of data.

Click Create ... new rows to start importing promo codes. Click Back if you want to change the arrangement of the coloumns.

The progress bar for the file uploading is shown. You can interrupt the uploading by clicking the cross icon.

Once the file is uploaded, the system starts importing values. Then you see how many promo codes are uploaded.

Promo codes import via API

You can easily import promo codes using the following API POST request:


POST /3.1/offers/promocodes/bulk

The example of promo codes bulk creation via cURL request:

curl --location --request POST 'https://api-rocketcompany.affise.com/3.1/offers/promocodes/bulk' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'api-key: 0a245fefb75f40dc9bb29961d271b69b' \
--data-urlencode 'promocodes[0][type]=manual' \
--data-urlencode 'promocodes[0][code]=qwerty' \
--data-urlencode 'promocodes[0][offer_id]=112233' \
--data-urlencode 'promocodes[0][affiliate_id]=8022' \
--data-urlencode 'promocodes[0][date_from]=2022-04-21T00:00:00Z' \
--data-urlencode 'promocodes[0][date_to]=2022-04-30T00:00:00Z'

Tracking Process and Promo codes

As in most cases the flow with promo codes doesn't suppose the usage of the tracking URL, there is no click ID value. The question arises: how does Affise attribute the conversion? The answer is simple: by the promo code itself. The process of conversions tracking has some peculiarities and limits that you will read below.

Despite the above mentioned sometimes the tracking URL is used together with the promo code. So basically there are three scenarios:

  • Affise received the conversion with the promo code only (no tracking URL was used).

  • Affise received the conversion with the promo code and click ID.

  • Affise received the conversion with the click ID only, but there is a promo code in the relevant offer.

Conversions With the Promo Code Only

To attribute the conversion correctly you need to add the parameter &promo_code= either to the Affise postback link or a pixel. It is not needed to use the parameter for the click ID, nor the macro for the advertiser's tracking URL.

❗ The value passed via this parameter is case insensitive. It means 'Promocode' and 'promocode' values will be pervieced equally, however in Conversions slice of Statistics you'll see the promocode in the form as it was passed via the postback link. For instance: you have 'Promocode' value in the offer. The advertiser sent you 'promocode' value. It will be assigned to the right offer, but in Conversions slice of Statistics you'll see 'promocode' as well.

Also &secure= parameter is mandatory as the obligatory secure measure. This parameter is responsible for a secure postback code, which must be generated for the relevant offer/advertiser or for the whole platform. Here you can read more about this option.

Once the system received the postback, it checkes whethere there is a promo code in the postback link. If so, the system looks for an offer with this promo code. Once it is found - the affiliate is found as well since the rule '1 promo code = 1 affiliate' is met. Thus the system determines which offer and affiliate the conversion belongs to.

Possible errors in Server postbacks slice of Statistics:

  • "status": 2,"message": "Promo code usage limit is reached": the limit for conversions set up in the Usage field in the promo code settings is exceeded.

  • "status": 2, "message": "Promo code 12345sgjk6 not found": the system can't find the promo code received in the postback.

  • "status": 2, "message": "Secure is required when promo code is sent": there is not &secure= parameter in the postback link in case if there is a promo code in the relevant offer/advertiser's profile.

❗ Don't miss the last error with the error message 'Access denied': this error means there is no secure postback code in the postbacks, but the click ID was used in the flow in this situation.

In this scenario the following fields in Payouts in the offer are ignored (as if there were no restrictions at all):

  • country

  • cities

  • devices

  • os

  • sub1-sub8

Why so: relevant information is taken from the click. There is no click at all in such a flow, so there is no way to know this data. Even though there is &ip= parameter for the Affise postback link, the data you receive in it doesn't influence conversion's GEO.

The only things which the system uses to select a payout are the affiliate ID (whether there is a personal payout) and a goal value.

Here you can read more about payouts selection.

Conversions With the Promo Code and Click ID

Sometimes the flow requires the usage of the tracking URL. In this case nothing changes in the very process of clicks tracking. You need to give your Affise tracking link to the affiliate (or the affiliate takes it on the Affiliate panel). Your advertiser gives you his tracking URL, where you should use {clickid} macro to pass the click ID value.

As for conversions: it will be attributed by the click id value. It means you need to add &clickid= parameter to Affise postback link. It looks like a ordinary S2S integration, but together with the above mentioned parameter you also should add &promo_code= parameter. No need to add &secure= parameter - it is not obligatory. However, you can always use the secure postback code if you want.

Once the system received a conversion, it checkes whethere there is a click ID value. Then the click/offer/advertiser and other data will be found. In this case the promo code influences nothing, but the Statistics - you'll see it in Server postback & Conversions slices.

Possible errors in Server postbacks slice of Statistics:

  • "status": 2,"message": "Promo code usage limit is reached": the limit for conversions set up in the Usage field in the promo code settings is exceeded.

  • "status": 2,"message":"Broken clickid": you've received the wrong click ID. Here you can read more about this errors and others, which you can face.

Conversions With Click ID Only

This is the classic S2S integration which you can read about here and here.

Once the system received a conversion, it checkes whethere there is a click ID value. Then the click/offer/advertiser and other data will be found. If the offer actually contains a promo code, it won't be depicted anywhere.

How to Pass a Promo Code to the Affiliate?

You can pass the promo code to the affiliate either via his postback or their pixel. Use {promocode} macro.

It is possible to use the same macro for a cross-postback URL as well.

Promo Codes in Affiliate Panel

Promo codes are visible in Affiliate panel on the page with offer details in the Offers section only for offer the affiliate has access to.

The following information about the promo code are shown:

  • The promo code itself

  • Its description

  • The lifespan (start date-end date)

  • The limit for conversions


1) How can I change the affiliate for a certain promo code?

The only way is to delete the code and to create a new one for a needed affiliate. The progress bar for a conversions limit will be reduced to zero.

2) How are caps in the offer and limit for conversions per a promo code correlated with each other?

Cap in the offer has a priority over the limit per a promo code. Let's suppose the limit of conversion is 300 for the affilite #1 and 10 for the affiliate #2. The offer has the following cap rules:


Once the affilite #1 reaches 100 conversions, others will be declines with the comment [Cap is reached] despite there is the bigger limit for his promo code.

Once the affiliate #2 reaches 10 conversions, others will not be registered at all: you'll see the "Promo code usage limit is reached" error message in the Server postbacks slice of Statistics.

The same logic is applied for any timeframe/type/goal/countries/affiliate settings.

3) What are the mandatory parameters for the Affise postback link if I want to receive a promo code without a click ID?

There are two mandatory parameters:

  • &promo_code= for a code itself

  • &secure= for a secure postback code as the obligatory secure measure

4) Why does the system ignore payouts when I receive a conversion with a promo code?

The system ignores such payouts settings as countries, cities, devices, oses and sub values only when you receive a conversion with a promo code withou a click ID.

It happens, because all the above mentioned data is taken from a click initially. As there was no click, it is not possible to define a device or a sub value.

5) Why don't I see the advertiser in the 'Advertiser' column in Server postbacks, if I use the flow with the promo code only?

It is not possible to define an advertiser of the offer on this stage (postback receiving).

However you'll see the advertiser in Conversions slice of Statistics.

6) How is the conversion uniqueness determined?

When the flow with the promo code only is used, the uniqueness is determined only by the promo code as no click ID is received.

However if the advertiser passed his action ID (the unique conversion ID on his side) via &transaction_id= parameter, conversions with individual action IDs are consideres as unique.

Here you can read more about how Affise defines clicks/conversions uniqueness in the flow with click ID usage.

7) Can I find all conversions with a certain promo code?

Yes. Go to Statistics -> Conversions slice and use the relevant filter:

Both uppercase and lowercase are taken into account while filtering.

8) Why I have not all promo codes imported to the system compared with the file?

There is the limit of 5 000 000 promo codes per all the offers in the Admin panel. If you try to upload more promo codes, the system lets add promo codes within the limits. The rest is ignored.

Also, if you try to upload promo codes for affiliates, who aren't connected to the offer, they won't be uploaded.

You may also find the following articles helpful:

If you still have any questions left on Affise Promo Codes set up, feel free to address them to Affise Technical Support Team via [email protected] as long as to contact your Dedicated Account Manager.

Did this answer your question?