> ## Documentation Index
> Fetch the complete documentation index at: https://docs.services.payward.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Ramp checkout session

> Creates a Ramp checkout for a selected user and returns the widget redirect
URL with the checkout UUID in the fragment. No access token is minted here;
the widget mints it via the bootstrap call (`BootstrapRampCheckout`). The
URL must still be treated as sensitive — the UUID is a capability handle.



## OpenAPI

````yaml /api-reference/openapi_v3_pws.json post /v1/users/{user_id}/ramp/checkouts
openapi: 3.1.0
info:
  title: Payward Services API
  description: >-
    The Payward Services (PWS) public API.


    PWS exposes Swaps (institutional FX-style trading), Conversions (rule-driven
    and one-shot fiat ↔ crypto value movement), retail-style Quotes and Price
    Trigger Swaps, end-user Users / Verifications, Funds (deposits, withdrawals,
    addresses, transactions), Portfolio, Earn, Reports, Webhooks, and Ramp
    (hosted fiat-to-crypto on-ramp checkout).


    All requests must be authenticated. All monetary values are decimal strings;
    all timestamps are ISO 8601 UTC. List endpoints are cursor-paginated. Errors
    follow a uniform shape (see `*ErrorResponse` schemas).
  version: v1
  contact:
    name: Payward Services API Support
    url: https://docs.payward.com
    email: api-support@payward.com
servers:
  - url: https://api.services.payward.com
    description: Production
security:
  - ApiKey: []
    ApiNonce: []
    ApiSign: []
tags:
  - name: Users
    description: >-
      Users and headless-user onboarding flows that the partner manages.


      - **Create User** provisions a user with full identity verification fields
      collected up front.

      - **Create Headless User** provisions a lightweight user when your
      licensing agreement allows you to manage KYC data outside Payward.

      - **Get User** retrieves the user's profile, verification status, and
      required actions.

      - **Update User** updates user profile fields and may re-trigger
      verification.


      Use the returned user `id` for calls that require the user's identifier.
  - name: Assets
    description: >-
      Catalog of assets available on the platform with retail-display metadata
      (logos, market data, descriptions).
  - name: Conversions
    description: >-
      Rule-driven and one-shot fiat ↔ crypto value movement, including
      conversion rules, deposits, and whitelisted wallets.
  - name: Earn
    description: >-
      Manage auto-earn preferences and retrieve allocation and reward
      information.
  - name: Funds
    description: >-
      Deposits, withdrawals, addresses, methods, and the consolidated
      funding-transactions ledger.
  - name: Portfolio
    description: End-user portfolio summary, history, and transaction views.
  - name: Price Trigger Swaps
    description: Limit-style orders that execute when a configured price trigger is met.
  - name: On-chain Swaps
    description: >-
      Wallet-funded onchain quote trading for xStock and USDC pairs. On-chain
      quotes settle on-chain through the Payward on-chain proxy contract.
  - name: Ramp
    description: >-
      Hosted fiat-to-crypto on-ramp checkout: country / fiat / payment-method /
      cryptocurrency-asset discovery, transaction limits and prospective quotes,
      and the hosted checkout URL.
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
  - name: Swaps
    description: >-
      Direct partner-to-Payward swap quotes and executions (institutional
      FX-style trading).
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
  - name: Webhooks
    description: Manage webhook subscriptions for asynchronous event delivery.
