Create Affiliate Sale
Creates a conversion and attributes it to a campaign affiliate. Defaults to platform=website; pass platform=ios or android for mobile app sales. Idempotent: sending the same order_id for the same platform returns the existing sale.
platform: website. Pass platform: ios or platform: android to create mobile app sales that show up in iOS/Android analytics (same AffiliateSale rows those dashboards already read).
This endpoint is idempotent: sending the same order_id again for the same platform returns the existing sale with a 201 status code, making it safe for webhook handlers and retry logic.
Attribution Methods
You can attribute the sale using one of two methods:- Affiliate Tag (
campaign_affiliate_id): Use the creator’s unique affiliate tag/code - Growi IDs (
growi_user_id+growi_campaign_id): Use the Growi user ID and campaign ID directly
Request Body
Request Example
Using affiliate tag (website — default):Response Example
201 Created - Sale created successfully (or already exists with same order_id + platform):Response Fields
Error Responses
422 Unprocessable Entity - Missing required fields or invalid attribution:Use Cases
This endpoint is useful for:- Server-Side Conversion Tracking: Report conversions from your backend after a successful checkout
- iOS / Android In-App Purchases: Report mobile payments with
platform: iosorplatform: android(preferred over tracking-events for sales) - Custom Checkout Flows: Integrate with headless commerce or custom payment systems
- Webhook Handlers: Process payment webhooks (idempotent design ensures safe retries)
- CRM Integration: Create conversions when deals close in your CRM
- Manual Attribution: Attribute offline or phone sales to specific creators
- Commission Override: Specify custom commission amounts for special promotions
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Your unique order/transaction identifier
Currency code
usd, eur, gbp Total order amount in cents. At least one of total or subtotal is required.
Order subtotal in cents. At least one of total or subtotal is required.
Conversion platform. Defaults to website. Use ios or android for mobile app sales (organization must have that app connected).
website, ios, android Affiliate tag for attribution (required if not using growi_user_id + growi_campaign_id)
Growi user ID (required with growi_campaign_id if not using campaign_affiliate_id)
Growi campaign ID (required with growi_user_id if not using campaign_affiliate_id)
When the sale occurred (ISO 8601)
When commission becomes due
Customer email address
Customer name
Visitor unique identifier
Type of sale
one_time, subscription Override commission amount in cents
Custom source/sub-ID tag (e.g., instagram, youtube) for platform-level tracking within a single campaign
"instagram"
Response
Affiliate sale created successfully