I am using paypal (PHP) for recurring payment. It is working fine , but now i wants my user to get discount if they subscribe to my plans.
It is something like this, Plan actual cost is $20, if user subscribe to this plan , he should pay only $15,as $5 is given discount (only first time, after that next billing should be of $20).
can anyone help me how to do it in paypal.
I understand, Paypal currently is not supporting coupons or any kind of discounts on their /v1/billing/subscriptions or /v1/billing/plans endpoint.
You can manage yourself by creating Plan B (copy of Plan A but with a discount on price) and displaying that plan on the checkout. Then deactivate and activate other plan.
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'm currently using the standard cart function from paypal (using my own PHP to configure the data and price details) to create a shopping cart for services (based off this post: How to send multiple items to PayPal).
However, I need to show the full item price and the deposit amount, and only charge the user the deposit amount. Currently, I have the Deposit Amount set as the Item Price, but I think that will be confusing to users since it doesn't show the full item price. I need to show both the Item Price as the full amount of the product, and then have another label for Deposit Amount that is used as the amount that is charged.
For example, this is what I need to show:
**Service 1**
Item Price: $500
Deposit Amount: $200
___
**Amount Due Now: $200**
Balance Remaining: $300
___
I haven't seen a way to do this using the standard cart function, and was wondering if it's possible to customize these type of variables using Payments Pro.
You can use PayPal Payments Pro or Express Checkout.
Express Checkout allows you to set the call (from the PayPal Developer Documentation)
Call SetExpressCheckout to set up the transaction and define the URL to which the customer is returned after the customer authorizes payment.
Redirect the customer to PayPal for authorization of the payment.
Call GetExpressCheckoutDetails to obtain customer information, e.g. for customer review before payment. (returns to your website, and send the payment details to your cart)
Call DoExpressCheckoutPayment to complete the transaction.
In the return page you can present the final payment amount to the buyer, which will allow you to charge the deposit amount.
Here is the getting started Guide for Express Checkout, which has a complete picture of the typical Express Checkout Flow
Express Checkout Getting Started
You can use the Code Wizard to generate Express Checkout Code.
Integration Wizard
Express checkout also allows for recurring payments if you need to charge someone a deposit now, and then the rest of the payment at a later date. Here is the integration guide for Express Checkout Recurring Payments
Express Checkout Recurring Payments Developer Guide
If you would prefer to use PayPal Payments Pro Payflow edition you can create a custom cart that keeps your buyer's on your website and allows you to charge the card the deposit amount. PayPal Payments Pro Payflow Edition does have recurring payments as an option as well.
Here is the getting started overview for Payflow Pro
Payflow Pro Getting Started Overview
Here is the Payflow Pro Developer Guide
I wrote my own shopping cart [in PHP] a couple of years ago that uses PayPal's Classic API "Payments Standard" -- specifically the "upload" command to send the contents of the shopping cart to PayPal. Now I want to add the option to pay for an item with installments and I want that to integrate with the shopping cart process.
In other words, I want the customer to be able to put Item A into the cart and select a single payment option, and then also put Item B in the same cart but select an installments option for that item. Then, when they hit the "Check Out With PayPal" button, I want the Item A and Item B to be processed in the same transaction. My cart also has a feature that allows the customer to enter a coupon code.
I have spent hours running in circles though the PayPal API documentation and I can't find a solution that seems to cover everything that I need:
No monthly payment (I'm too small to absorb monthly payments, so it must be a fee-per-transaction service).
Ability to process single payment items AND installment items from the same cart.
Ability to accept a discount/coupon and apply it to the transaction at the PayPal side.
All collection of payer's shipping address, payment information, etc, done at the PayPal side.
Determine if sales tax is required at the PayPal side.
Provide an IPN type response.
I'd rather not install code on the server [that needs to be maintained or reinstalled if I switch hosts].
Can anyone point me to a solution that could cover all of this?
I was looking at the Adaptive Payments solution but it looks like it I would have to determine whether to charge sales tax (and perhaps have to collect the payer's shipping address info, which I want to avoid). I like everything else about Adaptive Payments. Does anyone know if it will be as "nice" about handling the payer's information, as "Payments Standard" does?
I have a question regarding Paypal.
I have a website that I sell both products and subscriptions. I have been unable to figure out how someone can purchase a product and a subscription at the same time through my cart.
Logically I would see this as simply two products (one with reoccurring billing), but I can't seem to find a solution.
If you are using Website Payments Standard, this would not be possible. You can not have a regular single transaction and a subscription during the same checkout. However, if you are using Express Checkout, PayPal Payments Pro or Payflow this is possible through using the API's. Depending on which service you use, the flow/code would be slightly different.