paths:
  /v1/users/{user_id}/ramp/checkouts:
    post:
      tags:
        - Ramp
      summary: Create Ramp checkout session
      description: >-
        Creates a Ramp checkout for a selected user and returns the widget
        redirect

        URL with the checkout UUID in the fragment. No access token is minted
        here;

        the widget mints it via the bootstrap call (`BootstrapRampCheckout`).
        The

        URL must still be treated as sensitive — the UUID is a capability
        handle.
      operationId: createRampCheckoutSession
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
            minLength: 14
            maxLength: 42
          x-selected-account: true
          style: simple
          description: >-
            ID of the user the checkout acts on behalf of. This is the user's
            IIBAN-derived public identifier.
          example: AA23N84GGQN4WE6I
        - in: header
          name: Idempotency-Key
          schema:
            type: string
            minLength: 1
            maxLength: 128
          style: simple
          description: >-
            Client-generated key for safe retries. Sent as the `Idempotency-Key`
            HTTP header.
          example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        content:
          application/json:
            schema:
              description: >-
                Request to create a token-bound Ramp checkout session.


                The `from`/`to` pairing determines the Ramp direction. Only
                on-ramp

                (`from` fiat, `to` crypto or stablecoin) is currently supported;
                other

                pairings are rejected with `400 BadRequest`.
              type: object
              properties:
                from:
                  description: Source side of the checkout — the asset the user pays with.
                  type: object
                  properties:
                    symbol:
                      description: >-
                        Asset ticker symbol (e.g. "USD"). Required. Use `GET
                        /v1/ramp/fiat-currencies` to discover supported source
                        currencies.
                      type: string
                      minLength: 3
                      maxLength: 16
                    type:
                      description: >-
                        Classification of the asset. Pair with `symbol` to
                        disambiguate when the same ticker exists across asset
                        classes (e.g. `USDC` as `stablecoin` vs `crypto`).
                        Defaults to `fiat`. Only fiat sources are currently
                        supported (on-ramp).
                      type: string
                      enum:
                        - fiat
                        - crypto
                        - xstock
                        - stablecoin
                        - equity
                    method:
                      description: >-
                        Funding method used for the source side. Required. Use
                        `GET /v1/ramp/payment-methods` to discover supported
                        payment methods.
                      type: string
                      minLength: 1
                      maxLength: 128
                    amount:
                      description: >-
                        Amount to spend, denominated in the source asset, as a
                        decimal string. Required.
                      type: string
                      pattern: ^[0-9]+(\.[0-9]+)?$
                      minLength: 1
                      maxLength: 64
                to:
                  description: >-
                    Destination side of the checkout — the asset the user
                    receives.
                  type: object
                  properties:
                    symbol:
                      description: >-
                        Asset ticker symbol (e.g. "BTC"). Required. Use `GET
                        /v1/ramp/buy/crypto` to discover supported destination
                        assets.
                      type: string
                      minLength: 3
                      maxLength: 16
                    type:
                      description: >-
                        Classification of the asset. Pair with `symbol` to
                        disambiguate when the same ticker exists across asset
                        classes (e.g. `USDC` as `stablecoin` vs `crypto`).
                        Defaults to `crypto`. Only crypto and stablecoin
                        destinations are currently supported (on-ramp).
                      type: string
                      enum:
                        - fiat
                        - crypto
                        - xstock
                        - stablecoin
                        - equity
                    method:
                      description: >-
                        Withdrawal method for the destination asset. Required.
                        Use `GET /v1/ramp/buy/crypto` to discover available
                        withdrawal methods for each asset.
                      type: string
                      minLength: 1
                      maxLength: 128
                    network:
                      description: >-
                        Optional withdrawal network identifier. Use `GET
                        /v1/ramp/buy/crypto` to discover available networks for
                        each destination asset.
                      type: string
                      minLength: 1
                      maxLength: 128
                    address:
                      description: >-
                        Optional destination wallet address for the crypto
                        withdrawal.
                      type: string
                      minLength: 1
                      maxLength: 512
                    memo:
                      description: >-
                        Optional memo/tag/note for the crypto withdrawal (used
                        for certain assets).
                      type: string
                      minLength: 1
                      maxLength: 256
                affiliate_fee_bps:
                  description: >-
                    Affiliate fee in basis points to attribute to the partner
                    (0-10000 where 100 = 1%).
                  type: string
                  pattern: ^(10000|[0-9]{1,4})$
                  minLength: 1
                  maxLength: 5
                country:
                  description: >-
                    ISO 3166-1 alpha-2 country code. Use `GET
                    /v1/ramp/countries` to discover supported values.
                  type: string
                  pattern: ^[A-Za-z]{2}$
                  minLength: 2
                  maxLength: 2
                subdivision:
                  description: >-
                    ISO 3166-2 subdivision code suffix (e.g., `CA` for
                    California when country is `US`). Use `GET
                    /v1/ramp/countries` to discover supported values.
                  type: string
                  pattern: ^[A-Za-z0-9-]+$
                  minLength: 1
                  maxLength: 64
                redirect_url:
                  description: >-
                    URL to redirect the user after completing checkout
                    successfully.
                  type: string
                  minLength: 1
                  maxLength: 255
                failure_url:
                  description: URL to redirect the user after a failed checkout.
                  type: string
                  minLength: 1
                  maxLength: 255
                external_user_id:
                  description: Optional partner-supplied user identifier.
                  type: string
                  minLength: 1
                  maxLength: 64
                external_partner_id:
                  description: Optional partner-supplied partner identifier.
                  type: string
                  minLength: 1
                  maxLength: 64
                external_transaction_id:
                  description: Optional partner transaction identifier.
                  type: string
                  minLength: 1
                  maxLength: 64
                external_metadata:
                  description: Optional metadata to store alongside the checkout.
                  type: string
                  minLength: 1
                  maxLength: 1000
              required:
                - from
                - to
            examples:
              createCheckout:
                summary: Create hosted checkout
                value:
                  from:
                    symbol: USD
                    type: fiat
                    method: credit_card
                    amount: '100.00'
                  to:
                    symbol: BTC
                    type: crypto
                    method: Bitcoin
                    network: Bitcoin
                    address: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                    memo: '123456'
                  affiliate_fee_bps: '250'
                  country: US
                  subdivision: CA
                  redirect_url: https://example.com/checkout/success
                  failure_url: https://example.com/checkout/failure
                  external_user_id: user_01J0M7C0Z9F8YX3GQH8E
                  external_partner_id: partner_456
                  external_transaction_id: INV-2026-04-0042
                  external_metadata: '{"order_id":"order_12345"}'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    description: Created checkout session details.
                    type: object
                    properties:
                      checkout_id:
                        description: Public checkout session identifier.
                        type: string
                        minLength: 36
                        maxLength: 36
                      checkout_url:
                        description: >-
                          Widget redirect URL with the checkout UUID in the
                          fragment. No access token

                          is present; the widget mints one via the bootstrap
                          call. The UUID is a

                          capability handle, so the URL is still sensitive.
                        type: string
                        minLength: 1
                        maxLength: 2048
                      expires_in:
                        description: >-
                          Checkout URL validity window, in seconds — how long
                          the partner has to

                          redirect the user before the handle should be
                          considered stale. This is the

                          creation-to-bootstrap window, not a token lifetime;
                          the token TTL starts at

                          bootstrap and is reported there.
                        type: integer
                        format: int64
                      request_data:
                        description: Original request payload for client confirmation.
                        type: object
                        properties:
                          from:
                            description: Echo of the source (pay) side of the checkout.
                            type: object
                            properties:
                              symbol:
                                description: >-
                                  Asset ticker symbol (e.g. "USD"). Required.
                                  Use `GET /v1/ramp/fiat-currencies` to discover
                                  supported source currencies.
                                type: string
                                minLength: 3
                                maxLength: 16
                              type:
                                description: >-
                                  Classification of the asset. Pair with
                                  `symbol` to disambiguate when the same ticker
                                  exists across asset classes (e.g. `USDC` as
                                  `stablecoin` vs `crypto`). Defaults to `fiat`.
                                  Only fiat sources are currently supported
                                  (on-ramp).
                                type: string
                                enum:
                                  - fiat
                                  - crypto
                                  - xstock
                                  - stablecoin
                                  - equity
                              method:
                                description: >-
                                  Funding method used for the source side.
                                  Required. Use `GET /v1/ramp/payment-methods`
                                  to discover supported payment methods.
                                type: string
                                minLength: 1
                                maxLength: 128
                              amount:
                                description: >-
                                  Amount to spend, denominated in the source
                                  asset, as a decimal string. Required.
                                type: string
                                pattern: ^[0-9]+(\.[0-9]+)?$
                                minLength: 1
                                maxLength: 64
                          to:
                            description: >-
                              Echo of the destination (receive) side of the
                              checkout.
                            type: object
                            properties:
                              symbol:
                                description: >-
                                  Asset ticker symbol (e.g. "BTC"). Required.
                                  Use `GET /v1/ramp/buy/crypto` to discover
                                  supported destination assets.
                                type: string
                                minLength: 3
                                maxLength: 16
                              type:
                                description: >-
                                  Classification of the asset. Pair with
                                  `symbol` to disambiguate when the same ticker
                                  exists across asset classes (e.g. `USDC` as
                                  `stablecoin` vs `crypto`). Defaults to
                                  `crypto`. Only crypto and stablecoin
                                  destinations are currently supported
                                  (on-ramp).
                                type: string
                                enum:
                                  - fiat
                                  - crypto
                                  - xstock
                                  - stablecoin
                                  - equity
                              method:
                                description: >-
                                  Withdrawal method for the destination asset.
                                  Required. Use `GET /v1/ramp/buy/crypto` to
                                  discover available withdrawal methods for each
                                  asset.
                                type: string
                                minLength: 1
                                maxLength: 128
                              network:
                                description: >-
                                  Optional withdrawal network identifier. Use
                                  `GET /v1/ramp/buy/crypto` to discover
                                  available networks for each destination asset.
                                type: string
                                minLength: 1
                                maxLength: 128
                              address:
                                description: >-
                                  Optional destination wallet address for the
                                  crypto withdrawal.
                                type: string
                                minLength: 1
                                maxLength: 512
                              memo:
                                description: >-
                                  Optional memo/tag/note for the crypto
                                  withdrawal (used for certain assets).
                                type: string
                                minLength: 1
                                maxLength: 256
                          affiliate_fee_bps:
                            description: >-
                              Affiliate fee in basis points (0-10000 where 100 =
                              1%).
                            type: string
                            pattern: ^(10000|[0-9]{1,4})$
                            minLength: 1
                            maxLength: 5
                          country:
                            description: ISO 3166-1 alpha-2 country code
                            type: string
                            pattern: ^[A-Za-z]{2}$
                            minLength: 2
                            maxLength: 2
                          subdivision:
                            description: >-
                              ISO 3166-2 subdivision code suffix (e.g., CA for
                              California when country is US)
                            type: string
                            pattern: ^[A-Za-z0-9-]+$
                            minLength: 1
                            maxLength: 64
                          redirect_url:
                            description: >-
                              URL where the ramp provider should redirect the
                              user after successful checkout
                            type: string
                            minLength: 1
                            maxLength: 255
                          failure_url:
                            description: >-
                              URL where the ramp provider should redirect the
                              user after failed checkout
                            type: string
                            minLength: 1
                            maxLength: 255
                          external_user_id:
                            description: >-
                              Partner-provided user identifier (max 64
                              characters)
                            type: string
                            minLength: 1
                            maxLength: 64
                          external_partner_id:
                            description: >-
                              Partner-provided partner identifier (max 64
                              characters)
                            type: string
                            minLength: 1
                            maxLength: 64
                          external_transaction_id:
                            description: >-
                              Partner-provided transaction identifier (max 64
                              characters)
                            type: string
                            minLength: 1
                            maxLength: 64
                          external_metadata:
                            description: >-
                              Additional partner-provided metadata (max 1000
                              characters)
                            type: string
                            minLength: 1
                            maxLength: 1000
                required:
                  - data
              examples:
                checkoutCreated:
                  summary: Created hosted checkout
                  value:
                    data:
                      checkout_id: 018fdb88-4a87-73b2-9b9f-b5f38d11b924
                      checkout_url: >-
                        https://ramp.kraken.com/confirmation#checkout_id=018fdb88-4a87-73b2-9b9f-b5f38d11b924
                      expires_in: 600
                      request_data:
                        from:
                          symbol: USD
                          type: fiat
                          method: credit_card
                          amount: '100.00'
                        to:
                          symbol: BTC
                          type: crypto
                          method: Bitcoin
                          network: Bitcoin
                          address: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                          memo: '123456'
                        affiliate_fee_bps: '250'
                        country: US
                        subdivision: CA
                        redirect_url: https://example.com/checkout/success
                        failure_url: https://example.com/checkout/failure
                        external_user_id: user_01J0M7C0Z9F8YX3GQH8E
                        external_partner_id: partner_456
                        external_transaction_id: INV-2026-04-0042
                        external_metadata: '{"order_id":"order_12345"}'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceExhaustedError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnimplementedError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnavailableError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '504':
          description: Deadline exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadlineExceededError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
      security:
        - ApiKey: []
          ApiNonce: []
          ApiSign: []
