Can I charge a fee on top of the merchant payout with balanced orders - balanced-payments

I'm updating my code to use balanced api 1.1 and I'm interested in the new Orders construct. Everything looks pretty good about it, since our orders are only associated with one merchant customer. We charge an inclusive fee on the order and don't want to make 2 charges to the customer, which leads to my question:
If I create a single order, with one buyer, one seller, and one debit, can I credit both the seller's account, and my business account?
In other words, after debiting the buyer the full amount (let's say $100) and crediting the seller with their portion (let's say $95) will the remaining $5 be 'stuck' or will I be able to transfer that into the business's account (my business)?

Yes, an Order can technically have two merchants associated to it. The one specified when you create it and the owner_customer from your marketplace.
The documentation appears to be lacking anything referring to this so I've created a Github issue to track documenting how to collect fees with Orders!

Related

List all non-subscription charges in Stripe

I am making an e-commerce web app, users can purchase physical products via stripe and users can subscribe to different plans such as Lite, Premium, Standard, etc.
case-1: For checkout of physical products, I use:
stripe.charges.create()
case-2: For Subscriptions, I use:
stripe.subscriptions.create()
What I want is to retrieve a list of ONLY checkout charges (made via case-1, not case-2), I use
stripe.charges.list()
but It retrieves all charges including subscriptions which is not wanted.
How can I get all charges which are of non-subscription charges, is there any filter available in Stripe or an alternate method is available?
Unfortunately, the List Charges API doesn't have any parameters that you can use to specify that you only want charges associated with invoices:
https://stripe.com/docs/api/charges/list
That being said though, you can list all the Charges within a given window and filter them manually. Any charge that is associated with a subscription will have its invoice field populated:
https://stripe.com/docs/api/charges/object#charge_object-invoice
That is, if the Charge is linked to an invoice then it (most likely) came from a subscription. Otherwise it was a Charge for a physical product. This of course assumes that you aren't creating one-off invoices manually.

Ecommerce Loyalty Points/Rewards program

