> For the complete documentation index, see [llms.txt](https://sonic-ai-works.gitbook.io/sonic-networks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-ai-works.gitbook.io/sonic-networks-docs/documentation/application-and-website/payments-and-checkout.md).

# Payments & checkout

Fully wired SaaS, AI Credit and Web3 checkout with immutable quotes, payment intents, verification, settlement, reconciliation and entitlements.

SONIC checkout converts a plan, credit purchase or eligible marketplace action into a durable commercial operation with an immutable server-authoritative quote. Browser navigation, wallet UI state and provider callbacks are never billing authority.

## Unified checkout lifecycle

```
ORDER
→ SERVER QUOTE
→ PAYMENT INTENT
→ AWAITING AUTHORIZATION
→ SUBMITTED
→ CONFIRMING
→ VERIFYING
→ VERIFIED
→ SETTLING
→ SETTLED
→ FULFILLED / ACTIVE
→ RECONCILED
```

Exceptional states include `EXPIRED`, `REJECTED`, `FAILED`, `INVALID`, `CANCELLED` and `REQUIRES_REVIEW`.

## Payment rails

Checkout may support, only when explicitly configured:

* traditional SaaS payment providers;
* SOL;
* SONIC;
* Solana USDC;
* cross-chain USDC through CCTP;
* future approved payment methods.

Every rail normalizes into the same `PaymentIntent` and settlement model. Provider-specific status never becomes the product's sole payment truth.

## Trusted activation only

Loading `/checkout/success`, scanning a QR, receiving a webhook, or seeing a transaction signature does not activate a subscription or grant credits.

Activation occurs only after the protected verification/settlement path proves that the expected payment policy has been satisfied.

Repeated callbacks and verification requests resolve to the same settlement record rather than creating a second subscription, credit grant or entitlement.

## Immutable quote contract

Every commercial quote snapshots the fields needed to reconstruct its economics, including:

```
pricePublicIdSnapshot
priceVersionSnapshot
priceAmountAtomic
priceCurrency
priceDecimals
priceInterval
priceIntervalCount
priceTaxBehavior
catalogVersion
platformFeeAtomic
totalAtomic
exchangeRateSnapshot when applicable
exchangeRateSource
exchangeRateTimestamp
expiresAt
```

Historical subscriptions and orders retain those values when the public catalog, fee policy or market price later changes.

The client may format amounts for display but never calculates the authoritative amount to settle.

## Volatile-asset checkout

Where a USD-priced product is paid in SOL or SONIC:

```
USD product price
→ approved market/FX snapshot
→ exact atomic payment amount
→ immutable expiring quote
→ PaymentIntent
```

An issued quote is never silently recalculated during verification. Expiry requires a new quote and new payment intent.

## Solana Pay

Solana Pay URLs/QRs are generated only from a durable server-authoritative payment intent. Verification checks the configured network, recipient, mint, atomic amount, unique reference, transaction success and duplicate-settlement protection.

## Cross-chain USDC / CCTP

Cross-chain checkout is modeled as two linked operations:

```
Checkout / PaymentIntent
        ↓
CCTP cross-chain operation
        ↓
Destination USDC verification
        ↓
Checkout settlement
```

A source-chain burn does not mark the checkout paid. Pending destination execution remains recoverable by CCTP verification and reconciliation workers.

## Subscription vs AI Credits

A subscription is not a mutable credit balance. Subscription activation grants the configured period allowance through `CreditAccount` and append-only `CreditLedgerEntry` records.

AI operations then use:

```
AVAILABLE
→ RESERVED
→ EXECUTION
→ SETTLED
```

or, on a failed eligible operation:

```
RESERVED
→ RELEASED / REFUNDED TO CREDIT BALANCE
```

This credit release is a ledger correction of an unconsumed reservation, not an automatic commercial payment refund.

## Marketplace economics

Applicable marketplace checkout snapshots gross amount, currency/decimals, platform fee, seller/creator settlement amount, license/version and other required entitlement terms.

Current target marketplace platform fee is **3%**, with Solana network and venue/routing/protocol fees disclosed separately where applicable.

## Team access

Workspace members may inherit entitlements from the workspace subscription without owning the billing record. Billing, finance-administration and treasury permissions remain RBAC-controlled and server enforced.

## Cancellation and refunds

Current subscription policy is **cancel at period end**. No automatic commercial refund is issued by cancellation.

Exceptional monetary corrections require a separate privileged, auditable reversal or ledger workflow. Public client routes cannot manufacture a refund state.

## Reconciliation

Payment reconciliation verifies durable operations against their authoritative payment source. Reconciliation catches missed callbacks, duplicate delivery, RPC/provider timeouts and stale internal state.

`SETTLED` means the business settlement was committed; `RECONCILED` means internal records were subsequently checked against authoritative evidence and remain consistent.

## Commercial invariants

* monetary amounts use atomic integers plus explicit currency and decimals;
* price versions and issued quote snapshots are immutable;
* client state cannot mark payment successful;
* a logical payment settles at most once;
* duplicate signatures/references cannot fund multiple orders where the rail requires uniqueness;
* provider/webhook reconciliation is replay-safe;
* subscription entitlements and RBAC permissions remain separate;
* AI Credit grants and consumption enter the credit ledger;
* wallet settlement remains an explicit transaction-intent and chain-verification boundary;
* cross-chain source completion is not destination settlement;
* settlement precedes fulfillment.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sonic-ai-works.gitbook.io/sonic-networks-docs/documentation/application-and-website/payments-and-checkout.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
