# Payment Module

### Payment Module Overview

The Payment Module establishes City Protocol as the default neofinance layer for transactional commerce, enabling seamless crypto and fiat payments for everyday goods, services, and digital assets. It connects founders with mature payment infrastructure to handle merchant settlements, point-of-sale integrations, and cross-border transfers.

Through partnerships with platforms like Cryptomus, Allscale, Gnosis Pay, Helio, Zerohash, Metacomp, Interlace, and StraitsX, the Payment Module provides a comprehensive suite of B2B and B2C payment rails.

***

### AI-Native Payment Integration

Navigating the age of AI agents requires new infrastructure. With 47% of U.S. shoppers using AI tools for at least one shopping task (VISA Research) and $5 trillion in transactions projected to be mediated by AI Agents by 2030 (McKinsey), neobanking must adapt.

As a critical addition to our stack, City Protocol integrates with **OpenClaw**, an external AI-native payment solution, to support agent-driven finance:

{% tabs %}
{% tab title="x402 Payment Standard Integration" %} <mark style="color:$primary;">**x402 Payment Standard Integration**</mark>

Enables agent-native transactions and seamless machine-to-machine payments without requiring human intervention for every micro-transaction.
{% endtab %}

{% tab title="AI Sub-Accounts" %} <mark style="color:$primary;">**AI Sub-Accounts**</mark>

Allows users to provision dedicated, budget-capped sub-accounts for their AI agents to spend on their behalf, ensuring security while enabling autonomous commerce.
{% endtab %}

{% tab title="AI Sub-Accounts" %} <mark style="color:$primary;">**API & Skills for Easy Deployment**</mark>

Provides developers with the necessary tools to embed AI-driven payment logic directly into their applications.
{% endtab %}
{% endtabs %}

***

### Underlying Protocols

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td></td><td><a href="https://www.fiat24.com/">https://www.fiat24.com/</a></td><td><a href="/files/lkiVGVarOJsYw5t1kbaI">/files/lkiVGVarOJsYw5t1kbaI</a></td></tr><tr><td><strong>Gnosis Pay</strong></td><td><a href="https://gnosispay.com/">https://gnosispay.com/</a></td><td><a href="/files/32SPucK96D7l4MQE2dIZ">/files/32SPucK96D7l4MQE2dIZ</a></td></tr><tr><td><strong>Zerohash</strong></td><td><a href="https://zerohash.com/">https://zerohash.com/</a></td><td><a href="/files/keoDgrVZQ3NF152sgaRK">/files/keoDgrVZQ3NF152sgaRK</a></td></tr><tr><td><strong>StraitsX</strong></td><td><a href="https://www.straitsx.com/">https://www.straitsx.com/</a></td><td><a href="/files/R0PLJXFA5yMBfIs1YYXq">/files/R0PLJXFA5yMBfIs1YYXq</a></td></tr></tbody></table>

***

### Architecture Overview

City Protocol's payment infrastructure powers the checkout and collection layer of the SDK. It is designed to let merchants accept crypto payments through structured checkout sessions, with asynchronous status tracking and normalized settlement flows.&#x20;

These payments support multi-chain detection, configurable expiry windows, and participant-scoped reconciliation. This create-then-settle workflow mirrors the invoice and collection cycles used in traditional payment processing, bridging the gap between merchant commerce and on-chain settlement.

{% hint style="info" %}
Payment is for checkout, collection, and settlement flows — distinct from ramp deposit/withdrawal instructions. It operates within the City SDK as its own domain, with dedicated clients, endpoints, and lifecycle management.
{% endhint %}

***

### Key Components

| Component             | Description                                                                                                                                                      |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Checkout Session**  | A structured payment request created by the merchant, encoding amount, currency, buyer info, and expiry. It serves as the entry point for every collection flow. |
| **Payment Detection** | The system monitors supported blockchains for inbound transfers that match a checkout session, removing the need for manual reconciliation.                      |
| **Settlement**        | Once a payment is detected and confirmed on-chain, the corresponding funds are settled to the merchant's participant account through a normalized flow.          |
| **Status Lifecycle**  | Every checkout session moves through a defined set of states — from creation to expiry or settlement — queryable at any point via the SDK.                       |
| **Participant**       | A merchant identity scoped by `participantCode`, used to associate checkouts, settlements, and transaction history with a single entity.                         |


---

# Agent Instructions: 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:

```
GET https://city-protocol.gitbook.io/docs/neofinance-as-a-service/payment-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