components:
  schemas:
    BadRequestError:
      description: Request validation failed or the request could not be processed.
      allOf:
        - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsValidationError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 400
                    code:
                      type: string
                      enum:
                        - bad_request
    UnauthenticatedError:
      description: Authentication credentials are missing, invalid, or not accepted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 401
                    code:
                      type: string
                      enum:
                        - unauthenticated
    ForbiddenError:
      description: The authenticated caller is not allowed to perform this operation.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 403
                    code:
                      type: string
                      enum:
                        - forbidden
    ResourceExhaustedError:
      description: The request was rate limited or a resource quota was exhausted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 429
                    code:
                      type: string
                      enum:
                        - resource_exhausted
    InternalError:
      description: An unexpected server-side error occurred.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 500
                    code:
                      type: string
                      enum:
                        - internal
    UnimplementedError:
      description: The operation is not implemented by the upstream service.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 501
                    code:
                      type: string
                      enum:
                        - unimplemented
    UnavailableError:
      description: The service is temporarily unavailable.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 503
                    code:
                      type: string
                      enum:
                        - unavailable
    DeadlineExceededError:
      description: The upstream service did not complete the request before the deadline.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 504
                    code:
                      type: string
                      enum:
                        - deadline_exceeded
    PwsValidationErrorEnvelope:
      description: Error envelope for request validation failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsValidationError'
    PwsValidationError:
      description: Standard PWS API error object for request validation failures.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
        causes:
          description: Validation failures that contributed to the error.
          type: array
          items:
            $ref: '#/components/schemas/PwsErrorCause'
    PwsGeneralErrorEnvelope:
      description: Error envelope for operational or domain failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsGeneralError'
    PwsGeneralError:
      description: Standard PWS API error object for non-validation failures.
      allOf:
        - $ref: '#/components/schemas/PwsErrorBase'
        - type: object
          properties:
            causes:
              description: Additional error details, when present.
              type: array
              items:
                type: object
                additionalProperties: true
    PwsErrorCause:
      description: A single request validation failure.
      type: object
      required:
        - field
        - message
      properties:
        field:
          description: Dot-notation path to the offending request field.
          type: string
        message:
          description: Human-readable explanation of the failed validation rule.
          type: string
    PwsErrorBase:
      description: Common fields present on every PWS API error object.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
  headers:
    RequestId:
      description: >-
        Unique identifier for tracing this request across services. Include in
        support tickets.
      schema:
        type: string
        format: uuid
        example: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
    RateLimitLimit:
      description: Total requests allowed in the current window.
      schema:
        type: integer
        example: 1000
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 955
    RateLimitReset:
      description: Unix timestamp (seconds) when the rate-limit window resets.
      schema:
        type: integer
        format: int64
        example: 1713182400
    StrictTransportSecurity:
      description: >-
        Enforces HTTPS for the configured period. Always `max-age=63072000;
        includeSubDomains; preload`.
      schema:
        type: string
        example: max-age=63072000; includeSubDomains; preload
    XContentTypeOptions:
      description: Disables MIME sniffing. Always `nosniff`.
      schema:
        type: string
        enum:
          - nosniff
        example: nosniff
    ContentSecurityPolicy:
      description: >-
        Prevents embedding and resource loading. Always `default-src 'none';
        frame-ancestors 'none'`.
      schema:
        type: string
        example: default-src 'none'; frame-ancestors 'none'
    CacheControl:
      description: Prevents caching of sensitive financial data. Always `no-store`.
      schema:
        type: string
        enum:
          - no-store
        example: no-store
    RetryAfter:
      description: Seconds the client should wait before retrying.
      schema:
        type: integer
        example: 30
  securitySchemes:
    ApiKey:
      type: apiKey
      name: API-Key
      in: header
      description: Your public API key. Identifies the partner making the request.
    ApiNonce:
      type: apiKey
      name: API-Nonce
      in: header
      description: Monotonically increasing nonce included in the request signature.
    ApiSign:
      type: apiKey
      name: API-Sign
      in: header
      description: HMAC signature over the request, computed with your private key.

````