---
title: O Auth
full: true
_openapi:
  toc:
    - depth: 2
      title: Start OAuth Authorization
      url: '#start-oauth-authorization'
    - depth: 2
      title: Exchange Tokens
      url: '#exchange-tokens'
    - depth: 2
      title: OAuth Server Metadata
      url: '#oauth-server-metadata'
  structuredData:
    headings:
      - content: Start OAuth Authorization
        id: start-oauth-authorization
      - content: Exchange Tokens
        id: exchange-tokens
      - content: OAuth Server Metadata
        id: oauth-server-metadata
    contents:
      - content: >
          Start the OAuth 2.0 authorization code flow. Redirect users to this
          endpoint

          to request permission to make payments on their behalf.
        heading: start-oauth-authorization
      - content: >-
          Exchange authorization code for access token, or refresh an access
          token.
        heading: exchange-tokens
      - content: OAuth 2.0 Authorization Server Metadata (RFC 8414)
        heading: oauth-server-metadata
---

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

OAuth 2.0 authentication flow

<APIPage document={"content/openapi/agnicpay.yaml"} operations={[{"path":"/oauth/authorize","method":"get"},{"path":"/oauth/token","method":"post"},{"path":"/.well-known/oauth-authorization-server","method":"get"}]} webhooks={[]} hasHead={true} />