comecerodocs

List payment commissions

GET
/payments/{payment_id}/commissions

Lists the commissions earned on a payment. An offset-based list. sort_by takes date_created (the default) or date_modified. Secret and trusted tokens that may read commissions only; a limited token gets 403.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

payment_id*string

The id of the payment.

Query Parameters

type?"product_sales"

Only commissions of this type.

Value in"product_sales"
accounting_id?string

Read and checked, but not used to filter.

limit?integer

How many items to return on one page, from 1 to 100. The default is 100. A value outside 1 to 100, or one that is not a whole number, is a 400.

Range1 <= value <= 100
Default100
offset?integer

For offset-based lists, how many items to skip before the page starts. Use next_page_offset or previous_page_offset from the page you have. A value that is not a whole number is a 400.

Range0 <= value
Default0
sort_by?string

The field to sort by.

Default"date_created"
Value in"date_created""date_modified"
desc?boolean

Sort in descending order (newest, largest or last first) when true. The default is false. A value other than true or false is a 400.

Defaultfalse
show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The commissions on the payment.

application/json
  1. response

An offset-based list of the commissions on a payment.

total_items*integer

The number of items in the whole list.

total_pages*integer

The number of pages.

current_page*integer

The page number of this page, starting at 1.

next_page_url*|

The URL of the next page, or null on the last page.

Formaturi
next_page_offset*|

The offset of the next page, or null on the last page.

previous_page_url*|

The URL of the previous page, or null on the first page.

Formaturi
previous_page_offset*|

The offset of the previous page, or null on the first page.

current_page_url*string

The URL of this page.

Formaturi
data*array<>

The commissions on this page.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/payments/string/commissions'
Example Response
{  "total_items": 1,  "total_pages": 1,  "current_page": 1,  "next_page_url": null,  "next_page_offset": null,  "previous_page_url": null,  "previous_page_offset": null,  "current_page_url": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/commissions?offset=0&limit=10",  "data": [    {      "object": "commission",      "url": "https://api.comecero.com/api/v1/commissions/1102611073852CMr8Wd1Nh",      "commission_id": "1102611073852CMr8Wd1Nh",      "date_created": "2026-11-07T14:32:10Z",      "date_modified": "2026-11-07T14:32:10Z",      "test": true,      "total": 99.95,      "currency": "USD",      "type": "product_sales",      "description": null,      "transaction_type": "payment",      "transaction": "https://api.comecero.com/api/v1/payments/1102611073840PAz3Tq9Xc",      "accounting_id": "C-AB1234P261130USD"    }  ]}

Capture a payment POST

Takes the money of a `pending` (authorized) payment. To capture it all, send no body at all: a JSON body without `total` (even `{}`) captures nothing and records a refund of the whole payment. Send a `total` to capture less; the rest is recorded as a refund. The payment becomes `completed` and its order is updated. Only card, PayPal, Amazon Pay, Apple Pay, Comecero Express Payments and wallet payments can be captured. A payment that is not `pending` is `422`. Secret and trusted tokens that may create or update payments only; anything else gets `401`.

Commit a payment POST

Finishes an `initiated` payment once the shopper has done their step: approved at PayPal or Amazon Pay, passed a 3-D Secure check, or confirmed in Stripe.js. The amounts are worked out again from the cart or invoice first, so a changed shipping or tax is charged. On success the cart or invoice closes, the order is made, events fire and the receipt goes out. If a PayPal total went up too much since approval, the payment stays `initiated` with a new `response_data.redirect_url` for the buyer to approve again. Two commits at once (the shopper's browser and the provider's webhook) run one after the other, and the second gets the first one's result. A payment that is already `pending` comes back as it is. A `completed` or `cancelled` payment is `422`. The Comecero-hosted 3-D Secure page commits the payment itself, so get the payment first and commit only while it is `initiated`. Any token type may call it, a limited token too, for any payment of the account: a shopper may come back in another browser. A limited token that is not bound to the payment gets only `object`, `payment_id`, `success`, `status`, `payment_method.type` and `response_data.redirect_url`. A token that may not create or update payments gets `401`. The body is optional.