Prerequisites
Before integrating:
Deploy Business Auto account
Installation
npm i @shakesco/automation
Import the SDK:
const { Automation , parseUnits } = require ( "@shakesco/automation" );
Testing Mode
Test addresses are automatically funded - no need to add balance in testing
mode.
Request Test Address
const your_smart_wallet_address = "" ; // Same for Ethereum and Polygon
const shakescocontract = new Automation (
your_smart_wallet_address ,
process . env . SHAKESCOAPIKEY ,
"11155111" // Sepolia testnet
);
const requestAddress = await shakescocontract . testDelegateAddressBuss ();
console . log ( requestAddress );
// {
// id: "1",
// test_delegate_address: "0x472ef8282b420396ad307cb89f542e60b1dec1a1"
// }
Send Test Request
const address = "" ; // Your test delegate address from above
const shakescocontract = new Automation (
address ,
process . env . SHAKESCOAPIKEY ,
"11155111"
);
const period = "86400" ; // 1 day
const requestUser = await shakescocontract . requestUser (
"0x309E7d835ccE6E74BC72A2E523fa7f79FFC0d413" , // Test user address
"" , // No token (native currency)
period ,
"" , // No amount in test mode
false , // No split payment
[], // No split addresses
[] // No split amounts
);
console . log ( requestUser ); // "Requested user successfully"
Check your Shakesco app: - Business requests → Business Wallet - User requests
→ Personal Wallet
Production Integration
Network IDs
Network Chain ID Ethereum "1"Polygon "137"
Basic Request Flow
Step 1: Initialize SDK
const address = "" ; // From dashboard: users.shakesco.com
const shakescocontract = new Automation (
address ,
process . env . SHAKESCOAPIKEY ,
"137" // Polygon
);
Step 2: Prepare parameters
const period = "604800" ; // 1 week (seconds)
const amount = parseUnits ( "20" , 18 ); // $20 USD
const delegateAddress = "" ; // User's Shakesco card address
Step 3: Send request
// For users
const requestUser = await shakescocontract . requestUser (
delegateAddress ,
"" , // Token address (empty = native)
period ,
amount ,
false , // Split payment
[], // Split addresses
[] // Split amounts
);
// For businesses
const requestBusiness = await shakescocontract . requestBusiness (
delegateAddress ,
"" , // Token address
period ,
amount
);
Period: seconds (e.g., "604800" = 1 week) Amount: USD (e.g., parseUnits("20", 18) = $20) Boolean returns: strings ("true" / "false")
Pre-Request Checks
Verify User Can Be Requested
const shakescocontract = new Automation (
your_smart_wallet_address ,
process . env . SHAKESCOAPIKEY ,
"1"
);
const canRequest = await shakescocontract . canRequest ( delegateAddress );
console . log ( canRequest ); // {"id": 1, "status": "true"}
If status: "false", user must accept requests in Shakesco app first.
Check If Payer Is Business
Different fee rates apply for B2B vs B2C:
const isBusiness = await shakescocontract . isBusiness ( delegateAddress );
console . log ( isBusiness ); // {"id": 1, "is_business": false}
Token Payments
Request payment in DAI (stablecoin).
Polygon example:
const tokenAddress = "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063" ; // DAI
const shakescocontract = new Automation (
address ,
process . env . SHAKESCOAPIKEY ,
"137"
);
const requestUser = await shakescocontract . requestUser (
delegateAddress ,
tokenAddress ,
"604800" ,
parseUnits ( "20" , 18 ),
false ,
[],
[]
);
Supported token on Polygon: DAI only
Ethereum example:
const tokenAddress = "0x6B175474E89094C44Da98b954EedeAC495271d0F" ; // DAI
const shakescocontract = new Automation (
address ,
process . env . SHAKESCOAPIKEY ,
"1"
);
const requestUser = await shakescocontract . requestUser (
delegateAddress ,
tokenAddress ,
"604800" ,
parseUnits ( "20" , 18 ),
false ,
[],
[]
);
Supported token on Ethereum: DAI only
See all token addresses →
Token addresses must be checksummed. Use addresses from the documentation
exactly.
Check Payment Status
Critical: Verify payment before granting service access:
const shakescocontract = new Automation (
address ,
process . env . SHAKESCOAPIKEY ,
"137"
);
const hasPaid = await shakescocontract . hasPaid ( delegateAddress );
console . log ( hasPaid ); // "true" or "false"
Always check payment status before delivering service. This is your only
verification method.
Additional Methods
Check If User Was Requested
const isRequested = await shakescocontract . isRequested ( delegateAddress );
console . log ( isRequested ); // "true" / "false"
Pricing & Fees
Pricing Plans View subscription tiers and rates
Transaction Fees See per-transaction charges
Need Custom Intervals?
Daily automation not offered by default. Need it? Contact us .
Next Steps
API Integration Prefer REST API? View the API documentation