zks_getTestnetPaymaster | zkSync Era
curl --request POST \
--url https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getTestnetPaymaster",
"params": []
}
'import requests
url = "https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getTestnetPaymaster",
"params": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'zks_getTestnetPaymaster', params: []})
};
fetch('https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'zks_getTestnetPaymaster',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getTestnetPaymaster\",\n \"params\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getTestnetPaymaster\",\n \"params\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getTestnetPaymaster\",\n \"params\": []\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"paymasterAddress": "<string>"
}
}Zksync node API
zks_getTestnetPaymaster | zkSync Era
zkSync Era API method that returns the address of the testnet paymaster. Reference for zks_getTestnetPaymaster on zkSync Era via Chainstack.
POST
/
da5f4c6274cd225217d352308a952d2f
zks_getTestnetPaymaster | zkSync Era
curl --request POST \
--url https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getTestnetPaymaster",
"params": []
}
'import requests
url = "https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getTestnetPaymaster",
"params": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'zks_getTestnetPaymaster', params: []})
};
fetch('https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'zks_getTestnetPaymaster',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getTestnetPaymaster\",\n \"params\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getTestnetPaymaster\",\n \"params\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zksync-sepolia.core.chainstack.com/da5f4c6274cd225217d352308a952d2f")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getTestnetPaymaster\",\n \"params\": []\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"paymasterAddress": "<string>"
}
}zkSync Era API method that returns the address of the testnet paymaster. This paymaster is available on testnets and facilitates transactions where fees can be paid using ERC-20 compatible tokens, enabling developers to test their applications without needing native network tokens for fee payment.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
none
Response
result— the address of the testnet paymaster.
The interactive example fetches the paymaster address from the zkSync Sepolia testnet.
Use case
Developers working on DApps for the zkSync network could use thezks_getTestnetPaymaster method to configure their applications to use the testnet paymaster for transactions. This allows for seamless testing of fee payments in ERC-20 tokens, enabling broader testing scenarios without the need for acquiring native testnet tokens.Body
application/json
Last modified on June 22, 2026
Was this page helpful?