Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Comissions
  • Campaigns
    • Get All Campaigns
      GET
    • Get Campaign By ID
      GET
    • Create campaign
      POST
    • Update campaign
      PUT
    • Delete campaign
      DELETE
  • Affiliates
    • List affiliates
      GET
    • Get Affiliate By ID
      GET
    • Create Affiliate
      POST
    • Update Affiliate
      PUT
    • Delete Affiliate
      DELETE
  • Affiliate Links
    • Get Affiliate Link By Affiliate ID
      GET
    • Create Affiliate Link
      POST
    • Delete Affiliate Link
      DELETE
  • Comissions
    • Get All Commissions
      GET
    • Get Commission By ID
      GET
    • Create Commision
      POST
    • Update Commision
      PUT
    • Delete Commision
      DELETE
  • Referred Users
    • Get All Referred Users
      GET
    • Get Referred User by Email
      GET
    • Create Referred User
      POST
    • Update Referred User
      PUT
    • Delete Referred User
      DELETE
Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Comissions

Create Commision

POST
/commissions
Last modified:2025-12-30 08:57:30
Creates a new commission record for an affiliate referral under a specific campaign.
This endpoint records the commission amount earned by the affiliate, the amount earned by the admin, the current commission status, and related metadata such as the referred user and commission date.

Commission Status#

pending – Commission is created but not yet processed
processing – Commission is due and under processing
paid – Commission has been successfully paid
refunded – Commission has been reversed or refunded

Request

Header Params

Body Params application/json

Example
{
    "campaignId": "a4845c6c-297b-4e1f-92d6-db7ca2ac5200",
    "affiliateId": "d3a1153d-cb87-4644-8429-7ecf1a7c3257",
    "referredUser": "user@example.com",
    "amount": 50.00,
    "adminEarnedAmount": 5.00,
    "status": "pending",
    "commissionDate": "2025-01-15T00:00:00.000Z",
    "remarks": "Manual commission for referral"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/commissions' \
--header 'x-auth-referralstack: rs_live_e6761c15744c9be53be18802278fd3da751d03ce' \
--header 'Content-Type: application/json' \
--data-raw '{
    "campaignId": "a4845c6c-297b-4e1f-92d6-db7ca2ac5200",
    "affiliateId": "d3a1153d-cb87-4644-8429-7ecf1a7c3257",
    "referredUser": "user@example.com",
    "amount": 50.00,
    "adminEarnedAmount": 5.00,
    "status": "pending",
    "commissionDate": "2025-01-15T00:00:00.000Z",
    "remarks": "Manual commission for referral"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "status": 201,
    "message": "Commission created successfully",
    "data": {
        "commissionId": "25e187c1-d732-4d7e-9245-a52253f65a7e",
        "campaignId": "a4845c6c-297b-4e1f-92d6-db7ca2ac5200",
        "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
        "affiliateId": "d3a1153d-cb87-4644-8429-7ecf1a7c3257",
        "referredUser": "user@example.com",
        "amount": "50.00",
        "adminEarnedAmount": "5.00",
        "status": "pending",
        "createdAt": "2025-12-30T03:00:04.440Z",
        "updatedAt": "2025-12-30T03:00:04.440Z"
    }
}
🟠400Bad request (Missing Values)
🟠401Unauthorized (Missing API Key)
Modified at 2025-12-30 08:57:30
Previous
Get Commission By ID
Next
Update Commision
Built with