Commerce

Read the current native payment source snapshot

POST
/v1/commerce/payments/snapshot

Default off. Current ordinary workspace API key with decision:read and decision:write; no runtime-key scope expansion. Fixed managed Business Central reader checks current connection/grant/assignment and exact native context, preserving the native observation time. Beneficiary verification remains unverified. Unsupported, stale, changing or locked source fails closed. No payment execution.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

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

Request Body

application/json

version*string
native_context*
tenant_id*string
Match^(?!00000000-0000-0000-0000-000000000000$)[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$
Formatuuid
journal_id*string
Match^(?!00000000-0000-0000-0000-000000000000$)[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/commerce/payments/snapshot" \  -H "Content-Type: application/json" \  -d '{    "version": "commerce-payment-snapshot-request-v1",    "native_context": {      "version": "commerce-native-context-v1",      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",      "workspace_environment": "sandbox",      "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",      "expected_revision": 1,      "environment_name": "string",      "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf"    },    "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",    "journal_id": "1f63e2a2-c902-4838-a77c-cc16cfd719c2"  }'
{  "version": "commerce-payment-snapshot-response-v1",  "workspace": {    "org_id": "string",    "workspace_id": "string",    "environment": "sandbox",    "source_org_id": "29615410-e5e8-4ed6-94d4-e2a8385cf2e0"  },  "snapshot": {    "version": "commerce-payment-snapshot-v1",    "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",    "native_context": {      "version": "commerce-native-context-v1",      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",      "workspace_environment": "sandbox",      "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",      "expected_revision": 1,      "environment_name": "string",      "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf"    },    "payment": {      "payment_id": "string",      "vendor_id": "string",      "invoice_id": "string",      "amount": 0,      "currency": "string",      "due_at": "2019-08-24T14:15:22Z",      "rail": "ach"    },    "facts": {      "observed_at": "2019-08-24T14:15:22Z",      "payment": {        "prior_payment_count": 0      },      "treasury": {        "cash_position": 0,        "run_total": 0      },      "beneficiary": {        "changed_at": "2019-08-24T14:15:22Z",        "verification": "unverified"      }    },    "payment_evidence": {      "version": "commerce-payment-evidence-v1",      "method": "ledger_cash_same_currency_single_payment_v1",      "source": {        "sandbox": true,        "evaluation_company": true      },      "journal_id": "1f63e2a2-c902-4838-a77c-cc16cfd719c2",      "journal_revision": "string",      "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",      "batch_revision": "string",      "invoice_entry_id": "1a176ad1-dfc5-4367-81c5-19cf200ae937",      "invoice_revision": "string",      "invoice_remaining_amount": 1,      "funding_bank_id": "7d4f0736-a26a-4205-a4df-a5342d36c59f",      "funding_bank_revision": "string",      "beneficiary_bank_id": "129bae77-1594-4083-a63c-c22ad1977256",      "beneficiary_bank_revision": "string",      "source_revisions": {        "run": "string",        "invoice": "string",        "treasury": "string"      },      "snapshot_sha256": "string"    }  }}