Wallet & Billing Guide
Complete guide to managing payments on Mindra Platform using FIAT or cryptocurrency.
Overview
Mindra Platform supports two payment methods:
- FIAT (Credit/Debit Card) - via Stripe
- Crypto (XRP on XRP Ledger) - Instant, low-cost
Wallet System
Every user has a wallet that holds their balance. Executions deduct from this balance automatically.
Check Your Balance
curl https://api.mindra.co/v1/wallet \
-H "Authorization: Bearer mk_your_api_key"
Response:
{
"wallets": [
{
"id": "wallet_abc123",
"type": "FIAT",
"balance": 100.00,
"currency": "USD",
"isActive": true,
"createdAt": "2025-11-01T00:00:00Z"
},
{
"id": "wallet_crypto456",
"type": "CRYPTO",
"balance": 500.00,
"currency": "XRP",
"blockchainAddress": "rN7n7otQDd6FczFgLdlqtyMVrn3HMfSeXy",
"blockchainNetwork": "xrpl",
"isActive": true,
"createdAt": "2025-11-01T00:00:00Z"
}
]
}
Wallet Types
FIAT Wallet:
- Currency: USD
- Top-up: Credit/debit card via Stripe
- Processing: Instant
- Fees: Standard Stripe fees (~2.9% + $0.30)
Crypto Wallet:
- Currency: XRP
- Network: XRP Ledger (low transaction fees)
- Top-up: Send XRP to your deposit address
- Processing: ~4 seconds (1 ledger confirmation)
- Fees: Minimal transaction fees (~$0.0001)
FIAT Payments (Stripe)
One-Time Top-Up
curl -X POST https://api.mindra.co/v1/wallet/topup \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"paymentMethod": "card",
"paymentMethodId": "pm_1234567890"
}'
Parameters:
amount: Amount in USD (min: $10, max: $10,000 per transaction)paymentMethod: Always"card"paymentMethodId: Stripe payment method ID
Response (200 OK):
{
"transactionId": "txn_abc123",
"amount": 100.00,
"currency": "USD",
"status": "completed",
"newBalance": 200.00,
"stripeChargeId": "ch_1234567890",
"createdAt": "2025-11-10T10:00:00Z"
}
Set Up Payment Method
Use Stripe's client libraries to collect payment information securely:
Frontend (React Example):
import { loadStripe } from '@stripe/stripe-js';
import { Elements, CardElement, useStripe, useElements } from '@stripe/react-stripe-js';
const stripePromise = loadStripe('pk_live_YOUR_PUBLISHABLE_KEY');
function TopUpForm() {
const stripe = useStripe();
const elements = useElements();
const handleSubmit = async (event) => {
event.preventDefault();
// Create payment method
const { paymentMethod, error } = await stripe.createPaymentMethod({
type: 'card',
card: elements.getElement(CardElement),
});
if (error) {
console.error(error);
return;
}
// Top up wallet
const response = await fetch('https://api.mindra.co/v1/wallet/topup', {
method: 'POST',
headers: {
'Authorization': `Bearer ${MINDRA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
amount: 100.00,
paymentMethod: 'card',
paymentMethodId: paymentMethod.id,
}),
});
const result = await response.json();
console.log('Top-up successful:', result);
};
return (
<form onSubmit={handleSubmit}>
<CardElement />
<button type="submit" disabled={!stripe}>
Add $100
</button>
</form>
);
}
function App() {
return (
<Elements stripe={stripePromise}>
<TopUpForm />
</Elements>
);
}
Auto-Reload
Set up automatic top-ups when balance falls below threshold:
curl -X POST https://api.mindra.co/v1/wallet/auto-reload \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"threshold": 50.00,
"reloadAmount": 100.00,
"paymentMethodId": "pm_1234567890"
}'
How it works:
- When balance < $50, automatically charge $100
- Prevents failed executions due to insufficient funds
- Email notification after each reload
Invoices & Receipts
All transactions generate invoices automatically.
List Invoices:
curl https://api.mindra.co/v1/wallet/invoices \
-H "Authorization: Bearer mk_your_api_key"
Download Invoice PDF:
curl https://api.mindra.co/v1/wallet/invoices/inv_123/pdf \
-H "Authorization: Bearer mk_your_api_key" \
-o invoice.pdf
Crypto Payments (XRP on XRP Ledger)
Why Crypto?
Benefits:
- Instant: Confirmed in ~30 seconds
- Low Cost: Gas fees ~$0.01 vs Stripe 2.9%+
- Global: No geographic restrictions
- No Chargebacks: Irreversible transactions
- Privacy: No card details required
Why XRP Ledger:
- Extremely low transaction fees (~$0.0001)
- Fast confirmations (~3-5 seconds)
- High throughput (1,500 TPS)
- Established and reliable blockchain
Get Your Deposit Address
curl https://api.mindra.co/v1/wallet/crypto/address \
-H "Authorization: Bearer mk_your_api_key"
Response:
{
"network": "xrpl",
"address": "rN7n7otQDd6FczFgLdlqtyMVrn3HMfSeXy",
"token": "XRP",
"tokenContract": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"minimumDeposit": 10.00
}
Send XRP
Using MetaMask:
- Open MetaMask
- Switch to XRP Ledger network
- Click "Send"
- Enter address:
rN7n7otQDd6FczFgLdlqtyMVrn3HMfSeXy - Select XRP token
- Enter amount (min $10)
- Confirm transaction
Using Web3.js:
const Web3 = require('web3');
const web3 = new Web3('https://xrpl-rpc.com');
const XRP_CONTRACT = '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174';
const MINDRA_ADDRESS = 'rN7n7otQDd6FczFgLdlqtyMVrn3HMfSeXy';
const usdcContract = new web3.eth.Contract(XRP_ABI, XRP_CONTRACT);
const amount = web3.utils.toWei('100', 'mwei'); // XRP has 6 decimals
const tx = await usdcContract.methods.transfer(MINDRA_ADDRESS, amount).send({
from: YOUR_ADDRESS,
gasPrice: await web3.eth.getGasPrice(),
});
console.log('Transaction:', tx.transactionHash);
Using ethers.js:
const { ethers } = require('ethers');
const provider = new ethers.JsonRpcProvider('https://xrpl-rpc.com');
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
const XRP_CONTRACT = '0x2791Bca1f2de4661ED88A7a9449Aa84174';
const MINDRA_ADDRESS = 'rN7n7otQDd6FczFgLdlqtyMVrn3HMfSeXy';
const usdcContract = new ethers.Contract(XRP_CONTRACT, XRP_ABI, wallet);
const amount = ethers.parseUnits('100', 6); // XRP has 6 decimals
const tx = await usdcContract.transfer(MINDRA_ADDRESS, amount);
await tx.wait();
console.log('Transaction:', tx.hash);
Track Deposit Status
Deposits are credited after 25 confirmations (~50 seconds):
curl https://api.mindra.co/v1/wallet/crypto/deposits \
-H "Authorization: Bearer mk_your_api_key"
Response:
{
"deposits": [
{
"id": "deposit_123",
"transactionHash": "0x1234...5678",
"amount": 100.00,
"token": "XRP",
"network": "xrpl",
"status": "confirmed",
"confirmations": 25,
"blockNumber": 12345678,
"createdAt": "2025-11-10T10:00:00Z",
"confirmedAt": "2025-11-10T10:00:50Z"
}
]
}
Status Values:
pending: Transaction detected, waiting for confirmationsconfirmed: 25+ confirmations, credited to walletfailed: Transaction failed (reverted)
Withdraw XRP
Withdraw unused funds back to your wallet:
curl -X POST https://api.mindra.co/v1/wallet/crypto/withdraw \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 50.00,
"toAddress": "0xYourWalletAddress",
"network": "xrpl"
}'
Parameters:
amount: Amount in XRP (min: $10)toAddress: Your XRP Ledger wallet addressnetwork: Always"xrpl"
Response:
{
"withdrawalId": "withdrawal_123",
"amount": 50.00,
"toAddress": "0xYourWalletAddress",
"network": "xrpl",
"status": "pending",
"estimatedCompletion": "2025-11-10T10:05:00Z"
}
Processing Time: 5-10 minutes
Transaction History
List All Transactions
curl https://api.mindra.co/v1/wallet/transactions \
-H "Authorization: Bearer mk_your_api_key"
Response:
{
"transactions": [
{
"id": "txn_123",
"type": "CREDIT",
"amount": 100.00,
"description": "Wallet top-up via card",
"balance": 200.00,
"createdAt": "2025-11-10T10:00:00Z"
},
{
"id": "txn_124",
"type": "DEBIT",
"amount": 0.50,
"description": "Execution exec_abc123",
"balance": 199.50,
"executionId": "exec_abc123",
"createdAt": "2025-11-10T10:15:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 247
}
}
Filter Transactions
# By type
curl "https://api.mindra.co/v1/wallet/transactions?type=DEBIT" \
-H "Authorization: Bearer mk_your_api_key"
# By date range
curl "https://api.mindra.co/v1/wallet/transactions?startDate=2025-11-01&endDate=2025-11-10" \
-H "Authorization: Bearer mk_your_api_key"
# Export CSV
curl "https://api.mindra.co/v1/wallet/transactions?format=csv" \
-H "Authorization: Bearer mk_your_api_key" \
-o transactions.csv
Pricing & Costs
Execution Costs
Costs vary by agent and usage:
Example Pricing:
- Email Campaign Agent: $0.50/execution + $0.01/email
- Payment Processor: $0.20/transaction + 0.5% of amount
- ML Model: $0.05/execution + $0.001/prediction
Platform Fee:
- Developer: 10% of agent costs (min $0.01)
- Business: 5% of agent costs
- Enterprise: Custom
Example Calculation:
Email Campaign:
- Agent base: $0.50
- 3 emails × $0.01: $0.03
- Subtotal: $0.53
- Platform fee (10%): $0.053
- Total: $0.58 (rounded to $0.60)
Cost Estimation
Get cost estimate before execution:
curl -X POST https://api.mindra.co/v1/orchestrate/estimate \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"query": "Create email campaign with 5 variations",
"context": {
"emailCount": 5
}
}'
Response:
{
"estimatedCost": 0.75,
"breakdown": [
{
"agent": "email-campaign-agent",
"baseCost": 0.50,
"additionalCosts": {
"per_email": 0.05
},
"subtotal": 0.55
},
{
"agent": "social-media-agent",
"baseCost": 0.30,
"subtotal": 0.30
}
],
"platformFee": 0.09,
"total": 0.94,
"currency": "USD"
}
Billing Settings
Monthly Spending Limit
Set maximum monthly spend:
curl -X PATCH https://api.mindra.co/v1/wallet/settings \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"monthlySpendLimit": 1000.00,
"notifyAt": [500.00, 800.00, 950.00]
}'
When limit is reached, new executions are blocked until:
- Next month starts
- You increase the limit
- You contact support
Low Balance Alerts
Get notified when balance is low:
curl -X PATCH https://api.mindra.co/v1/wallet/settings \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"lowBalanceAlert": {
"enabled": true,
"threshold": 25.00,
"email": true,
"webhook": "https://your-app.com/webhooks/low-balance"
}
}'
Enterprise Billing
Enterprise customers get additional billing options:
Invoiced Billing
Monthly invoicing instead of prepaid:
- Net-30 or Net-60 terms
- Purchase order support
- Volume discounts applied
- Detailed usage reports
Contact: info@mindra.co
Custom Pricing
Negotiable rates for high-volume usage:
- Custom platform fees
- Agent bundle pricing
- Committed use discounts
- Reserved capacity pricing
FAQs
Q: What happens if my balance runs out during execution? A: Pre-execution balance check prevents this. If your balance is insufficient, the execution won't start.
Q: Can I get a refund? A: Yes, for unused balance. Contact info@mindra.co. Card payments: 5-10 business days. Crypto: 1-2 hours.
Q: Are there any hidden fees? A: No. All costs shown upfront. Only pay for successful executions.
Q: Can I use multiple payment methods? A: Yes! Have both FIAT and crypto wallets. Choose which to use per execution.
Q: Is XRP the only supported crypto? A: Currently yes. More tokens coming soon (USDT, DAI, ETH).
Q: What if I send the wrong amount of XRP? A: Any amount ≥ $10 is credited. Amounts < $10 are returned (minus gas).
Q: Can I pay per execution instead of prepaying? A: Enterprise customers can use invoiced billing. Contact info@mindra.co.
Support
- Billing Issues: info@mindra.co
- Crypto Support: info@mindra.co
- General: info@mindra.co
Next: Getting Started | Enterprise