Affiliate Partner API
These endpoints require specific permission. Contact your partner manager to confirm eligibility and to obtain or rotate a token.
Partners who cooperate with us through a dedicated promotion discount should use the checkout URL endpoints. Voucher management is for the voucher purchasing service, which lets a partner manage coupon codes they bought.
Base URL
Production: https://www.expressvpn.com/api/v2
Paths are under /partner. For example:
https://www.expressvpn.com/api/v2/partner/subscription/create-checkout-url
Authentication
All Affiliate Partner API requests require:
Authorization: Bearer <partner token>
The partner token is issued privately after you are approved for this integration.
Promotion discount
Generate a checkout URL that applies your dedicated promotion discount:
GET
/partner/subscription/create-checkout-url
Revoke a sale that used your dedicated promotion discount. Pass the postback oid as subscriptionId:
PUT
/partner/subscription/revoke
Get the current postback configuration. The secret key is never returned.
GET
/partner/postback
Create or update the postback URL that receives sale notifications:
POST
/partner/postback
Vouchers
Voucher management is for the voucher purchasing service. It lets you manage the coupon codes you bought.
If you cooperate with us through a promotion discount, use the checkout URL endpoints above.
List the active voucher groups available to your partner account. Use a group's id as voucherGroupId when listing or creating coupon codes:
GET
/partner/subscription/voucher-group
List coupon codes in a voucher group. Results are paginated. Pass cursor from the previous page's nextCursor when hasMore is true. Optionally filter by status:
GET
/partner/subscription/vouchers
Create coupon codes in a voucher group. count defaults to 10 when omitted. Values above 500 are treated as 10. Only one creation can run at a time for a partner token:
POST
/partner/subscription/vouchers
Postback notification
After a qualifying sale, ExpressVPN sends an HTTP request to the url you configured. The request is authenticated with the method (Bearer or Basic) and key you set. The JSON body is:
{
"oid": "subscription_id",
"sharedId": "data4, or ref_id from create-checkout-url, or empty string if missing",
"emailMasked": "masked customer_email",
"currency": "currency",
"items": [
{
"price": "53.08",
"quantity": "1",
"category": "1-month ExpressVPN Team package",
"tier": "",
"sku": "Sell"
}
]
}
| Field | Description |
|---|---|
oid | Subscription ID. Pass this value as subscriptionId when calling revoke. |
sharedId | data4, or an empty string if missing. If the sale was generated from create checkout URL, this is the reference_id (ref_id) you passed on that request. |
emailMasked | Masked customer email |
currency | Currency code |
items[].price | Item price as a 2-decimal string, for example "53.08" |
items[].quantity | Item quantity; defaults to "1" |
items[].category | Product description, for example "1-month ExpressVPN Team package" |
items[].tier | Tier, or an empty string |
items[].sku | Always "Sell" |