 				catch e
 					return bot.sendMessage chatterID, "Moolah returned invalid JSON"
 				bot.sendMessage chatterID, "Visit #{body.url} or send #{body.amount} #{body.currency} to #{body.address}"
-				# TEMPORARY; USE A IPN CALLBACK
+				# TEMPORARY; USE AN IPN CALLBACK
 				bot.sendMessage chatterID, "Send '+finishadd' to finish the adding process"
-				pendingPayments.push {
-					"steamID": chatterID
-					"amount": amount
+				
+				fundTx =
+					"type": "add"
+					"amount": body.amount
+					"status": "pending"
 					"tx": body.tx
-				}
+				await Users_collection.update {id: chatterID}, {$push:{history: fundTx}}, {w:1}, defer(err)
+				if err
+					console.error err
+					bot.sendMessage chatterID, "The database ran into an error" 
 		when "+finishadd"
 			for payment in pendingPayments
 				if payment.steamID is chatterID

DogeTipGroupID = "103582791435182182"

pendingInvites = []
pendingPayments = []

# Connect to the database
await MongoClient.connect "mongodb://192.168.1.115:27017/dogebot", defer(err, db)

					"guid": moolah.guid
					"currency": "DOGE"
					"amount": amount
					"product": "Add Funds"
					"return": ""
			requester options, (error, response, body) ->
				unless !error and response.statusCode is 200