I'm looking to build a Loyalty Points/Reward system on the back of the Credit payment provider, however I would like it to be able to:
Allow visitor do redeem balance or not during the basket/checkout stage
Allow visitor to pay the outstanding order amount with any of the other payment providers.
I've considered a lot of possible approaches but am wondering whether someone else has achieved this successfully?
I'd assume I'd have to tap some method on the shopppingcartinfoprovider before processing the payment with the chosen payment provider (other than credit/full amount) but how best to apply the discount to the order?
Create an actual discount on the fly? Use a faux product with a variable unit price? Are there any tax considerations I must have? Is there any other recommended best method?
Thanks,
You can apply a discount to the order in the height of the credit amount associated with the customer account. You can store the credit balance in the OrderCustomData field and subtract it after the order has been paid. You can tap into the CalculateOrderDiscountInternal method in the CustomShoppingCartInfoProvider.cs or the EvaluateShoppingCart method (http://devnet.kentico.com/docs/9_0/api/html/M_CMS_Ecommerce_ShoppingCartInfoProvider_EvaluateShoppingCart.htm). More information on e-commerce customization best practices can be found here: http://devnet.kentico.com/articles/e-commerce-customization-best-practices You can also check the code samples in c:\Program Files (x86)\Kentico\9.0\CodeSamples\App_Code Samples\E-commerce samples\

How best to calculate sales tax in a marketplace (i.e., with multiple sellers)?

We process orders for multiple sellers (a typical "marketplace" scenario). Are there APIs or services that correctly compute sales tax for our use case?
I simply want to provide the sellers' (1 or more) locations and the buyer's location, and receive the correct tax rate to assess on the corresponding line item.
Most offerings I've evaluated (TaxCloud is one) seem to fall down in this use case.
I'm implementing a TaxCloud solution for a single-seller and multiple-buyer situation. You can utilize TaxCloud to determine tax cost by creating an account for each seller in the marketplace, configuring nexus for each, then using the appropriate API key/ID pair to lookup tax on items based on the seller.
Unfortunately, this means that you'll have to make multiple calls if the shopping cart has items from multiple sellers.

Can Verisign/Authorize.Net split a transaction into more than account?

I wonder if its possible to have logic where for every transaction 10% goes to a different account. It does not have to be Verisign, or Authorize.Net even, but whatever it is has to be a good tool.
As of right now you the only payment option that allows you to split payments is Paypal Adaptive Payments. Verisign, Authorize.Net, and other similar payment gateways do not offer this functionality.
Have a look at our product, Balanced which is designed specifically for this task.
The core concept is that debits (money in from buyers), and credits (money out to your sellers) are split into two separate transactions which means you can debit a buyer, and then create two (or one, or three...) separate credits to pay the resulting money. This typically would be two credits, one for your seller and a second for yourself to collect a fee, however you could split it further.

Building a rudimentary accounting app [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm building a simple accounting app to be used for personal finance.
A user might keep track of purchases, upcoming bills, recurring deposits, etc. It will be verrrrry simple.
Two questions:
1) Any advice I should keep in mind? Obviously, I'll use transactions where appropriate, but proper datatypes and other considerations would be nice to know about.
2) Are there any APIs you know of I could use to periodically get a user's balance from their bank? i.e., an API that would make it simple to query their account, regardless of whether they're at Chase, BofA or other?
Thanks very much,
Michael
Having just completed version 1.0 of some custom written online accounting software for school related non-profits I have some advice :)
Use standard double entry accounting/bookkeeping (debits and credits) as the basis for your financial engine. You will find this will serve you well when it comes to not only storing data on transactions but also generating reports. Assets = Liabilies + Equity is a tried and true approach for tracking who owns what.
Use decimal types for money.
Use transactions.
Keep the interface as simple as
possible.
You will need to have a method to
allow the user to reconcile the bank
records with their own records.
Pulling in bank data would help this
process but you will need to provide
the user with a method to compare.
You can use bank statements for this
process.
The bank is always considered to be right.
If there is a discrepancy between
the bank and the user records... the
fault almost always is with the user
records.
Make sure you provide some sort of
backup facility for the user
Secure the users data
Make sure you fully understand the process you are automating. Do not make assumptions. Run your ideas by an accountant who specializes in personal finance. Having this vetting will help quite a bit.
Be prepared to write ALOT of code. Accounting software has been around for years, the list of "standard features" for a typical accounting package has grown, and there are quite a few players in the market. If you are planning on selling this product you will need to provide those standard features and then find some way of differentiating it from what is already available with additional features.
TEST TEST TEST and TEST again. You
are keeping records of peoples
personal financial transactions
(their money). Errors are not taken
lightly.
I will add a few tips as I am finishing a POS system that focuses on ACCOUNTING - meaning the purchases, expenses, invoicing, accounts, credit cards, cash, vehicles, etc all need to be tracked. The concepts will eventually be applied to a personal system.
The best advice is to look at your paperwork and try to form your database around what you need to do to translate your physical documents to the computer. Combine this with the first couple of chapters of an accounting textbook which talks about accounts, chart of accounts, and journals.
The books I used :
Accounting at your fingertips by George Murray
Finance and Accounting for Entrepenuers by Suzanne Caplan
Introduction To Accounting by Ainsworth
Accounting, Information technology, and Business Solutions By Hollander
Once you have your source documents entered into the system you can then run queries to get to your answers. Doing this eliminated the concept of the "General Ledger" and "trial balance" because you simply correct or add to your source documents. So the "General Ledger" becomes a calculation. That was super confusing to me. Again, all the source documents will be put into 'Journals', which can be your database tables. I use a general journal, a purchases journal, a payments or cash disbursements journal, a sales journal, and a cash receipts journal. Keep in mind the term "CASH" refers to cash, credit, check, debit.
For example I have a "general journal" which is basically what you need. In this journal I keep track of 'source receipts'. A receipt might be an invoice, like time warner cable, which has an account number. In that case I create an 'account' for time warner. The time warner account will link to a 'chart of accounts' which will specify the type of expense as "internet". The invoice then gets entered with the date, the amount, etc. The invoice links to the account for time warner. Once the invoice is entered it is unpaid. You then need to add payment. Of course you could pay the bill in full as you should, but you might need to do two payments, or split payments, or not pay in full. This will lead you to a 'Payments Journal" in combination with a 'invoice to payments lookup table' which will need to have an applied amount to apply to an invoice. This applied amount is important because you might have 4 unpaid time warner bills and you just send over $200 in a panic to get your account back on. This payment then needs to split across the invoices with amounts to apply to each. And of course the payment account will link back to your accounts.
For the case of entering a receipt, the account is not used. Say you pick up some lingerie at embrasse-moi, and pay cash. Your system will take the supplier, embrasse-moi, the date, the cost, I added a 'use tax' in case you purchase over the internet and did not pay tax but you still owe it, the amount, and the 'Chart of accounts' which is essentially what category is your expense. That all goes to the general journal. On the same form you will have the payment method. I made a simplified form for an expense + exact payment as that is very common. If the payment is split then you will need to enter the receipt using one form, then create multiple payments linking to that receipt with other forms.
So in the end your database for this simple accounting app will have the following tables:
Accounts (the account information including an account type like cc/debit card, checking, cash, inventory account for business purchases, expense account like utilities, the default chart of account)
Chart of accounts (basically a list describing how to classify expenses and accounts which will flow to your operating statement, i put mine here for you to check out:
http://embrasse-moi.com/exampleData/pos_chart_of_accounts.csv)
I have a table for opening balances for accounts, because you have to start somewhere
Account type - meaning credit card, debit card, etc. Keep in mind the accounting equation basicaly switches based on the account. Checking accounts debits are "bad" because you gave away your money and credits are "good" because you took in money while credit cards debits are "good" because you reduced your debt and credits are "bad" becasue you added to your debt
Chart of account types, which is an 'asset, liability, long term asset, etc. This could be included in the cart of accounts as an Enum type
Then there is the general journal, which as described contains enough information to describe your document. Is it on account? Date, amount, the type (receipt or invoice) due date, i keep a 'paid' flag to ease the querying.
Then you have a lookup between the 'general journal' table and the payment table
Then you have the payment table.
Once you have all this information in, you will almost never use your bank as sources, as they are not always correct, at least my bank makes mistakes. So this type of structure will keep you on top of your information, and at the end of the month this system will produce a statement that looks identical to your account statements. And that is the goal.
About APIs for getting info from your bank: not simple, if at all possible. You can imagine the lengths your bank will go through to make sure everything is secured. I don't think it'll be possible to automatically connect.
Usually there's a way to download data through manual downloading of a file, after you logged into your online banking (if you have that available). Hopefully it'll be in CSV format or something similar ;-)
[edit]
Apparently I was wrong here, major banks DO allow direct connection. I guess you'll have to consult your bank techsupport on that then.
[/edit]
As for datatypes to use, I'd at least recommend decimals for money values, instead of doubles/floats. see this SO question thread about that too.