What you get
One entry per merchant:Before you start
You need four values. All of them come from your Fluz account.Run the feed
- PHP
- curl
Save this as
fluz-feed.php, paste your four values at the top, and run php fluz-feed.php. It writes fluz-feed.json next to the script. Needs PHP 7.4 or newer with the curl extension.fluz-feed.php
Check it
- Open
fluz-feed.jsonand check that it lists merchants with rates. - Open one
linkin a private browser window. It should land on that merchant’s page on fluz.app. - Check that the code at the end of the link matches your referral code exactly, including uppercase and lowercase letters. A wrong code shows no error, and the signup isn’t credited to you.
Keep it current
- Run the script once a day, for example from cron. Fluz updates the catalog twice a day, and rates change often.
- The access token is short-lived. The script gets a new one each time it runs, so you never have to manage it.
- Merchant slugs don’t change when rates change, so links you’ve already published keep working.
If it doesn’t work
Error verifying API basic token
Error verifying API basic token
The API Key isn’t accepted. Check that:
- You created the application at fluz.app/for-developers, not in the sandbox.
- You pasted the API Key whole, exactly as shown. Don’t encode it again.
- The key wasn’t regenerated. A regenerated key replaces the old one right away.
- The User ID and Account ID come from the same application as the key.
The feed has merchants but a rate of 0
The feed has merchants but a rate of 0
Some merchants have no rate at the moment. Skip them on your site, or show them without a rate. They are back in the feed when a rate returns.
Signups from my links aren't credited to me
Signups from my links aren't credited to me
Credit is given only when the person creates a new Fluz account in the same browser where they opened your link. Check that your referral code in the link matches your code in Fluz exactly. See How referral credit works.
The script stops partway through
The script stops partway through
The script stops on any error and prints the response from Fluz. Run it again. If the same error repeats, send that message to your Fluz contact.
More detail
- Referral links: every link format, and how referral credit works
- Get catalog: every field and filter on
getMerchants - API credentials: how access tokens work