Sinisterly
Bronze [Script] Stripe Invoicing Script - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Python (https://sinister.ly/Forum-Python)
+--- Thread: Bronze [Script] Stripe Invoicing Script (/Thread-Bronze-Script-Stripe-Invoicing-Script)



[Script] Stripe Invoicing Script - anonymousgyps - 12-23-2023

Self created python script to send invoice with Stripe API Key

Script will Auto Rotate Keys for every Email.

Script Structure
Python Main Code : Main.py
Setting File : Settings.Json
Contacts File : Cust.csv

Cust.csv file contains Headers

Code:
CSV FORMAT Fullname  Email

PYTHON CODE

Code:
import time import datetime as DT import json import stripe import csv #SECRET_KEY ="SK_Live_#####################" #SECRET_KEY ="SK_Live_#####################" AMOUNT = 22999 CSV_FILE = "cust.csv" #stripe.api_key = SECRET_KEY settings = {} def create_invoice(customer):         desc = "Dear " + customer["name"] + """ [font=Courier New]#########YOUR MESSAGE################[/font]     """     try:         invoice = stripe.Invoice.create(             customer = customer["id"],             collection_method = "send_invoice",             days_until_due = 7,             description = desc         )                 #print(invoice)                 item = stripe.InvoiceItem.create(             customer = customer["id"],             invoice = invoice["id"],             amount = AMOUNT,             currency = "USD",             description = "Geek Squad Advanced Protection (12 Months Subscription)"         )                 return invoice     except Exception as e:         print(e)         return None def send_invoice(invoice):         try:         sent = stripe.Invoice.send_invoice(             invoice["id"]         )                 return sent         except stripe.error.RateLimitError as rE:         time.sleep(1)         return send_invoice(invoice)     except Exception as e:         print(e)         return None def read_customers():     custs = []     with open (CSV_FILE) as file:           reader = csv.DictReader(file)           for row in reader:               cust = {                   "name": row["Fullname"],                   "email": row["Email"]               }               custs.append(cust)         return custs def load_settings():     global settings         print("Loading settings...")     with open('settings.json', 'r') as file:         obj = json.load(file)                 try:             print("Amount: " + str(obj["amount"]))             print("Number Of Mails Per Account: " + str(obj["number_of_mails_per_account"]))             print("Delay Between Account Switch: " + str(obj["delay_between_account_switch"]))             print("Delay Between Each Invoice: " + str(obj["delay_between_each_invoice"]))                         accounts = obj["accounts"]                         if(len(accounts) == 0):                 print("No accounts found...")                 return False             else:                 print("Accounts found: " + str(len(accounts)))                         for account in accounts:                 print("Account Name: " + str(account["name"]) + ", SKey: " + str(account["skey"]))                         settings = obj             return True         except:             #print("Unable to read settings file. Make sure it's correct and complete")             return False def start_process():     global AMOUNT         if load_settings():         print("Settings loaded...")     else:         print("Error reading settings file. Exiting...")         return         print("")         AMOUNT = settings["amount"]         accounts = settings["accounts"]         print("Reading Customers...")         customers = read_customers()         if len(customers) == 0:         print("Unable to fetch customers")         return         print("Total Customers: " + str(len(customers)))     print("")         print("Sending invoices...")         account = 0     countAccount = 0     use_account(accounts[account])         count = 0     for customer in customers:         count = count + 1         print("")         print("Customer " + str(count) + ": " + customer["name"] + " - Starting...")                 customer = stripe.Customer.create(             name = customer["name"],             email = customer["email"]         )                 print("Customer registered...")                 invoice = create_invoice(customer)                 if invoice != None:             print("Invoice created. Sending...")             invoiceSent = send_invoice(invoice)                         if invoiceSent != None:                 print("Customer " + str(count) + ": " + customer["name"] + " - Invoice sent...")                 if settings["delay_between_each_invoice"] > 0:             time.sleep(settings["delay_between_each_invoice"])                 countAccount = countAccount + 1         if countAccount >= settings["number_of_mails_per_account"]:             if settings["delay_between_account_switch"] > 0:                 print("\nWaiting between account change...")                 time.sleep(settings["delay_between_account_switch"])             account = account + 1             if account >= len(accounts):                 account = 0                         use_account(accounts[account])             countAccount = 0         print("All invoices sent. Task completed.") def use_account(account):     print("")     print("Using account: " + account["name"])     stripe.api_key = account["skey"] start_process()


Settings.Json filr

JSON

Code:
{     "amount": 22999,     "number_of_mails_per_account": 50,     "delay_between_account_switch": 10,     "delay_between_each_invoice": 0,     "accounts" : [         {             "name": "stripe1",             "skey": "SK_LIVE ###########################################"         },         {             "name": "stripe2",             "skey": "SK_LIVE ###########################################"         }     ] }



DM @ Cybercrow_leaks


RE: [Script] Stripe Invoicing Script - SinisterLin - 12-24-2023

Thank you very much for sharing!


RE: [Script] Stripe Invoicing Script - anonymousgyps - 12-26-2023

i can code personal code aswell


RE: [Script] Stripe Invoicing Script - JJose98 - 12-31-2023

Don't deal with him tho, he be scamming


RE: [Script] Stripe Invoicing Script - anonymousgyps - 12-31-2023

(12-31-2023, 05:19 PM)JJose98 Wrote: Don't deal with him tho, he be scamming

i've never sold anything tho
i just posted the stuff for free


RE: [Script] Stripe Invoicing Script - JJose98 - 12-31-2023

Wells Fargo drop on april 30 2022, i got screenshots and got no reason to lie 😪