Affiliate coupons: attribute sales by discount code, without a link
How to give each affiliate or creator their own discount code and attribute the sales made with it, through Shopify or WooCommerce, by postback or through the API.
Updated on 9 Nov 2026
In videos, podcasts and on Instagram, a code is easier to share than a link: "use code ANA10". With coupons, the sale made with that code belongs to the affiliate, even if the buyer never clicks a link.
1. Create the code in RastroAff
On the offer's page, under Coupons, pick the affiliate and type the code (3 to 30 letters or digits, no spaces). The affiliate must have approved access to the offer. They see their codes in the portal, under Coupons.
2. Create the same code in your store
The code must also exist in your sales system, with the discount you agreed (for example, 10%). The discount is what makes the buyer use it.
3. Tell RastroAff about sales with a code
- Shopify or WooCommerce: nothing to do beyond the store integration; the order's discount codes are read automatically. See Shopify and WooCommerce.
- Postback: send
coupon=CODEinstead ofclick_id, always with the order'stxn_id:
https://TRACKING/postback?token=TOKEN&coupon=ANA10&txn_id=12345&amount=59.90
- API: the same, with
couponin the request body. See REST API.
If the same code exists on more than one offer, specify the offer with campaign_id.
Link and coupon together
An affiliate can have a link and a coupon at the same time. If the order carries a click ID, the click counts; the coupon covers sales without a click.
Good to know
- Coupon codes spread to discount sites. If a code shows up somewhere you didn't agree to, turn it off on the offer's page.
- Coupon sales show up in the affiliate's reports like any other.