How Do I Provision Wallets for My Users?
As a member of the Bankr Partner Program, you can programmatically create and manage EVM wallets for your users. This allows you to integrate Bankr's DeFi capabilities directly into your own application while earning a share of the trading fees generated by those wallets.
Prerequisites
Before you can provision wallets, you must complete the following setup:
Apply for Partnership: If you haven't already, visit bankr.bot/partner to apply.
Get Provisioned: The Bankr team will create your partner organization and enable the necessary capabilities.
Generate a Partner Key: You will need an
X-Partner-Keyto authenticate your requests. This key is managed at the organization level.
Step 1: Authenticate Your Request
All wallet provisioning requests must include your partner key in the header. This identifies your organization and ensures the new wallet is correctly linked to your fee-sharing configuration.
X-Partner-Key: YOUR_PARTNER_API_KEY
Step 2: Create the Wallet
To create a new wallet, send a POST request to the provisioning endpoint. This will immediately return a new EVM address for your user.
POST /partner/wallets
Step 3: Use Key Parameters
When making the request, you can include several optional fields to streamline the user experience:
idempotencyKey: Use your internal user ID as the idempotency key. This allows you to safely retry the request if it fails; if a wallet already exists for that key, Bankr will simply return the existing wallet details instead of creating a new one.
apiKey: Set this to
trueto generate a wallet-level API key at the same time. This allows the user (or your app on their behalf) to start making requests immediately.fund: You can specify an amount to transfer from your organization's deployment wallet to the new user wallet during creation. This ensures the user has enough gas to perform their first few transactions.
Example Request
Here is an example of how you might structure a request to provision a wallet for a new user:
{ "idempotencyKey": "user_12345", "apiKey": true, "fund": "0.01" }
Managing Provisioned Wallets
Once a wallet is provisioned, it functions as a standard EVM wallet within the Bankr ecosystem. Depending on your organization's capabilities, these wallets can:
Check balances and transaction history.
Submit transactions and sign messages.
Interact with the Agent API to execute natural-language DeFi prompts.
Deploy tokens with automatic fee sharing.
For a deep dive into the technical specifications and available endpoints, visit the Bankr Developer Docs.