#coinbaseapi #Autopayment
#bjs
1. Command :
/setup
Libs.Coinbase.setup();
Bot.sendMessage(
"Now please go to BB App > Admin Panel and setup Api Keys. Then run /setupCB"
);
2. Command :
/setupCB
Libs.Coinbase.apiCall({
method: "GET", // method can be GET and POST
path: "accounts",
onSuccess: "onGetAccounts",
onError: "/onApiError" // onError command
// background: true // perform api call in background for big timeout limit
})
3. onGetAccounts
var json = options.result;
var accounts = json["data"];
Bot.setProperty("CB-accounts", accounts, "json");
Bot.sendMessage("Setupped. Total accounts: " + accounts.length)
4. /onSuccess
var result = options.result.data
var amountsent = result.amount.amount.slice(1,500)
var email = result.to.email
Bot.sendInlineKeyboard([{title: "🔙 Back", command: "/start" }],"💸 *Payment Successfully Send. Check Your Coinbase.*\n\n*Amount :*"+amountsent+" *BTC*\n*Email :*"+email);
var tex = "✅ *New* *Withdrawal* *Send*\n🗣 *User* : @" +user.username+ "\n🌐 *Coinbase* *Email*: "+email+"\n💵 *Amount* : " +amountsent+ " *BTC*\n🤖 *Bot* *Link*: @" +bot.name+ "\n\✅*Status*: *Paid*\n\n🎉Earn Upto 200$ Bitcoin By Complete Survey. Refer Your Friends and gets extra 15% of their Earning🎉";
Api.sendMessage({chat_id:"@SurveyEarningBotPaymentChannel",text:(""+tex+""),parse_mode:"markdown"})
5. /onCoinbaseNotify
Bot.sendMessage("We have notify from CoinBase");
data = options;
Bot.sendMessage(
JSON.stringify(data).substr(0, 1000) // just first 1000 symbols
)
6. /withdraw
Answer
*💵 WITHDRAW*
🔻 *Please send me how much you want to withdraw.....*
✅ wait for answer
Libs.Coinbase.apiCall({
method: "POST",
path: "accounts/input coinbase account id here/transactions/", // you find it in coinbase.com/accounts/111111
body: {
"type": "send",
"to": email,
"amount": message,
"currency": "BTC"
},
onSuccess: "/onSuccess",
onError: "/onApiError" // onError command
// background: true // perform api call in background for big timeout limit
// apiKey - if you need custom Api Key
// secretApiKey - if you need custom Api Key
})
#bjs
1. Command :
/setup
Libs.Coinbase.setup();
Bot.sendMessage(
"Now please go to BB App > Admin Panel and setup Api Keys. Then run /setupCB"
);
2. Command :
/setupCB
Libs.Coinbase.apiCall({
method: "GET", // method can be GET and POST
path: "accounts",
onSuccess: "onGetAccounts",
onError: "/onApiError" // onError command
// background: true // perform api call in background for big timeout limit
})
3. onGetAccounts
var json = options.result;
var accounts = json["data"];
Bot.setProperty("CB-accounts", accounts, "json");
Bot.sendMessage("Setupped. Total accounts: " + accounts.length)
4. /onSuccess
var result = options.result.data
var amountsent = result.amount.amount.slice(1,500)
var email = result.to.email
Bot.sendInlineKeyboard([{title: "🔙 Back", command: "/start" }],"💸 *Payment Successfully Send. Check Your Coinbase.*\n\n*Amount :*"+amountsent+" *BTC*\n*Email :*"+email);
var tex = "✅ *New* *Withdrawal* *Send*\n🗣 *User* : @" +user.username+ "\n🌐 *Coinbase* *Email*: "+email+"\n💵 *Amount* : " +amountsent+ " *BTC*\n🤖 *Bot* *Link*: @" +bot.name+ "\n\✅*Status*: *Paid*\n\n🎉Earn Upto 200$ Bitcoin By Complete Survey. Refer Your Friends and gets extra 15% of their Earning🎉";
Api.sendMessage({chat_id:"@SurveyEarningBotPaymentChannel",text:(""+tex+""),parse_mode:"markdown"})
5. /onCoinbaseNotify
Bot.sendMessage("We have notify from CoinBase");
data = options;
Bot.sendMessage(
JSON.stringify(data).substr(0, 1000) // just first 1000 symbols
)
6. /withdraw
Answer
*💵 WITHDRAW*
🔻 *Please send me how much you want to withdraw.....*
✅ wait for answer
Libs.Coinbase.apiCall({
method: "POST",
path: "accounts/input coinbase account id here/transactions/", // you find it in coinbase.com/accounts/111111
body: {
"type": "send",
"to": email,
"amount": message,
"currency": "BTC"
},
onSuccess: "/onSuccess",
onError: "/onApiError" // onError command
// background: true // perform api call in background for big timeout limit
// apiKey - if you need custom Api Key
// secretApiKey - if you need custom Api Key
})