How it fits together
- A buyer signs in with you. How is yours: a code you email them, a password, Discord. Shoply has no part in it.
- Your server, which now knows their email address, asks the API with your key.
- Your page shows what came back.
The key
Give it only what your panel does.Who the buyer is to the store
List customers withsearch set to their address. The search matches part of an address, so take the one whose emailAddress is exactly theirs. Keep its id: everything else asks by it.
Somebody who has never ordered is not a customer yet. Create a customer adds them, and answers the one there is when the address is already known.
Their orders, and what they were sent
Get a customer answers their orders with their balance. For one order in full, get the order: each of itsitems has what was delivered, the license keys in deliveredKeys and your message in deliveryInstructions.
Show a buyer only orders whose email is their own address.
Their balance
balance on the customer is what they can spend at your checkout, and balanceHistory is how it got there. To add to it yourself, for a reward or a giveaway, change the customer’s balance.
An affiliate page
The programme has to be switched on. Its four switches for what an affiliate may do hold here as well: what is off is refused, whoever asks.
A code that is already somebody’s is refused at
code, so your page can say it is taken.
A payout is a request and a record: Shoply sends no money. You pay it yourself and mark it paid, or decline it with a reason, in the dashboard or with answer a payout request.
Links that count
An affiliate’s link is an address of your own site with?ref= and their code. A page that loads shoply.js, the embed or the Checkout Kit notices it and carries it to the checkout, where the buyer’s discount and the affiliate’s commission are worked out. You do not look the code up yourself.

