API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · course_charges

Course Charge Schema

Schema ID
course_charge
Collection
course_charges
Permissions
  • Readcourse_charge_view
  • Createcourse_charge_view
  • Editcourse_charge_refund
  • Deletecourse_charge_refund
Relationships

Fields

Course Charge Schema

course_charges4 permissions

Billing record for one cross-tenant enrollment in a paid shared course

enrollmentIduuidrequired
read-only
courseIduuidrequired→ course
read-only
shareIduuidrequired
read-only
consumerTenantIduuidrequired

Customer-tenant the learner belongs to (the bill recipient).

read-only
consumerUserIduuidrequired

User in the customer-tenant who triggered the enrollment.

read-only
grossAmountCentsintegerrequired

Gross charge in EUR cents (or `currency` cents) — what the customer owes.

≥ 0read-only
netAmountCentsintegeroptional

Net of VAT.

≥ 0read-only
taxAmountCentsintegeroptional

VAT amount.

≥ 0read-only
taxRatePercentnumberoptional
0 – 100Default: 19
currencystringrequired
Default: "EUR"
mspNetAmountCentsintegerrequired

What the MSP keeps after Codemeta platform fee.

≥ 0read-only
codemetaPlatformFeeCentsintegerrequired

Codemeta platform fee deducted from the charge.

≥ 0read-only
codemetaPlatformFeePercentnumberoptional

Percentage of gross taken as platform fee at charge creation time.

0 – 100Default: 10read-only
statusstringrequired
pendinginvoicedpaidrefundedfailed
Default: "pending"
billingModestringrequired

external: settled between the tenants outside Codemeta, no platform fee (ADR 1168). wholesale: aggregated into customer wholesale invoice. direct_stripe: paid in real-time via Stripe Connect.

wholesaledirect_stripeexternal
read-only
occurredAtdatetimerequired

When the charge became applicable (= enrollment creation time).

read-only
invoicedAtdatetimeoptional
nullable
invoiceIduuidoptional

Wholesale invoice the charge has been bundled into.

nullable
paidAtdatetimeoptional
nullable
refundedAtdatetimeoptional
nullable
refundReasonstringoptional
max 500 charactersnullable
stripePaymentIntentIdstringoptional
read-onlynullable
stripeChargeIdstringoptional
nullable
stripeRefundIdstringoptional
nullable
stripeAccountIdstringoptional

MSP Stripe Connect account that received the destination charge.

nullable
notesstringoptional
max 2000 charactersnullable

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/course_charges — List, paginated + filterable
  • GET /api/v1/course_charges/<id> — Single entity
  • POST /api/v1/course_charges — Create
  • PATCH /api/v1/course_charges/<id> — Partial update
  • DELETE /api/v1/course_charges/<id> — Soft delete
  • GET /api/v1/course_charges/<id>/timeline — Audit + activities

Search