---
updatedAt: 2026-07-21T18:18:26.000Z
agentTools:
  projectIndex: https://developer.paze.com/public/llms.txt
---

# Create OAuth Token

Needs to create a clientassertion using privatekey, refer - https://datatracker.ietf.org/doc/html/rfc7523. This will return a Token that can be valid for 30 minutes.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Paze Checkout API",
    "description": "Paze Checkout API for Merchants",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.paze.com"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ],
  "paths": {
    "/token": {
      "post": {
        "summary": "Create OAuth Token",
        "tags": [
          "Identity"
        ],
        "servers": [
          {
            "url": "https://auth.paze.com"
          }
        ],
        "description": "Needs to create a clientassertion using privatekey, refer - https://datatracker.ietf.org/doc/html/rfc7523. This will return a Token that can be valid for 30 minutes.",
        "requestBody": {
          "description": "Request Body",
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "client_assertion": {
                    "$ref": "#/components/schemas/client_assertion"
                  },
                  "grant_type": {
                    "$ref": "#/components/schemas/grant_type"
                  },
                  "client_assertion_type": {
                    "$ref": "#/components/schemas/client_assertion_type"
                  }
                }
              },
              "examples": {
                "TokenRequestExample": {
                  "$ref": "#/components/examples/TokenRequestExample"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created a token valid for 30 minutes",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "access_token": {
                      "$ref": "#/components/schemas/access_token"
                    },
                    "expires_in": {
                      "$ref": "#/components/schemas/expires_in"
                    },
                    "token_type": {
                      "$ref": "#/components/schemas/token_type"
                    }
                  }
                },
                "examples": {
                  "TokenResponseExample": {
                    "$ref": "#/components/examples/TokenResponseExample"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid grant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "TokenResponse400InvalidGrantExample": {
                    "$ref": "#/components/examples/TokenResponse400InvalidGrantExample"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. clientAssertion not valid any more.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "TokenResponse401InvalidClientExample": {
                    "$ref": "#/components/examples/TokenResponse401InvalidClientExample"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "grant_type": {
        "type": "string",
        "enum": [
          "client_credentials"
        ]
      },
      "client_assertion": {
        "type": "string"
      },
      "client_assertion_type": {
        "type": "string",
        "enum": [
          "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
        ]
      },
      "access_token": {
        "type": "string"
      },
      "error": {
        "type": "object",
        "description": "A provided error",
        "properties": {
          "error": {
            "type": "string",
            "maxLength": 24
          }
        },
        "required": [
          "error"
        ]
      },
      "expires_in": {
        "type": "string",
        "enum": [
          "1800"
        ]
      },
      "token_type": {
        "type": "string",
        "enum": [
          "bearer"
        ]
      }
    },
    "examples": {
      "TokenRequestExample": {
        "summary": "Token request to server",
        "description": "Request can be sent json format too. This is just an example with 'Content-Type' as 'application/x-www-form-urlencoded'. merchantSessionId is the sessionId will require to send in API payload.",
        "value": {
          "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
          "grant_type": "client_credentials",
          "session_id": "5df9983c-bfa1-49ab-ad52-eaab72b6c7c2",
          "client_assertion": "bearer_token"
        }
      },
      "TokenResponseExample": {
        "summary": "Token response from server",
        "value": {
          "access_token": "bearer_token",
          "expires_in": "1800",
          "token_type": "bearer"
        }
      },
      "TokenResponse401InvalidClientExample": {
        "summary": "401 Unauthorized",
        "value": {
          "error": "invalid_client"
        }
      },
      "TokenResponse400InvalidGrantExample": {
        "summary": "400 Bad Request",
        "value": {
          "error": "invalid_grant"
        }
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.paze.com/token/",
            "scopes": {
              "sessionId": "Merchant sessionId should be passed for create, review and complete"
            }
          }
        }
      }
    }
  }
}
```