Skip to main content
Version: SDK V3

Dashboard APIs

Using these APIs allow you to perform various actions without the need to access the dashboard UI manually.

Auth Token

To obtain an authToken required in the header, you can generate one in your account settings page on the biconomy dashboard.

1. Get list of Paymasters:

GET Request

https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/paymaster

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired

Responses

200 OK

{
"statusCode": 200,
"message": "DApp list fetched",
"data": [
{
"name": "setQuote",
"chainId": 80002,
"apiKey": "lU3R_dRgt.22c06266-1faa-4c47-8477-e8eaacd90330"
},
{
"name": "setQuote",
"chainId": 137,
"apiKey": "rEEgKf5DS.a4e4f2c9-de7e-4a13-ac2d-6a9120714d61"
}
]
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}

2. Create a new Paymaster:

POST Request

https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/paymaster

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired

Body

ParamTypeDescriptionRequired
namestringUnique name of the DApp for a chain idRequired
typestringType of paymaster to be set up, in this case will be "HYBRID"Required
chainIdnumberNetwork on which the DApp existsRequired
versionstringString that represents the version of Paymaster to be used for the dAppRequired

200 OK

{
"statusCode": 200,
"message": "DApp registered successfully",
"data": {
"name": "setQuoteAmoy",
"chainId": 80002,
"apiKey": "vrTVKqTZI.7ea9dae1-9a06-4c17-a4fb-7728177b76d3" // apiKey is used to init biconomy instance to relay transactions for this Dapp
}
}

400 Bad Request

Paymaster Name Already Exists

{
"statusCode": 400,
"message": "paymaster_name_exists"
}

400 Bad Request

Chain Id not supported

{
"statusCode": 400,
"message": "Chain ID not supported"
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token is required in the headers"
}

To manage the smart contracts associated with your DApp, we provide a set of endpoints that allow you to perform actions such as adding, updating, deleting, and retrieving a list of smart contracts. To access these endpoints, you will need to include the "apiKey" parameter in the header of your requests along with the "authToken".

The "apiKey" can be obtained in two ways:

When creating your DApp, you will receive an "apiKey" as part of the registration process.

Alternatively, if you already have a DApp registered, you can find the "apiKey" in the list API of the DApp.

3. Create a Smart Contract:

POST Request

URL: "https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/smart-contract"

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired
apiKeystringAPI Key Associated with dAppRequired

Body

ParamTypeDescriptionRequired
namestringUnique name of smart contractRequired
addressstringAddress of smart contractRequired
abistringStringified ABI of smart contractRequired
whitelistedMethodsarray of stringsList of method names of smart contract which are to be sponsored by DAppOptional

Responses

200 OK

{
"statusCode": 200,
"message": "Smart contract registered successfully"
}

400 Bad Request

Smart Contract Already Exists

{
"statusCode": 400,
"message": "Smart contract address already exists"
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}

4. Get List of Smart Contracts:

GET Request

https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/smart-contract

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired
apiKeystringAPI Key Associated with dAppRequired

200 OK

{
"statusCode": 200,
"message": "Smart contract list fetched",
"data": [
{
"name": "Set Quote",
"address": "0xe31b0bcbda693bff2529f4a1d9f7e8f6d924c6ab",
"abi": "[ { \"inputs\": [ { \"internalType\": \"string\", \"name\": \"newQuote\", \"type\": \"string\" } ], \"name\": \"setQuote\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [], \"name\": \"admin\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getQuote\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"currentQuote\", \"type\": \"string\" }, { \"internalType\": \"address\", \"name\": \"currentOwner\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"owner\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"quote\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]",
"whitelistedMethods": [
"setQuote"
],
"methods": [
"setQuote"
]
}
]
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}

5. Update Smart Contract Whitelisted Methods:

PATCH Request

https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/smart-contract

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired
apiKeystringAPI Key Associated with dAppRequired

Body

ParamTypeDescriptionRequired
addressstringSmart contract addressRequired
whitelistedMethodsarray of stringsList of method names of smart contract which are to be sponsored by DAppRequired

Responses

200 OK

{
"statusCode": 200,
"message": "Smart contract updated",
"data": {
"name": "Set Quote",
"address": "0xe31b0bcbda693bff2529f4a1d9f7e8f6d924c6ab",
"abi": "[ { \"inputs\": [ { \"internalType\": \"string\", \"name\": \"newQuote\", \"type\": \"string\" } ], \"name\": \"setQuote\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [], \"name\": \"admin\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getQuote\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"currentQuote\", \"type\": \"string\" }, { \"internalType\": \"address\", \"name\": \"currentOwner\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"owner\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"quote\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]",
"whitelistedMethods": [
"setQuote"
],
"methods": [
"setQuote"
]
}

}

400 Bad Request

Whitelisted methods must be an array

{
"statusCode": 400,
"message": "whitelistedMethods must be an array"
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}

404 Not Found

Usually, this occurs when incorrect apiKey is used or the address is not added

{
"statusCode": 400,
"message": "Smart contract not found"
}

6. Update Sponsorship Paymaster Funding Wallet:

It is a 3-step process.
1. Generate a message from biconomy servers, for the sponsorship paymaster.

GET Request

https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/funding-message/{{paymasterId}}

Headers

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired
apiKeystringAPI Key Associated with dAppRequired

Responses

200 OK

{
"statusCode": 200,
"message": "Funding message sent",
"data": {
"fundingMessage": "Timestamp: November 27, 2023, 5:05 PM\nWelcome to Biconomy! This request will connect your gas tank to our app. It will not trigger a blockchain transaction or incur any fees."
}
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}
2. Sign the generated message using the private key of the EOA (Funding Wallet).
3. Send the request to biconomy to update the funding wallet address.

PATCH Request

 https://paymaster-dashboard-backend.prod.biconomy.io//api/v2/public/sdk/paymaster

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired
apiKeystringAPI Key Associated with dAppRequired

Body

ParamTypeDescriptionRequired
paymasterIdstringSponsorship Paymaster IdRequired
typestringMethod Name.
Use "paymasterFundingId" here
Required
signaturestringSignature generated using private key of EOARequired
addressstringAddress of the EOA which is to be updated as funding walletRequired

Responses

200 OK

{
"statusCode": 200,
"message": "Paymaster updated successfully",
"data": {
"name": "testXXX",
"chainId": 80002,
"apiKey": "GwfDKydYq.2967f140-XXXX-4042-XXXX-76684f9XXXX",
"paymasterId": "e998530d-XXXX-451e-XXXX-cb6fXXXXef54"
}
}

400 Bad Request

This happens, when there is a signature mismatch, either because an older message is used to generate the signature, or EOA address mentioned in the request body, is not the address which signed the message.

{
"statusCode": 400,
"message": "Invalid signature"
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}

404 Not Found

Usually, this occurs when incorrect apiKey or authToken is used

{
"statusCode": 404,
"message": "User not found"
}

7. Delete Smart Contract

DELETE Request

https://paymaster-dashboard-backend.prod.biconomy.io/api/v2/public/sdk/smart-contract

Parameters

Header

ParamTypeDescriptionRequired
authTokenstringToken unique to every user accountRequired
apiKeystringAPI Key Associated with dAppRequired

Body

ParamTypeDescriptionRequired
addressstringSmart contract addressRequired

Responses

200 OK

{
"statusCode": 200,
"message": "Smart contract deleted"
}

401 Unauthorized

{
"statusCode": 401,
"message": "Auth token and API key is required in the headers"
}

404 Not Found

{
"statusCode": 400,
"message": "Smart contract not found"
}

Was this page helpful?