Register Your First Conversion
A conversion is an action that generates revenue or a positive outcome for your business, such as a product sale, subscription sign-up, or other valuable event. When a customer referred by a SoyCap.io affiliate completes a conversion on your site, it’s essential to register this event in SoyCap.io to attribute the conversion to the correct affiliate for rewards. Although you can register conversions manually on the SoyCap.io Dashboard, we recommend automating the process using the SoyCap.io API.
Manual Conversion Registration
If you know the campaignId
and referralId
associated with conversion event, you can manually register the conversion on the SoyCap.io Dashboard. This approach is ideal for testing, initial setup, or smaller campaigns with a few known affiliates, allowing you to skip API integration.
To register a conversion manually:
- Go to the specific campaign by
campaignId
via affiliate attribution. - Open the Referral Links tab.
- Locate the referral link with the corresponding
referralId
. - Click Register Conversion.
- Enter the following details:
- Reward (USDC): The USDC reward amount to be distributed to the affiliate.
- Gross Revenue (USDC): The business value or revenue generated by this conversion. This optional parameter can help calculate ROI and track campaign performance.
- Click Sign and Register to confirm the transaction using your Phantom Wallet.
After confirmation, note the updated referral link details:
- Conversions Total: Increased by one.
- Rewards Pending: Updated to reflect the newly registered conversion.
Programmatic Conversion Registration
For larger campaigns with many affiliates and conversions, automating conversion registration via your backend is essential. You can find full details on using the SoyCap.io API and @solana/web3.js
for programmatic registration in our Developer documentation. Here’s a quick overview:
- In the Merchant Dashboard, go to the Dev Tools tab to Get Merchant API Key, also known as
api_key
. - Create a keypair from the Phantom Wallet used to create the campaign. We recommend to use a dedicated Phantom wallet for each merchant so you can share same
keypair
across all merchant campaigns. - On your backend server:
- Authenticate Merchant with the
api_key
via the/api/merchants/authenticate
endpoint to receive an authentication token, orauth_token
. - Extract
referralId
from the user’s affiliate attribution. - Call the
/api/conversions/onchain/create/
endpoint withauth_token
,referralId
, andrewardAmountUSDC
to get transaction details for registering a conversion. - Construct the blockchain transaction using the transaction details from the previous step with the
@solana/web3.js
library. - Send and confirm the transaction with the
keypair
using@solana/web3.js
. - Optionally, store the conversion details in your database for future reference and payout automation.
- Authenticate Merchant with the