Skip to content
StraventaDocs
Now in Sandbox.

Set the tenant's commission rate table

PUT
/v1/marketplace/commission

APPLIES TO NEW ORDERS ONLY. Orders already placed keep the rate they were placed at — the rate and the amount are snapshotted onto the order row, so a tenant raising its rate cannot reprice a sale a seller already accepted. overrides IS THE COMPLETE DESIRED SET, not a patch: a merchant holding an active override and absent from the array has it CLEARED. That is what the console's clear-override button sends. A rate of 0 also clears — "no row" and "a row that says zero" charge the same commission and only one of them is a thing an admin can see. Writing a rate writes a platform_fee_schedules row at (marketplace, order_captured_tenant_commission, merchant_id); marketplace_sellers.commission_bps is the console's editor for that row, NOT a second price source. Each write supersedes — it closes the active row and inserts a new one effective now — rather than updating in place, so the schedule history an invoice is reconciled against is never rewritten. Range is 0 to max_commission_bps inclusive; outside it is 400 invalid_commission_bps. So is a merchant named twice in one body: two rows for one merchant is two prices for one thing, and last-wins would make the stored rate depend on JSON array order. The BUYER-FACING PRICE DOES NOT CHANGE. A commission is charged to the seller and is never added to the basket. Permission marketplace.order.write at marketplace:sellers. A merchant owner is READ-ONLY on this surface everywhere and gets 403 here — enforced by the resource, not by a disabled input in the console.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://sandbox.505pay.link/v1/marketplace/commission" \  -H "Content-Type: application/json" \  -d '{    "overrides": [      {        "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",        "commission_bps": 0      }    ]  }'
{
  "default_commission_bps": 0,
  "overrides": [
    {
      "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
      "display_name": "string",
      "commission_bps": 0,
      "effective_from": "2019-08-24T14:15:22Z",
      "effective_to": "2019-08-24T14:15:22Z"
    }
  ],
  "enabled": true,
  "max_commission_bps": 0,
  "seller_mode": "tenant_only"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "rate_limit_exceeded",
  "message": "too many requests",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}

Was this page helpful?