Record sales transactions for commission calculation in your affiliate program
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | No | Unique transaction ID (recommended for refund handling) |
amount | number | Yes* | Transaction amount. Partnero calculates commission based on program settings |
reward | number | Yes* | Set the commission amount directly instead of calculating from amount |
amount_units | string | No | Currency code (e.g., USD, EUR, GBP) |
action | string | No | Transaction type (e.g., sale) |
product_id | string | No | Product ID for advanced commission rules |
product_type | string | No | Product type/category for advanced commission rules |
rewarded | boolean | No | Whether the transaction is already rewarded (default: false) |
rewardable | boolean | No | Whether the transaction is eligible for rewards (default: true) |
created_at | integer | No | Unix timestamp to backdate the transaction |
amount or reward.
Customer identification
| Parameter | Type | Required | Description |
|---|---|---|---|
customer.key | string | Yes* | Customer’s unique key |
customer.email | string | Yes* | Customer’s email (alternative to key) |
key or email.
Create customer with transaction (options.create_customer: true)
When the customer doesn’t exist yet, you can create them and the transaction in a single request.
| Parameter | Type | Description |
|---|---|---|
options.create_customer | boolean | Create customer and transaction simultaneously |
customer.name | string | Customer’s first name |
customer.surname | string | Customer’s last name |
customer.tags | array | Tags to assign to the customer |
customer.created_at | string | Customer creation date |
customer.partner.key | string | Partner key for attribution |
customer.partner.id | string | Partner ID for attribution |
customer.partner.email | string | Partner email for attribution |
options.referral_url | string | Referral URL for custom link attribution |
| Parameter | Type | Description |
|---|---|---|
products | array | Array of product objects |
products[].product_id | string | Product ID (required) |
products[].product_price | number | Product price (required) |
| Parameter | Type | Description |
|---|---|---|
transactions | array | Array of transaction objects for bulk creation |
transactions[].amount | number | Transaction amount (required) |
transactions[].key | string | Unique transaction ID |
transactions[].action | string | Transaction type |
transactions[].amount_units | string | Currency code |
transactions[].product_id | string | Product ID |
transactions[].product_type | string | Product type |
transactions[].rewarded | boolean | Already rewarded |
transactions[].rewardable | boolean | Eligible for rewards |
Transaction — data
| Field | Type | Description |
|---|---|---|
key | string | Transaction identifier |
action | string | Transaction type |
amount | number | Transaction amount |
amount_units | string | Currency code |
partner | string | Attributed partner key |
customer | string | Customer key |
credit | boolean | Whether this is a credit transaction |
is_currency | boolean | Whether the amount is monetary |
created_at | string | ISO 8601 timestamp |
deleted_at | string|null | Deletion timestamp if archived/refunded |
Rewards — data.rewards[]
| Field | Type | Description |
|---|---|---|
key | string | Reward identifier (matches transaction key) |
action | string | Reward origin |
status | string | Reward status (ok, review_period, rejected) |
customer | string | Customer key |
partner | string | Partner key |
amount | number | Commission amount |
amount_units | string | Currency code |
is_currency | boolean | Whether the amount is monetary |
credit | boolean | Whether this is a credit reward |
created_at | string | ISO 8601 timestamp |
deleted_at | string|null | Deletion timestamp |
product_type_data | object | Product ID and type (if provided) |
| Status | Error | Solution |
|---|---|---|
| 400 | Customer not found | Create customer first or use options.create_customer |
| 400 | Duplicate key | Transaction with this key already exists |
| 422 | Validation error | Check required fields (amount/reward and customer identification) |