Refficks partner work in Make
Partner work in Make: be told when something happens in Refficks, and add partners, links and codes from a scenario. Sales still come from your payment provider.
What it gives you
- A scenario in Make that runs when a partner applies, is approved, earns a commission or is paid, among other events.
- Partners, programme places, links and codes made from Make, each in History under the key that made it.
What it does not
- It does not report sales. Sales come from your payment provider or store, which Refficks hears from directly; a sale reported from a scenario as well would count twice, so the key cannot do it.
- Partners it adds arrive as applicants, and approving them, choosing their tier or suspending them is done in Refficks by a person.
- Make switches off a webhook no scenario has used for five days and answers 410 to it. Refficks's deliveries then fail, and an endpoint that keeps failing is paused until you turn it back on in Integrations → Webhooks.
Steps
1. Make a Make key
In Refficks, open Integrations and, on the automation card, press "Make a key for Make". Copy the key it shows: it is shown once, and Refficks keeps only enough of it to recognise.
This key can read partners, programmes, links and money, add partners, add them to programmes, and make links and codes. It cannot report a sale, approve an applicant, choose a tier or suspend anybody, so nothing a scenario does with it changes what a partner is paid.
2. Be told when something happens
In Make, start a scenario with Webhooks → Custom webhook, press Add next to Webhook, give it a name and save: Make shows the webhook's address. If you will check the signature, open Advanced settings and set "Get request headers" to Yes and "JSON pass-through" on, so the header and the body as Refficks sent it reach the scenario.
In Refficks, open Integrations → Webhooks, paste that address, tick the events the scenario should hear about, and add the endpoint. Copy the signing secret it shows once.
Refficks sends only to https:// addresses that resolve to the public internet, and tries a failed delivery five times over about an hour before pausing the endpoint and telling you.
3. Check that a delivery came from Refficks
Every delivery carries an X-Refficks-Signature header, t=<seconds>,v1=<signature>, where the signature is HMAC-SHA256 of "<seconds>.<raw body>" under the signing secret, written in hex.
In Make, take <seconds> and v1 from the header, and compare v1 with sha256(<seconds>.<body>; hex; <signing secret>): given a key as its third argument, Make's sha256 gives the HMAC. Use the body exactly as it arrived, and put a filter after it that stops the scenario when the two differ or <seconds> is more than five minutes old.
4. Add partners, links and codes
In Make, add HTTP → Make a request, with method POST, a header Authorization: Bearer <your key>, and a JSON body.
Send it to https://go.refficks.com/api/v1/server with the key as a bearer token. POST /partners with an email (and a name if you have one) adds a partner, who arrives as an applicant for you to approve in Refficks. Once approved, POST /programs/{program}/partners with partner_id adds them to a programme, and POST /tracking-links or POST /coupon-codes with program_id and partner_id makes their link or code.
A partner added this way sends no "Partner applied" delivery, because nobody applied. Approving them in Refficks sends "Partner approved", which another scenario can listen for to make their link.
A refusal comes back as JSON with error.message saying why, such as an applicant who has not been approved yet.
Sources
Have an account? Open this guide in Refficks for your own script and the checks that show when it is working. New to Refficks? Create an account.