Record the marketplace receipt for a charge (internal producers)
Internal. After billing the charge's outcome dimension on Microsoft or AWS Marketplace, the producer records the one receipt (decionis.outcomes.receipt/1). The identical receipt again answers 200; any other receipt for the same charge is 409 charge_already_billed, so a charge is never billed twice.
Authorization
ApiKeyAuth An organization API key. Its scopes decide what it may call;
decision:shadow is the narrowest: SHADOW evaluations through
POST /v1/authority/grants or its alias
POST /v1/authority/enforce-and-bind only (DECISION_SHADOW_MODE_DENIED
in any other mode; DECISION_SHADOW_FIELD_DENIED for a body carrying
context.decionis_policy, evidence or escalation), with no
integration dispatch. A key whose only scope is decision:shadow
(an AgentSafe hosted gateway's) reaches exactly those two,
POST /v1/auth/credential-context, POST /v1/hosted-gateway/keys/confirm
and POST /v1/hosted-gateway/keys/revoke-self; every other route
answers 403 HOSTED_GATEWAY_KEY_PATH_DENIED.
decision:enforce is an enforced hosted gateway's key: evaluations
in SHADOW or ENFORCEMENT through POST /v1/authority/grants or its
alias (400 DECISION_ENFORCE_FIELD_DENIED for a body carrying
context.decionis_policy; it never holds policy:write), and the
grants and managed escalations they bind. A key whose scopes are
decision:enforce (with or without decision:shadow) reaches exactly
POST /v1/authority/enforce-and-bind, POST /v1/authority/grants,
GET /v1/authority/grants/{grant_id},
POST /v1/authority/grants/{grant_id}/claims,
POST /v1/authority/grants/{grant_id}/receipts,
POST /v1/authority/grants/{grant_id}/reconciliations,
POST /v1/execution/verify-token, POST /v1/execution/claim-token,
POST /v1/execution/consume-token, POST /v1/execution/finalize-token,
GET /v1/authority/escalations/{escalation_id},
DELETE /v1/authority/escalations/{escalation_id},
POST /v1/auth/credential-context, POST /v1/hosted-gateway/keys/confirm
and POST /v1/hosted-gateway/keys/revoke-self, each id a UUID; every
other route answers 403 HOSTED_GATEWAY_KEY_PATH_DENIED.
In: header
Path Parameters
uuidRequest Body
application/json
Value in
- "microsoft"
- "aws"
1 <= length <= 2001 <= length <= 200^[A-Za-z0-9_.-]{1,100}$0 <= value <= 10000000001 <= value <= 1000000000Value in
- "ACCEPTED"
- "DUPLICATE"
- "NOTHING_TO_BILL"
date-timelength <= 40Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/outcomes/charges/497f6eca-6276-4993-bfeb-53cbbbba6f08/receipts" \ -H "Content-Type: application/json" \ -d '{ "version": "decionis.outcomes.receipt/1", "platform": "microsoft", "subscription_id": "string", "plan_id": "string", "dimension": "string", "quantity": 0, "unit_minor": 1, "status": "ACCEPTED", "usage_reference": "string", "reported_at": "2019-08-24T14:15:22Z" }'{ "version": "decionis.outcomes.receipt/1", "platform": "microsoft", "subscription_id": "string", "plan_id": "string", "dimension": "string", "quantity": 0, "unit_minor": 1, "status": "ACCEPTED", "usage_reference": "string", "reported_at": "2019-08-24T14:15:22Z"}Read one outcome charge (internal producers) GET
Internal; the billing producer's token with the outcomes capability.
Create the organization of a Microsoft platform purchase (internal producers) POST
Internal; default off (503 platform_workspaces_disabled until `DECIONIS_PLATFORM_WORKSPACES_ENABLED` is 1). Only a producer whose token (`DECIONIS_DELIVERY_PRODUCERS_JSON`) carries `platforms: ["microsoft"]` may call it: no token or an unknown one is 401 producer_required, any other producer 403 platform_not_allowed, and an organization key is never accepted. Commerce passes the workspace mapping Accounts signed for a `decionis-platform` purchase, with its evidence, verbatim. Core checks the version, platform, product and environment (400 otherwise); that the Accounts organization and workspace ids derive from source_org_id, that issued_at is within the last 10 minutes, and the Ed25519 signature over the canonical (sorted-key) mapping against the current Accounts JWKS (422 accounts_evidence_invalid with reason ids, stale or signature; 503 accounts_evidence_unavailable while the JWKS is unreachable). In one transaction it creates the organization with id = source_org_id, no Core owner, source product decionis and the production environment, its default entitlement, and the synchronized Accounts workspace reference, so the buyer's later Decionis sign-in to that workspace lands in this organization. The same reference again is 200 replayed; an existing organization with any other reference, a workspace already bound elsewhere, or an organization created for another subscription is 409 organization_conflict. No person, session or key is created. The optional `subscription` is the subscription's current state from Commerce's lifecycle, outside the signature: its paid plan becomes the organization's entitlement in the same transaction (422 plan_unknown for a plan code Core does not sell, before any write), and the answer reports what it did as `subscription`. Without it the organization gets the default entitlement.

