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

# Quote a top-up (moves no money) — the PeridotID checkout summary

> Returns the transparent breakdown shown before DOKU: Amount, PeridotID
Fee (Rp0 for verified apps), App Fee, per-method Payment Gateway Fee and
Total Payment, plus `paymentMethods[]` (per-category fee + total) so the
summary updates on selection. Only **enabled** methods are listed; the
wallet blocks the top-up when the list is empty.




## OpenAPI

````yaml /openapi.yaml post /fiat/deposits/quote
openapi: 3.0.3
info:
  title: PeridotID API
  version: 0.1.0
  description: >
    Gaming Identity Platform — Authentication, Identity, and Profile for the
    Peridot ecosystem.


    ## Base URL

    All endpoints are prefixed with `/v1`.


    | Environment | Base URL |

    |---|---|

    | Production | `https://api.pid.peridotvault.com/v1` |

    | Local dev | `http://localhost:3300/v1` |


    ## Authentication

    Authentication is **cookie-based**. After a successful Google sign-in the
    API sets two

    `HttpOnly` cookies:


    - `pid_access` — short-lived JWT access token (15 min), sent on every
    request.

    - `pid_refresh` — long-lived rotating refresh token (30 days), only sent to
    `/v1/auth`.


    Browsers handle these automatically; non-browser clients must send

    `Cookie: pid_access=<token>` on each request and call `/v1/auth/refresh`
    before the

    access token expires.
  contact:
    name: PeridotID
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.pid.peridotvault.com/v1
    description: Production
  - url: http://localhost:3300/v1
    description: Local development
security: []
tags:
  - name: auth
    description: Login, logout, token refresh, and machine (client-credentials) tokens
  - name: identity
    description: The user's identity across products
  - name: profile
    description: The user's public profile
  - name: wallet
    description: >
      The user's wallet, associated with their PID. **Deprecated (V3 surface)**
      — preserved

      for existing clients, backed by `linked_address` chain accounts. Use
      `/account` and

      the smart account instead.
  - name: account
    description: >-
      PeridotID account — owns chain accounts (smart account PDA, legacy linked
      address)
  - name: fiat
    description: |
      The internal IDR fiat ledger: balances, statements, sends, and money-in.
      Top-ups enter through a hosted DOKU Checkout page (no Sub-Account) and
      credit the internal ledger once the payment is corroborated. Any identity
      can send to any identity (escrow/payouts). Fees: global 0.1% (min Rp100,
      no cap) plus optional per-app fees that stack and credit the app. Bank
      withdrawals (redemption) are disabled for now.
  - name: apps
    description: |
      Third-party apps ("Sign in with PeridotID"): client_id, allowed origins,
      optional backend secret, ledger callbacks (deferred), and a per-app fee
      schedule. Owner-scoped — a non-owner gets 404. App backends authenticate
      server-side with `POST /v1/auth/token` (client credentials).
  - name: credentials
    description: >
      Signing authorities (secp256r1 passkeys). Google OAuth proves identity; a

      passkey authorizes the wallet. The first credential registers freely; each
      additional

      credential requires approval by an existing credential
      (existing-credential approval rule).
  - name: permissions
    description: >
      EVM permission grants (scoped P-256 session keys, WHITEPAPER.md §10).
      Validation is pure

      hygiene + canonical id/challenge computation; submission-time account
      binding

      is enforced by the relay path.
  - name: session-keys
    description: >
      SVM gameplay sessions (Ed25519 session keys in isolated PDAs,
      WHITEPAPER.md §11).

      Validation is pure hygiene + canonical address/challenge computation;

      submission-time vault binding is enforced by the relay path.
  - name: openapi
    description: Machine-readable API specification
paths:
  /fiat/deposits/quote:
    post:
      tags:
        - fiat
      summary: Quote a top-up (moves no money) — the PeridotID checkout summary
      description: |
        Returns the transparent breakdown shown before DOKU: Amount, PeridotID
        Fee (Rp0 for verified apps), App Fee, per-method Payment Gateway Fee and
        Total Payment, plus `paymentMethods[]` (per-category fee + total) so the
        summary updates on selection. Only **enabled** methods are listed; the
        wallet blocks the top-up when the list is empty.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - netAmountIdr
              properties:
                netAmountIdr:
                  type: string
                clientId:
                  type: string
                paymentMethod:
                  type: string
      responses:
        '200':
          description: Top-up quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositQuote'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - cookieAuth: []
components:
  schemas:
    DepositQuote:
      type: object
      required:
        - amountIdr
        - netIdr
        - peridotFeeIdr
        - peridotTaxIdr
        - appFeeIdr
        - appCategory
        - gatewayFeeEnabled
        - gatewayFeeIdr
        - gatewayTaxIdr
        - transferFeeIdr
        - totalIdr
        - feePolicyVersion
        - paymentMethods
      properties:
        amountIdr:
          type: string
        netIdr:
          type: string
        peridotFeeIdr:
          type: string
          description: PeridotID platform fee — Rp0 for verified apps (excludes PPN)
        peridotTaxIdr:
          type: string
          description: >-
            PPN on the PeridotID fee (wallet folds all fees into one "Transfer
            Fee" line)
        appFeeIdr:
          type: string
        appCategory:
          type: string
          enum:
            - verified
            - public
        paymentMethod:
          type: string
          nullable: true
        gatewayFeeEnabled:
          type: boolean
          description: >-
            Selected method's gateway fee is enabled (show the line only when
            true)
        gatewayFeeIdr:
          type: string
        gatewayTaxIdr:
          type: string
          description: >-
            DOKU PPN on the gateway fee (wallet folds all fees into one
            "Transfer Fee" line)
        transferFeeIdr:
          type: string
          description: Combined display line — PeridotID fee+PPN + DOKU gateway fee+PPN
        totalIdr:
          type: string
        feePolicyVersion:
          type: integer
        paymentMethods:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethodOption'
    PaymentMethodOption:
      type: object
      required:
        - key
        - label
        - category
        - enabled
        - gatewayFeeIdr
        - gatewayTaxIdr
        - rateKey
        - source
        - totalIdr
      properties:
        key:
          type: string
          description: Category key (pass back as paymentMethod)
        label:
          type: string
        category:
          type: string
        enabled:
          type: boolean
          description: false = not offered (hidden in the wallet)
        gatewayFeeIdr:
          type: string
        gatewayTaxIdr:
          type: string
          description: DOKU PPN on this method's gateway fee
        rateKey:
          type: string
          description: Which rate row applied (method code, category, or "*")
        source:
          type: string
          enum:
            - doku
            - config
        totalIdr:
          type: string
    ApiError:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            statusCode: 400
            message:
              - >-
                handle must be 3-20 chars: lowercase letters, numbers,
                underscore
    Unauthorized:
      description: Missing, expired, or invalid access/refresh token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            statusCode: 401
            message: Unauthorized
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: pid_access
      description: JWT access token set by /auth/google/callback or /auth/refresh

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.