Skip to content
Coritan Docs

Organization API: Billing & Payouts: Commerce

The 5 Organization API operations for commerce.

View as Markdown

Part of Billing & Payouts.

Method Path Summary
GET /api/v1/orgs/{org_slug}/commerce/affiliates/payouts The payouts the merchant recorded, newest first, for one affiliate or all of them
POST /api/v1/orgs/{org_slug}/commerce/affiliates/{affiliate_id}/payouts Record a payout the merchant made; the referrals it names become paid
GET /api/v1/orgs/{org_slug}/commerce/payouts List payouts
POST /api/v1/orgs/{org_slug}/commerce/payouts Ask for the payable balance in a currency now
GET /api/v1/orgs/{org_slug}/commerce/payouts/{payout_id} The payout and the ledger rows it holds, oldest first

The payouts the merchant recorded, newest first, for one affiliate or all of them

Section titled The payouts the merchant recorded, newest first, for one affiliate or all of them

GET /api/v1/orgs/{org_slug}/commerce/affiliates/payouts

The payouts the merchant recorded, newest first, for one affiliate or all of them.

Name In Type Required Description
org_slug path string yes
affiliate_id query integer or null no
limit query integer no Default: 50.
offset query integer no Default: 0.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Record a payout the merchant made; the referrals it names become paid

Section titled Record a payout the merchant made; the referrals it names become paid

POST /api/v1/orgs/{org_slug}/commerce/affiliates/{affiliate_id}/payouts

Record a payout the merchant made; the referrals it names become paid.

Name In Type Required
affiliate_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required Description
amount Amount yes Minor units; the referrals' commissions add up to it.
currency_code Currency Code yes
method any or null no How it was paid, such as bank_transfer.
reference any or null no
note any or null no
referral_ids Referral Ids yes The affiliate's unpaid referrals this pays.
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/commerce/payouts

Newest first, with summary: the schedule and, per currency, what is payable now, the minimum and any payout still open.

Name In Type Required Description
org_slug path string yes
status query string or null no A status, or open for both open ones.
currency_code query string or null no
limit query integer no Default: 50.
offset query integer no Default: 0.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Ask for the payable balance in a currency now

Section titled Ask for the payable balance in a currency now

POST /api/v1/orgs/{org_slug}/commerce/payouts

Ask for the payable balance in a currency now. 409 with error nothing_payable, below_minimum, payout_open or held when there is none to make; the balance carries.

Name In Type Required
org_slug path string yes
Idempotency-Key header string or null no

application/json (required)

Field Type Required
currency_code string yes
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

The payout and the ledger rows it holds, oldest first

Section titled The payout and the ledger rows it holds, oldest first

GET /api/v1/orgs/{org_slug}/commerce/payouts/{payout_id}

The payout and the ledger rows it holds, oldest first.

Name In Type Required Description
payout_id path string yes
org_slug path string yes
limit query integer no Ledger rows per page. Default: 100.
offset query integer no Default: 0.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.