I've been asked to integrate Stripe API's for a subscription plan.
I've already worked with it, but never with a variable price :
I have to make a subscription with a "trial price" and then, the month after, change the price.
Here, the user wil pay 19 euros the first month, and then 25 euros each month. But, I can't see any options to manage it ?
Do you have a clue ?
Thanks !
Your best approach is to discount their first invoice.
Coupons in Stripe provide discounts on recurring charges. Like subscriptions, coupons allow for great flexibility in how you define and use them. They can:
Apply to every invoice, just one invoice, or for a certain length of time
https://stripe.com/docs/billing/invoices/subscription#first-invoice-extra
Should you need to include a one-time charge or discount to the first subscription invoice, you can do so by adding an invoice item to the customer before creating the subscription. (The above code would work, as it doesn’t specify an invoice.) The resulting invoice item will be attached to the customer and automatically included in the first invoice created.
Related
My use case is that I have multiple products some of which are one time payment and others are recurring payment products. I want to charge the user only once so that the user doesn't have to pay for each product separately. According to my study we can create multiple product subscriptions with one charge. https://stripe.com/docs/billing/subscriptions/multiple-products#creating
If I had one-time payment products only, I can only receive one payment of the payment amount for selected products (as sum of prices).
But as I have mentioned I have some products which are recurring payment. So my question is if I add one-time payment products in this subscription request will they be charged again ones the recurring period overs, and if yes how can I Implement the above case in PHP?
Note: I want to implement this in custom form. I don't want to be redirected to stripe page.
You can use Stripe Checkout and combine both one-time and recurring prices3.
You can follow this guide in order to integrate Stripe Checkout with PHP.
Here what it will looks like for combining both prices types, the first charge will be for both pricing, and the second charge will be just for the recurring price(s):
I want to know if there is a way to customize WooCommerce such that the clients could pay the same order with multiple payment methods at the same time?
For example, if one order is worth $100, I want to allow clients to pay $25 with a Visa card, then $75 with a Discover card. So the general idea is to pay one order (don't checkout multiple times), but use more than just one payment method.
I assume there is some way to personalize something, but I want to know where/how to get started with it.
EDIT 1
Just adding a new payment gateway (custom) does not solve the issue. I know how to create a custom payment gateway.
The issue is: how do I allow on ONE checkout for ONE order to get the payment out of 2 or more sources at the same time? For example: $175 cashed in as $50 PayPal + $100 Visa + $25 MasterCard.
There are many clients who would love to have this option, and pay with more cards at the same time!
So, this is not one of those obvious questions as how do I create a custom payment gateway? - that is something easily achievable without spending too much time on it. The multiple payment on same checkout, however, proves to be lengthy / not discussed (I've researched many articles, forums, etc.)
What I would do is to create a custom payment gateway, and in that gateway, create interfaces for ALL the payment methods you want to use.
I would say use something like Stripe for all the CC and then PayPal - that way you will have only two separate ones to handle.
You need to put in an option to pay X amount on each payment gateway on the Checkout screen.
Then in your plugin when someone partially pays, create a coupon for the amount of the partial payment using the Coupon API and apply that.
You will also need an Order Status of Partial Payment or something. You would also need to redirect back to the Checkout page if the order isn't completely paid, instead of the Order Success page.
It's pretty complicated to do this right.
Workaround: You can purchase a gift card on our site for any amount with one credit card. You can then use the gift card and then use another credit card for the balance.
Example: Total price $450
Gift card purchase (Card "A"): $400
Credit Card balance (Card "B"): $50
I am working on our company cart which contains products that people can either subscribe to or just buy outright. The problem is that it should require customers to add both types in a single order.
Question: It is possible to to tell Paypal to charge selected items as subscription and the others as one-time payments?
Note: Some recurring items could be on different billing cycles/frequencies than others.
Note: This question was previously asked here, but is out of date.
I use WooCommerce Subscription plugin
What I would Like:
For new Customers only, I would like to auto apply a coupon code for the first payment only, on the first subscription. I don't use a signup fee, and our payments are synchronized each 2nd day of the month.
Meaning, I would like a coupon for a users first month's payment to be X% off, one time. Then after that this coupon will not be anymore usable, for that customer.
I have tried various plugins but nothing did that trick.
Can anyone please guide me about that?
Thanks.
I want to use the Stripe API to bill users every month for an amount they specify. It appears that Stripe does not allow websites to create a subscription without first setting up a plan for it manually, restricting what people can bill themselves for to predesignated amounts.
What is the best way to do this?
You can! Before we talk more about how this works in practice, make sure you understand when an invoice is open for modification.
Subscribing your customer to a new plan, or updating your customer's existing subscription
If you are subscribing your customer to a plan via the API, you won't be able to add any custom fees after the initial invoice is created since it will be immediately closed. This means you'll need to setup any custom amounts before the initial invoice is created. You can do this in one of two ways:
Set the account_balance when creating a customer or updating a customer's subscription.
Create any invoice items before your customer is subscribed to the plan, and then create the subscription via an update customer subscription call.
In either case, we'll pull the account balance or any outstanding invoice items into the initial invoice, so your customer will still be charged for the setup fees. These are essentially one-time charges that you are combining with the subscription's recurring charges. Since these are being added to the invoice total, only a single charge is being created.
Subscription renewals
The account balance and invoice items are simply one-time adjustments to your customer's account, so they won't be automatically applied each month. If your service uses metered billing or needs to add custom amounts for taxes or other dynamic costs, then you will need to create invoice items every month.
To get started, just use webhooks to listen for the invoice.created event. Whenever an invoice is open for modification, your webhook endpoint can create an invoice item that references the existing invoice's ID. We'll automatically pull this amount into the invoice total before charging your customer, approximately an hour after the invoice's creation.
Link:
https://support.stripe.com/questions/metered-subscription-billing