How it works
- Fluz approves your target account, sets the spend account the rewards land in, and allowlists your app.
- The user authorizes your app. Your app calls
createRewardsSweepConnectionwith the user’s access token and your target account ID. - Once each New York calendar day, Fluz moves the user’s full available rewards balance into your target spend account.
- To stop, your app calls
deleteRewardsSweepConnectionwith the user’s access token.
Only available rewards are swept.The sweep takes the spendable rewards balance at the moment it runs. Pending or locked rewards stay on the source account until a later sweep picks them up. Nothing is held in advance: the user can spend their rewards normally until the sweep runs.
Before you start
Contact your Fluz account manager to:- allowlist your app for rewards sweep
- register your target account and the spend account the rewards should land in
Connect an account
CallcreateRewardsSweepConnection with the user’s access token. The source account always comes from the token. Pass your target account ID, not a spend account ID.
- A source account can be connected to one target at a time.
- Calling create again with the same target is safe. It returns the existing connection.
- Calling create with a different target fails while a connection exists. To change targets, disconnect first, then connect to the new target.
- The source and target must be different accounts.
- Fluz can also create a connection for an account from its dashboard. That connection behaves the same way and can be removed with
deleteRewardsSweepConnection.
Disconnect an account
CalldeleteRewardsSweepConnection with the user’s access token. It takes no input. It removes the connection for the account on the token.
disconnected is false when the account had no connection. That is not an error, so the call is safe to repeat.
If you disconnect after the day’s sweep is scheduled but before the money moves, that day’s sweep is cancelled and nothing is debited.
Sweep behavior
What the accounts see
Each sweep is one account-to-account transfer. It appears in both accounts’ activity with the description Rewards transfer.Checking a connection
There is no query to read a connection or past sweeps today. Store the connection on your side from thecreateRewardsSweepConnection and deleteRewardsSweepConnection responses. Confirm sweeps from the target account’s transaction activity.
Errors
Failures use the standard GraphQL error envelope.
A missing, invalid or expired access token is rejected before GraphQL runs and returns an HTTP error, not a GraphQL error. See Authentication.