# Authentication Source: https://docs.getreditus.com/affiliate-program-api/authentication Affiliate Program API - Authentication All API endpoints require authentication via Bearer tokens, which can be obtained from the App Settings, provided your plan includes API access. # Introduction Source: https://docs.getreditus.com/affiliate-program-api/introduction This is the public API documentation for Reditus Affiliate Programs All our API calls use JSON format. ## Allowed HTTPs requests
  PUT     : To create resource
  POST    : Update resource
  GET     : Get a resource or list of resources
  DELETE  : To delete resource
## Server Responses * 200 `OK` - the request was successful (some API calls may return 201 instead). * 201 `Created` - the request was successful and a resource was created. * 204 `No Content` - the request was successful but there is no representation to return (i.e. the response is empty). * 400 `Bad Request` - the request could not be understood or was missing required parameters. * 401 `Unauthorized` - authentication failed or user doesn't have permissions for requested operation. * 403 `Forbidden` - access denied. * 404 `Not Found` - resource was not found. * 405 `Method Not Allowed` - requested method is not supported for resource. # Rate Limits Source: https://docs.getreditus.com/affiliate-program-api/rate-limits Affiliate Program API Rate Limits All endpoints are subject to a rate limit of **100 requests** every **5 minutes**. # List Commissions Source: https://docs.getreditus.com/affiliate-program-api/v1/commissions/index GET /v1/commissions Retrieve a paginated list of commissions # Show Commission Source: https://docs.getreditus.com/affiliate-program-api/v1/commissions/show GET /v1/commissions/{id} Show data for a commission. # List affiliates Source: https://docs.getreditus.com/affiliate-program-api/v1/partners/index GET /v1/partners Retrieve a paginated list of partners. # Show affiliate Source: https://docs.getreditus.com/affiliate-program-api/v1/partners/show GET /v1/partners/{id} Show data for a partner # List Partnerships Source: https://docs.getreditus.com/affiliate-program-api/v1/partnerships/index GET /v1/partnerships Retrieve a paginated list of partnerships. # Show Partnership Source: https://docs.getreditus.com/affiliate-program-api/v1/partnerships/show GET /v1/partnerships/{id} Show data for a partnership. # Create Payment Source: https://docs.getreditus.com/affiliate-program-api/v1/payments/create POST /v1/payments The payments API allows you to add payments for your referrals/leads. If you want to track a one-off payment, just don't specify `subscription_id`, `interval` and `interval_count`. # Show Payment Source: https://docs.getreditus.com/affiliate-program-api/v1/payments/show GET /v1/payments/{id} Show data for a payment. # Churn Referral Source: https://docs.getreditus.com/affiliate-program-api/v1/referrals/churn POST /v1/referrals/churn Marks a referral as churned, so it no longer counts as an active paying referral. Use this when a referral cancels their subscription. Identify the referral by your own `referral_uid`, the referral's `referral_email`, or the Reditus `referral_id` - the same identifiers you use when creating a payment. If the referral pays again afterwards, sending a new payment automatically reactivates it, so no history is lost. # List Referrals Source: https://docs.getreditus.com/affiliate-program-api/v1/referrals/index GET /v1/referrals Retrieve a paginated list of referrals # Show Referral Source: https://docs.getreditus.com/affiliate-program-api/v1/referrals/show GET /v1/referrals/{id} Show data for a referral. # Create Refund Source: https://docs.getreditus.com/affiliate-program-api/v1/refunds/create POST /v1/refunds Marks a commission as rejected based on a refunded payment. Requires a valid `payment_id`. # Delete Subscription (Deprecating) Source: https://docs.getreditus.com/affiliate-program-api/v1/subscriptions/destroy DELETE /v1/subscriptions/{id} Cancels a subscription. # Show Subscription (Deprecating) Source: https://docs.getreditus.com/affiliate-program-api/v1/subscriptions/show GET /v1/subscriptions/{id} Show data for a subscription # Track Conversion (Deprecating) - Use V2 Instead Source: https://docs.getreditus.com/affiliate-program-api/v1/tracking/conversion POST /v1/tracking/conversion The tracking API allows you to track conversions for any affiliate. # Track Conversion Source: https://docs.getreditus.com/affiliate-program-api/v2/tracking/conversion POST /v2/tracking/conversion The tracking API allows you to track conversions for any affiliate. # Get Started Source: https://docs.getreditus.com/affiliate-program/get_started Get Started with the Reditus affiliate program | Step | Description | | ------------------------------------------------ | ---------------------------------------------------------------------------- | | Tracking Script | Check guide [here](/affiliate-program/tracking-script/introduction) | | Signup Snippet | Check guide [here](/affiliate-program/signup-snippet/introduction) | | Connect Stripe | Connect Stripe [here](https://app.getreditus.com/saas/settings/installation) | | Configure your Affiliate Program Settings | Config [page](https://app.getreditus.com/saas/affiliate_program/details) | | | | # Advanced Installation Source: https://docs.getreditus.com/affiliate-program/signup-snippet/advanced_installation Signup Snippet Advanced Installation # Advanced Integration (Stripe or API only) To enhance tracking accuracy, we recommend including an additional parameter in the email. Since email addresses can change over time, having a stable identifier ensures consistency. ## Stripe Integration ### Stripe Customer ID You can use the Stripe Customer ID you receive from the `customer.created` Stripe event, and use it in the Reditus snippet. ``` window.gr("track", "conversion", { email: "actual@email.com", uid: "cus_123456" }); // Use the actual Stripe Customer ID ``` ### Internal User ID Similarly, you can use your own internal ID of the user. After a user signs up on your platform, trigger the `customer.created` Stripe event and include the `user_id` in the metadata—ideally right after the signup snippet. ``` { "id": "evt_1Example1234567890", "object": "event", "api_version": "2023-10-16", "created": 1707859200, "data": { "object": { "id": "cus_1234567890abcdef", "object": "customer", "metadata": { "user_id": "your-internal-customer-id" // Matching is done against this field }, } }, "type": "customer.created" } ``` **Important:** If the signup snippet runs after the customer.created Stripe event, it must happen within **30 seconds** to ensure the Stripe customer is correctly matched with the referral. ``` window.gr("track", "conversion", { email: "actual@email.com", uid: "your-internal-user-customer-id" }); ``` ## API Integration If you’re using the API, ensure you're on **V2 of the Tracking API** and include the `uid` parameter. # Installation Source: https://docs.getreditus.com/affiliate-program/signup-snippet/installation Signup Snippet Installation ## How to install? **Before installing the snippet, ensure that you have already added the tracking script to your page.** The `gr` function is only available if you already installed the Tracking Script. ## Video