SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester

Affiliates

Credit a sale to a partner, read what is owed, and reverse a refunded one.

Give partners a code, then credit each sale from your checkout. The commission is worked out from their rate and starts as waiting.

Credit a sale

bash
curl -X POST https://app.softsolz.uk/api/v1/services/affiliates/affiliates/commissions \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"code":"ADAREF","subject_type":"invoice","subject_id":"INV-1042","sale_amount_cents":50000}'

Safe to retry

The same subject_type and subject_id can never be credited twice. A repeat call returns already_recorded and leaves the original commission alone, so a retrying webhook cannot cost you money.

Read what is owed

bash
curl "https://app.softsolz.uk/api/v1/services/affiliates/affiliates/commissions?status=approved" \
-H "Authorization: Bearer sk_live_your_key"

A refund reverses the commission

A commission moves waiting to approved to paid, and cannot skip a step. It cannot be quietly reopened or edited either. The one thing that changes a paid commission is a refund: post to /commissions/:id/reverse, or let a full refund on the sale do it for you. It is recorded as reversed rather than deleted, so the history still shows what happened.

Attribute a sale without a code

Most sales are credited from a referral link rather than a typed code. A visitor who follows /ref/<slug> gets a first-party cookie for the window you set, and any contact created while that cookie is live is attributed to the partner automatically. You only need the call above when you are crediting a sale your own systems closed.

Next

Every field in the API Reference, and the walkthrough on docs.softsolz.uk.