Refficks

Refficks partner work in n8n

Partner work in n8n: be told when something happens in Refficks, and add partners, links and codes from a workflow. Sales still come from your payment provider.

Nobody has walked these steps against a real n8n setup yet. They are built from the provider's documentation, listed at the bottom of this page.

What it gives you

  • A workflow in n8n 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 n8n, 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 workflow 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.
  • A self-hosted n8n must be reachable at a public https:// address. Refficks will not send to http://, to a private address or to anything behind a firewall, and the endpoint form says so when you try.

Steps

These are the steps as they read inside Refficks. Where one says “below”, it means this guide's page in Refficks, where your own script, addresses and checks are.

  1. 1. Make a n8n key

    In Refficks, open Integrations and, on the automation card, press "Make a key for n8n". 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 workflow does with it changes what a partner is paid.

  2. 2. Be told when something happens

    In n8n, start a workflow with a Webhook node, set its HTTP Method to POST, and copy its Production URL. n8n listens there once the workflow is published; the Test URL only answers while you are listening for a test event.

    In Refficks, open Integrations → Webhooks, paste that address, tick the events the workflow 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. 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 n8n, turn on the Webhook node's Raw Body option so the body arrives as sent. Add a Crypto node with the action Hmac, Type SHA256 and Encoding HEX, whose Value is <seconds>, a full stop and the raw body, using a Crypto credential whose Hmac Secret is the signing secret. An IF node then compares the result with v1 from the x-refficks-signature header and stops the workflow when they differ or <seconds> is more than five minutes old.

  4. 4. Add partners, links and codes

    In n8n, add an HTTP Request node with Method POST, Authentication set to Generic Credential Type and Header Auth (name Authorization, value Bearer <your key>), and Send Body on, as JSON.

    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 workflow 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.

More in Automation platforms