Partner Coupons
A 99designs Partner Coupon is a JWT that can be provided to 99designs via URL parameter on specific routes. This token serves as a form of authentication between 99designs and a partner that the incoming request is one that the partner has sanctioned, and contains claims about the request that 99designs can validate and act on.
JWT Specification
A partner coupon is a JWT signed using HMAC-SHA256 with your Partner Coupon key provided by 99designs.
The JWT payload may contain the following claims:
| Key | Name | Description | Purpose |
|---|---|---|---|
iss | Issuer | Identify the issuer of the token. This should be set to the Coupon Key ID provided by 99designs. | Identifies which key was used to sign this token. |
aud | Campaign | Name of the campaign the token relates to. This will generally be provided by 99designs. | Indicates which campaign this token is valid for. |
sub | Subject | Identify the user for which this token relates to. This can be any identifier the partner wishes to provide. | Identifies the subject of the token, but does not block additional uses of this token on redemption. |
jti | JWT ID | Identify a specific token. This can be any unique-per-token identifier the partner wishes to provide. | On redemption this ID is recorded and additional redemptions will not be valid. |
exp | Expiry | Time at which the token is no longer valid. | Tokens will no longer validate past provided time. |
nbf | Not Before | Time before which the token is not valid. | Tokens will not validate prior to provided time. |
Valid token payloads should contain iss, aud,exp, and nbf keys, and should contain one or both of suband jti keys.
API Endpoint
Partner Coupons can also be generated via a REST API call. See Coupon API reference for more information.
URL Parameter
To provide 99designs with a coupon, it should be passed via URL parameter to a supported route on 99designs.com. The URL parameter should have the key pc.
Example
The following examples use the secret API key oY33FvcJBeNtnNEgWE7CWZS0t to sign the token. You can view the example online here.
Payload
{"iss": "EnY2eimDWR","aud": "partner-july-2020","sub": "client@example.com","jti": "WP6345789","exp": 1594432932122,"nbf": 1591840965595}
JWT Token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJFblkyZWltRFdSIiwiYXVkIjoicGFydG5lci1qdWx5LTIwMjAiLCJzdWIiOiJjbGllbnRAZXhhbXBsZS5jb20iLCJqdGkiOiJXUDYzNDU3ODkiLCJleHAiOjE1OTQ0MzI5MzIxMjIsIm5iZiI6MTU5MTg0MDk2NTU5NX0.V5XA7XEHelrZaU1y0_8j53YNKoyzo7lurliIaUzjKTU
Example URL
https://99designs.com/create/partner-coupons?pc=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJFblkyZWltRFdSIiwiYXVkIjoicGFydG5lci1qdWx5LTIwMjAiLCJzdWIiOiJjbGllbnRAZXhhbXBsZS5jb20iLCJqdGkiOiJXUDYzNDU3ODkiLCJleHAiOjE1OTQ0MzI5MzIxMjIsIm5iZiI6MTU5MTg0MDk2NTU5NX0.V5XA7XEHelrZaU1y0_8j53YNKoyzo7lurliIaUzjKTU