Paying an invoice with multiple credit cards in Stripe - stripe-payments

I have a scenario where a customer may have multiple credit cards. The customers are charged with a subscription fee and extras that depend on the customer behavior. The customer is charged once a month for both the subscription fee and the extras. The extras should be paid by the credit card that is selected according to certain rules. Basically, the invoice should be split between multiple credit cards (but there is no strict requirement that there should be single invoice).
Any suggestions how can this be accomplished with Stripe?
Thanks!

Answering myself because I received the answer at Stripe's IRC channel from timebox.
"The only way to do different cards per Subscription is to create a separate Customer object for each Card, and create the Subscriptions separately on each Customer object."
It isn't possible to have multiple Subscriptions and pay them by different cards because Subscription is always paid by the default card.
Having multiple Customer objects seems to be the only way.

Related

Programatic shipping and taxes with Stripe Subscription

I would like to use Stripe for a physical subscription site.
Small number of SKUs
Some customers pick up instead of ship
Customers whose addresses are in one state are charged state and local sales tax
I'd like to use Stripe Subscriptions to do this but shipping costs and state/local taxes will be slightly different for every single customer and but unlike in the Stripe Orders API, it does not look like Subscriptions allows for me to dynamically calculate shipping and taxes. Is my reading of this correct, or is there a way for me to programatically edit recurring shipping and taxes on a per-subscription basis?
Thank you!
Answer via #mattwc in #stripe freenode: An invoice is created by the subscription each period 1 hour before it is charged. You can subscribe to this event via webhook and edit the invoice to add shipping and tax information.

Is it possible to "delay" payments with push-based synchronous/asynchronous method of payments?

I'm looking for a way to charge my customer after a request was successfully accepted.
To explain it further. I'm developing a marketplace where a private seller can sell his products to private customers. But the customer can only "request" the product and only when the seller accepts his conditions a deal is made.
Now comes the question that I have. Is it possible that the user is paying for the request but is only charged when the request is accepted?
If a request fails the charge has never been done or gets a full refund (but without the loss of transactions fees).
I've seen some couple of websites that use credit cards for that case.
If you look at credit cards as a payment method they are usually a pull-based, reusable and synchronous method of payment. This means that, after capturing the customer’s card details, you can debit arbitrary amounts from the customer’s card without them having to take any additional action and there is immediate confirmation about the success or failure of a payment.
So that is why you can charge someone after a specific period of time.
But in Germany, we don't use credit cards that often. Only pushed-based transactions like Sepa/Sofort/iDeal. Would it be possible to "delay" payments with these methods?
This should be possible. I'm not sure what payment processor you are using/want to use or what is available in Germany but I assume this would be possible with many of them. Probably some useful things to search for that might be similar to what you want would be saving payment methods for later, managing subscriptions, and tokenizing credit cards.
Stripe for example allows you to save credit cards for later under a customer record and then charge a customer later. https://stripe.com/docs/saving-cards
Braintree has recurring billing https://developers.braintreepayments.com/guides/recurring-billing/overview and a vault for storing payment methods https://articles.braintreepayments.com/control-panel/vault/overview.

stripe API - possible to combine multiple invoices into one payment?

i have a use case where its possible for a user to accumulate multiple unpaid invoices with a stripe subscription (which would be marked as overdue). The only way i see to pay the invoices via the API would be to pay each one as a separate manual invoice payment (thus producing X lines items on a users credit card).
Is there any way to combine all unpaid invoices into one payment ?
It's not something that the Stripe API supports. The best solution would be to create a one-time charge for the total amount of all the invoices and then mark each invoice as forgiven.
You could also create multiple invoice items, one for each invoice with a clear description and amount and then invoice the list so that your customer knows what he's paying for.
From the Stripe docs, it suggests that you can batch multiple transactions together but only if the customer has a payment method saved (and it still may require some custom programming to get it working the way you want):
https://support.stripe.com/questions/batch-multiple-transactions-from-one-customer-into-a-single-charge
Stripe docs also offers this option as well, on combining multiple products into one subscription:
https://stripe.com/docs/billing/subscriptions/multiple
Yes, You can combine multiple invoices using pass stripe customer id in to
/Stripe/Invoices::retrieve({customer_id});
You can get all the invoice of the customer, you can also search date wise invoices using a function.

Stripe payment splitting api

i need bit clarification and guidance from exports about splitting stripe payment between multiple sellers.
I am building e-commerce systen and integrated stripe as a payment method for customers and it is working fine. Now I don't want to pay to manually to my sellers registered on my platform. I want to split the payment between several accounts if possible.
Lets say my platform is charging 10% as commission to the sellers and the customer is buying to different items from 2 different seller that worth $1000 than I want to split the payment as follow internally
me $100
seller 1:$450
seller 2:$450
Any help or guidance will be appreciated thanks
Stripe as such does not provide the splitting mechanism. But using Stripe Connect you can do it.
In Stripe connect there is one main account called platform account and can have multiple secondary accounts connected to it. So in your case, your seller will connect with your platform account.
Now for every charge you can split the amount among the seller and platform using application_fee parameter in charge object.
But this method has one problem also
If the customer is purchasing from multiple sellers than you have to charge the customer many times(as no. of the seller). So in case of multiple items from different sellers I have used transfer API to transfer the amount to seller instead of multiple charging to customer
In my system, I also face the same problem and after a lot of research, I found this way working for me.

Can Stripe support Offline Payments?

I am using Stripe for online payments but also users can pay offline (cash or check). I want to centralize all my invoices/charges in one place (Stripe).
I am not sure if I can add offline payments (cash or check) to stripe or not. I guess I can if I created customers, invoices, charges with livemode=false for my live keys.
Is this feasible and will Stripe accept having some (customers, invoices and charges) with livemode=false and others with livemode=true?
If yes, should I fill fake credit card info or should I set it as nil?
Stripe does not allow you to create a Subscription on a Customer if you don't have a credit card setup. More accurately, it does not allow you to create a subscription if a customer does not have a way to pay for the next invoice. So for offline payments, you could update the 'account_balance' on the customer to have a negative value equal to the amount the customer wired (credits). Stripe will then allow you to create a subscription for the customer because it knows that the customer has enough account balance to pay for the next invoice. This post has more details.
We don't currently support offline payments, so you'll want to look at a separate accounting system for those payments.
That said, it's totally understandable that you'd want to keep this data in one place. You might be interested in using our webhooks system to offer live updates to your accounting system without directly touching the code that creates the charge in Stripe.

Resources