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

# paymasterBalance

> Learn how to use the paymasterBalance JSON-RPC method.

## Understanding `paymasterBalance`

* `paymasterBalance` returns the USD balance (6 decimals) of the Paymaster associated with your `projectId` (`projectUuid`) and `serverKey` (`projectKey`). It takes no parameters other than the `projectUuid` and `projectKey` for authentication.

***

## Query example

```javascript JavaScript theme={null}
import Axios from "axios";

const projectUuid = "Your project uuid";
const projectKey = "Your project client key or server key";

const paymasterUrl = "https://paymaster.particle.network";
(async () => {
    const response = await Axios.post(
        paymasterUrl,
        {
            method: "pm_paymasterBalance",
            params: [],
        },
        {
            params: {
                projectUuid,
                projectKey,
            },
        }
    );

    console.log(response.data);
})();
```


## OpenAPI

````yaml openapi-paymaster POST /#pm_paymasterBalance
openapi: 3.0.0
info:
  title: Particle Network Paymaster
  version: 1.0.0
servers:
  - url: https://paymaster.particle.network
security: []
paths:
  /#pm_paymasterBalance:
    post:
      summary: paymasterBalance
      operationId: pm_paymasterBalance
      parameters:
        - in: query
          name: projectUuid
          required: true
          schema:
            type: string
          description: UUID of the project.
        - in: query
          name: projectKey
          required: true
          schema:
            type: string
          description: Key of the project.
      requestBody:
        description: Request to retrieve the balance of the paymaster.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymasterBalanceRPCRequest'
      responses:
        '200':
          description: Successful response with the paymaster balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymasterBalanceResponse'
components:
  schemas:
    PaymasterBalanceRPCRequest:
      allOf:
        - $ref: '#/components/schemas/RPCRequest'
        - type: object
          properties:
            method:
              enum:
                - pm_paymasterBalance
            params:
              type: array
              maxItems: 0
              description: No parameters are needed for this request.
    PaymasterBalanceResponse:
      allOf:
        - $ref: '#/components/schemas/RPCResponse'
        - type: object
          properties:
            result:
              type: object
              properties:
                balance:
                  type: string
                  description: Balance of the paymaster.
                  example: 0xBalance
    RPCRequest:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          default: 0
          description: The request identifier.
          example: 0
        method:
          type: string
          description: API method being called.
        params:
          type: array
          description: Parameters for the API method call.
    RPCResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          default: 0
          description: The request identifier.
          example: 0
        result:
          anyOf:
            - $ref: '#/components/schemas/AnyValue'
    AnyValue:
      anyOf:
        - type: string
        - type: number
        - type: integer
        - type: boolean
        - type: object
        - type: array
          items: {}

````