# rye-com/checkout-intents-java architecture

> Architecture diagram of the GitHub repository rye-com/checkout-intents-java, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rye-com/checkout-intents-java
- Repository: https://github.com/rye-com/checkout-intents-java

## Overview

This is the Checkout Intents Java SDK: application code configures a synchronous or asynchronous client, supplies typed request parameters to service methods, and receives typed responses from the Checkout Intents REST API. Its domain surface includes checkout sessions and intents, orders, billing, and the broader commerce, fulfillment, and event APIs. The core supplies request configuration and HTTP abstractions, while the OkHttp module provides transport. Several service implementations and async paths are unsampled, so those connections are shown only where README or index evidence supports them.

Main entry points: [`checkout-intents-core/src/main/kotlin/com/rye/models`](https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/models) (Typed models), [`checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt`](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt) (OkHttp adapter), [`checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClient.kt`](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClient.kt) (Sync client), [`checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt`](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt) (Sync OkHttp client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client entrypoints"]
  node_sync["Sync client"]
  node_async["Async client"]
end

subgraph group_domain["Commerce services"]
  node_checkout["Checkout intents"]
  node_sessions["Hosted sessions"]
  node_orders["Orders<br/>[OrderService.kt]"]
  node_billing["Billing<br/>[BillingService.kt]"]
  node_commerce["Commerce APIs"]
  node_fulfillment["Returns and shipping"]
  node_models["Typed models"]
end

subgraph group_support["Runtime support"]
  node_options["Client options<br/>[ClientOptions.kt]"]
  node_requestopts["Request options<br/>[RequestOptions.kt]"]
  node_request["HTTP request<br/>[HttpRequest.kt]"]
  node_headers["Headers and query<br/>[Headers.kt]"]
  node_response["HTTP responses<br/>[HttpResponseFor.kt]"]
end

subgraph group_transport["HTTP transport"]
  node_okhttp["OkHttp adapter<br/>[OkHttpClient.kt]"]
  node_syncok["Sync OkHttp client"]
  node_asyncok["Async OkHttp client"]
end

node_app(("Application"))
node_api{{"Checkout Intents API"}}

node_app -->|"configures client"| node_syncok
node_app -->|"builds request"| node_sync
node_sync -->|"accesses service"| node_checkout
node_checkout -->|"uses params and results"| node_models
node_app -->|"configures async"| node_asyncok
node_asyncok -->|"implements client"| node_async
node_syncok -->|"implements client"| node_sync
node_sessions -->|"uses session types"| node_models
node_billing -->|"uses billing types"| node_models
node_orders -->|"uses order types"| node_models
node_commerce -.->|"uses domain types"| node_models
node_fulfillment -.->|"uses domain types"| node_models
node_sync -.->|"configures with"| node_options
node_options -->|"sets defaults"| node_requestopts
node_request -->|"carries metadata"| node_headers
node_syncok -->|"uses transport"| node_okhttp
node_asyncok -->|"uses transport"| node_okhttp
node_okhttp -->|"sends request"| node_request
node_okhttp -->|"returns response"| node_response
node_okhttp -->|"calls REST API"| node_api
node_api -.->|"returns typed data"| node_sync

click node_sync "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClient.kt"
click node_async "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClientAsync.kt"
click node_checkout "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/CheckoutIntentService.kt"
click node_sessions "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/betas/CheckoutSessionService.kt"
click node_orders "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/OrderService.kt"
click node_billing "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/BillingService.kt"
click node_commerce "https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking"
click node_fulfillment "https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking"
click node_models "https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/models"
click node_options "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/ClientOptions.kt"
click node_requestopts "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/RequestOptions.kt"
click node_request "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpRequest.kt"
click node_headers "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/http/Headers.kt"
click node_response "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpResponseFor.kt"
click node_okhttp "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt"
click node_syncok "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt"
click node_asyncok "https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClientAsync.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sync,node_async toneBlue
class node_checkout,node_sessions,node_orders,node_billing,node_commerce,node_fulfillment,node_models toneAmber
class node_options,node_requestopts,node_request,node_headers,node_response,node_api toneMint
class node_okhttp,node_syncok,node_asyncok toneRose
class node_app toneIndigo
```

## Components

### Client entrypoints

- [Sync client](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClient.kt): `checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClient.kt`
- [Async client](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClientAsync.kt): `checkout-intents-core/src/main/kotlin/com/rye/client/CheckoutIntentsClientAsync.kt`

### Commerce services

- [Checkout intents](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/CheckoutIntentService.kt): `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/CheckoutIntentService.kt`
- [Hosted sessions](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/betas/CheckoutSessionService.kt): `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/betas/CheckoutSessionService.kt`
- [Orders](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/OrderService.kt): `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/OrderService.kt`
- [Billing](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking/BillingService.kt): `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/BillingService.kt`
- [Commerce APIs](https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking): `checkout-intents-core/src/main/kotlin/com/rye/services/blocking`
- [Returns and shipping](https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/services/blocking): `checkout-intents-core/src/main/kotlin/com/rye/services/blocking`
- [Typed models](https://github.com/rye-com/checkout-intents-java/tree/main/checkout-intents-core/src/main/kotlin/com/rye/models): `checkout-intents-core/src/main/kotlin/com/rye/models`

### Runtime support

- [Client options](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/ClientOptions.kt): `checkout-intents-core/src/main/kotlin/com/rye/core/ClientOptions.kt`
- [Request options](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/RequestOptions.kt): `checkout-intents-core/src/main/kotlin/com/rye/core/RequestOptions.kt`
- [HTTP request](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpRequest.kt): `checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpRequest.kt`
- [Headers and query](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/http/Headers.kt): `checkout-intents-core/src/main/kotlin/com/rye/core/http/Headers.kt`
- [HTTP responses](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpResponseFor.kt): `checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpResponseFor.kt`

### HTTP transport

- [OkHttp adapter](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt): `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt`
- [Sync OkHttp client](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt): `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt`
- [Async OkHttp client](https://github.com/rye-com/checkout-intents-java/blob/main/checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClientAsync.kt): `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClientAsync.kt`

### Other components

- **Application**
- **Checkout Intents API**

## Connections

- Application → Sync OkHttp client: configures client (evidence: `README.md`)
- Application → Sync client: builds request (evidence: `README.md`)
- Sync client → Checkout intents: accesses service (evidence: `README.md`)
- Checkout intents → Typed models: uses params and results (evidence: `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/CheckoutIntentService.kt`)
- Application → Async OkHttp client: configures async (evidence: `README.md`)
- Async OkHttp client → Async client: implements client (evidence: `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClientAsync.kt`)
- Sync OkHttp client → Sync client: implements client (evidence: `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt`)
- Hosted sessions → Typed models: uses session types (evidence: `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/betas/CheckoutSessionService.kt`)
- Billing → Typed models: uses billing types (evidence: `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/BillingService.kt`)
- Orders → Typed models: uses order types (evidence: `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/OrderService.kt`)
- Commerce APIs → Typed models: uses domain types (evidence: `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/betas/CheckoutSessionService.kt`)
- Returns and shipping → Typed models: uses domain types (evidence: `checkout-intents-core/src/main/kotlin/com/rye/services/blocking/betas/CheckoutSessionService.kt`)
- Sync client → Client options: configures with
- Client options → Request options: sets defaults (evidence: `checkout-intents-core/src/main/kotlin/com/rye/core/RequestOptions.kt`)
- HTTP request → Headers and query: carries metadata (evidence: `checkout-intents-core/src/main/kotlin/com/rye/core/http/HttpRequest.kt`)
- Sync OkHttp client → OkHttp adapter: uses transport (evidence: `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClient.kt`)
- Async OkHttp client → OkHttp adapter: uses transport (evidence: `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/CheckoutIntentsOkHttpClientAsync.kt`)
- OkHttp adapter → HTTP request: sends request (evidence: `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt`)
- OkHttp adapter → HTTP responses: returns response (evidence: `checkout-intents-client-okhttp/src/main/kotlin/com/rye/client/okhttp/OkHttpClient.kt`)
- OkHttp adapter → Checkout Intents API: calls REST API (evidence: `README.md`)
- Checkout Intents API → Sync client: returns typed data
