POST
/
#pm_paymasterBalance

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
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);
})();

Query Parameters

projectUuid
string
required

UUID of the project.

projectKey
string
required

Key of the project.

Body

application/json
jsonrpc
string
default: 2.0required

Version of the JSON-RPC protocol, should be 2.0.

id
integer
default: 0required

The request identifier.

method
enum<string>
required

API method being called.

Available options:
pm_paymasterBalance
params
any[]
required

No parameters are needed for this request.

Response

200 - application/json
jsonrpc
string
default: 2.0required

Version of the JSON-RPC protocol, should be 2.0.

id
integer
default: 0required

The request identifier.

result
object
required