Get Started in Three Steps
Get up and running with Tender’s API and accept your first cryptocurrency payment.
Step 1: Get Your API Credentials
Generate credentials from dashboard
- Log in to your Tender Merchant Dashboard (sandbox) or merchant.tender.cash (live)
- Navigate to Settings → API Credentials
- Click Generate New Credentials
- Select Test Environment for development
- Save your Access ID and Access Secret securely
Use the test environment while integrating. It uses testnet cryptocurrencies with no real value.
Store credentials securely
Never hardcode credentials. Use environment variables:TENDER_ACCESS_ID=your_access_id_here
TENDER_ACCESS_SECRET=your_access_secret_here
TENDER_BASE_URL=https://sandbox-api.tender.cash
Step 2: Make Your First API Call
Choose your preferred language and make a request to create an agent:
import crypto from 'crypto';
import { v4 as uuidv4 } from 'uuid';
// Your credentials
const accessId = process.env.TENDER_ACCESS_ID;
const accessSecret = process.env.TENDER_ACCESS_SECRET;
// Generate signature
const requestId = uuidv4();
const timeStamp = new Date().toISOString();
const payload = {
timeStamp,
requestId,
accessId
};
const signature = crypto
.createHmac('sha256', accessSecret)
.update(JSON.stringify(payload))
.digest('base64');
// Make API request
const response = await fetch('https://sandbox-api.tender.cash/v1/api/agent/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-access-id': accessId,
'x-request-id': requestId,
'x-timestamp': timeStamp,
'authorization': signature
},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
phoneNumber: '1234567890',
location: 'Lagos',
address: '123 Main Street',
country: 'Nigeria'
})
});
const data = await response.json();
console.log('Agent created:', data);
Expected Response:
{
"status": "success",
"message": "success",
"data": {
"_id": "66f33b1fa9446a6b6b8f32cd",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"agentId": "abc123xyz",
"active": true,
"createdAt": "2025-01-21T12:00:00.000Z"
}
}
Step 3: Initiate Your First Payment
Now let’s create a cryptocurrency payment:
// Using the agentId from Step 2
const agentId = "abc123xyz";
const paymentResponse = await fetch('https://sandbox-api.tender.cash/v1/api/payment/initiate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-access-id': accessId,
'x-request-id': uuidv4(),
'x-timestamp': new Date().toISOString(),
'authorization': generateSignature() // Use same signature method
},
body: JSON.stringify({
agentId: agentId,
amount: "10.00",
chain: "ethereum",
coin: "usdc"
})
});
const payment = await paymentResponse.json();
console.log('Payment initiated:', payment);
Expected Response:
{
"status": "success",
"message": "success",
"data": {
"txId": "66aec7de809b7f45c42a49f9",
"type": "receive",
"chain": "ethereum",
"amount": "10.00",
"usdAmount": "10.00",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"status": "pending",
"agentId": "abc123xyz"
}
}
The walletAddress is where your customer should send the cryptocurrency. Monitor the transaction status using webhooks or the validation endpoint.
Next Steps
Now that you’ve made your first requests, explore more features:
Testing Your Integration
Before going to production:
Test all payment flows
Test with different blockchains and currencies in the test environment
Set up webhooks
Configure and test webhook delivery for transaction events
Handle errors
Implement proper error handling for failed transactions
Security review
Ensure API credentials are stored securely and never exposed
Go live
Switch to production credentials and base URL
Need Help?