Skip to main content
Transaction tracking is essential for calculating partner commissions. When a referred customer makes a purchase, Partnero needs to be notified to properly reward the partner.

Integration Options

The easiest way to track transactions is by connecting your payment gateway. Partnero handles everything automatically, including:
  • Transaction creation on successful payments
  • Refund handling and commission adjustments
  • Subscription renewals and recurring payments
Supported payment gateways:

API Transaction Tracking

For custom integrations or when payment gateways aren’t suitable, use the REST API:
POST https://api.partnero.com/v1/transactions

Basic Example

{
  "customer": {
    "key": "customer_123"
  },
  "key": "transaction_123",
  "amount": 99.99,
  "action": "sale"
}
The customer.key must match the key used when the customer was created in Partnero.

With Product Information

Include product details for advanced commission rules:
{
  "customer": {
    "key": "customer_123"
  },
  "key": "transaction_456",
  "amount": 199.99,
  "amount_units": "USD",
  "product_id": "enterprise_plan",
  "product_type": "annual",
  "action": "sale"
}

Creating Customer and Transaction Together

Use options.create_customer to create both in one request:
{
  "key": "transaction_789",
  "amount": 49.99,
  "action": "sale",
  "options": {
    "create_customer": true
  },
  "customer": {
    "key": "new_customer_123",
    "email": "[email protected]",
    "partner": {
      "key": "ref_123"
    }
  }
}

Handling Refunds

When a refund or chargeback occurs, delete the transaction to adjust partner commissions:
DELETE https://api.partnero.com/v1/transactions/transaction_123
Always include a unique key when creating transactions so you can easily reference them for refunds.

Commission Calculation

Partnero automatically calculates partner commissions based on your program settings. You can configure:
  • Percentage-based commissions (e.g., 20% of sale)
  • Fixed amount commissions (e.g., $10 per sale)
  • Product-specific rates using product_id and product_type
  • Tiered commissions based on performance
Commission settings can be adjusted in your program dashboard without modifying your integration.

Best Practices

Always provide a unique key for each transaction (like your order ID) to enable refund handling.
Set amount_units to the currency code (USD, EUR, GBP) for accurate multi-currency reporting.
Use product_id and product_type to enable product-specific commission rules.
Implement retry logic for API failures to ensure no transactions are missed.

Next Steps