Steps 2 and 3: credentials and notification URL
Your Client ID and Client Secret are in the GoPay merchant portal under API settings. LinkJolt keeps them encrypted and uses them only to read a payment when GoPay notifies it: GoPay's notification carries the payment id, and the payment itself comes from GoPay's API.
The notification URL
https://www.linkjolt.io/api/webhooks/gopay?merchant=YOUR_MERCHANT_ID
What each GoPay state does
PAIDrecorded as a sale for the affiliate in additional_params, pending your approvalREFUNDEDthe commission is reversed and a queued payout cancelledPARTIALLY_REFUNDEDthe commission is left as it is and you are asked to review itAny other statenothing is recorded; an AUTHORIZED payment counts once GoPay reports it PAID
Step 1: the tracking script
<script src="https://www.linkjolt.io/api/tracking.js?id=YOUR_MERCHANT_ID"></script>
Step 4: pass the affiliate
// Read tracking info from the LinkJolt script
const info = window.linkjolt.getTrackingInfo();
// Include in your GoPay payment request
"additional_params": [
{ "name": "tc", "value": info.trackingCode },
{ "name": "aff", "value": info.affiliateId },
{ "name": "cid", "value": info.clickId }
]
Or send one parameter instead of three: name linkjolt_ref, value window.linkjolt.referral. GoPay allows up to four additional parameters of 256 characters each. A visitor who did not come through an affiliate link has no values, and no commission is created.