i'm building an app with multiple subscriptions plan for my users.
Let's say my user as a 'free' plan, and want to upgrade to a 'pro' plan.I'm using stripe customer billing portal, which work perfectly.
But when i want to downgrade, i would like the plan to change only a the subscription period end, unfortunately, it's change immediatly.
I know i can handle it from API, but i need to do it from the customer portal generated by stripe.
Any idea how to configure my stripe customer portal to handle downgrade this way ?
i would like the plan to change only a the subscription period end, unfortunately, it's change immediately.
This is not completely supported with Subscriptions and the Customer Portal. Any change you make to the Subscription's SubscriptionItems is immediate, e.g. changing from price_123 to price_678 happens the moment you update the Subscription.
However, using the proration_behavior: 'none' parameter on a CustomerPortal Configuration, you can configure it to not create prorations or invoice the Customer immediately but instead, defer the new payment amount on to the next Invoice.
Related
I think this is not a code problem since my application can successfully pay and process payments using my account currencies (usd/php/hkd).
Since there was a new requirement to support some currencies (sgd, eur, jpy, etc), I added these currencies Account Settings > Money, banks, and cards.
Btw, I am using paypal order and payment version 2 on spring.
The application was able to pass the currency and value of the transaction (like what I do normally with USD/EUR/PHP).. It was able to create order object, authorized approved payment... but it the capture authorized payment is always stucked at PENDING.
I still need to check on my test paypal account and either Accept/Reject received payment.
However, my application is only checking for COMPLETED capture status for it to considered or mark it as successful payment.
I also tried the configuration on my test paypal account (Account Settings > Payment Preferences > Block Payments).
Tried selecting Yes, accept and convert them to... and Ask me whether to accept or deny each individual payment but the capture status is still PENDING.
Is there a way to proceed with the capture payment and have the status to COMPLETED? Even with payments of different currencies? It would be OK if the payment received will be stored on that currency or have it converted to my default currency (like USD, etc).
What I want is the capture status to proceed to COMPLETED without manually accepting/rejecting payments with other currency (newly added currencies).
Again, I think this is not a coding issue... more of a configuration issue.. but I am not sure which configuration and where to set. I am pretty new with paypal development.
By the way, I based my changes on my paypal account with this link:
Payment Receiving Preferences
TIA
This is standard PayPal behavior. If you accept the first payment in a new currency in a way that opens a balance in such a currency, future payments won't need to be manually accepted. You can also manually open $0 balances in the Money management section, https://www.paypal.com/businessmanage/account/money
The setting in Account Settings > Payment Preferences > Block Payments that you mention to convert non-balance currency transactions to your primary balance will only apply automatically to future payments. Their status should then not be 'PENDING' due to any currency issue.
(If you find that all payments are PENDING, even your primary balance ones, then the pending reason (as stated in the API response) is likely "authorization" -- meaning you created an authorization with intent:AUTHORIZE but haven't captured it yet. Change to intent:CAPTURE to capture immediately.)
I am working on a website in PHP that needs custom cycle for paypal recurring payment. Ex: a customer wants to receive a product in every 15 days. So paypal should process billing in every 15 days for the customer. Others can ask for the same in 30 days, and so on.
I also need the payment status to be updated. I guess paypal will send some data when a recurring payment is done. Not getting clear instructions on implementing the recurring. What I am getting is to create the recurring payment button from paypal account.
Can anyone help me on this?
Assuming the number of days is chosen at checkout time and never changes for that particular customer's custom billing cycle...
Quick solution:
You can generate a "Subscribe" button via http://www.paypal.com/buttons for a certain number of days, say 15 days. In "Step 2", uncheck the option to save the button at PayPal. Once you have generated the code, click the option to remove the code protection.
This will give you plain HTML, and "15" will be one of the variables there. Possible variables are documented at https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
So, you can change that hidden input to be of type "text" -- or alternatively to still be hidden but set by your javascript or server-side code, and have a dynamic button for X number of days. The image can also be changed to one of your own, of course.
More involved solution: integrate one of PayPal's recurring subscription APIs, which will accomplish much the same thing as that HTML button. This seems to be the newest API: https://developer.paypal.com/docs/subscriptions/
(The API and the HTML button are separate products , and not interchangeable in terms of how you manage existing recurring profiles later on, so if you need a full-fledged API, best integrate it from day 1 rather than using the HTML button)
If the first assumption does not hold, and you need customers to be able to adjust the billing cycle at a later date after checkout, then things get more complicated.
As far as getting payment status updates, you can integrate PayPal's webhook service: https://developer.paypal.com/docs/integration/direct/webhooks/
There is also an older IPN service that is similar in function
I have a yearly recurring subscription set up on Braintree. I am trying to cater for a scenario where the user is able to have their subscription cancelled by an admin part way into the yearly cycle.
I am aware of the discounts feature but am unsure how I would apply it in this case or even whether its possible.
Is there a way in Braintree to prorate the amount for the rest of the cycle and credit it back to the user? I would not be doing any of this directly in Braintree but rather through the API via my application that uses Braintree for payments.
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support#braintreepayments.com.
You can cancel an annual subscription mid-cycle by using the API call to cancel a subscription. Here's a Ruby example, but the Braintree developer docs show examples in all supported SDKs.
result = Braintree::Subscription.cancel("the_subscription_id")
A proration would only apply if a change is made to the subscription price in the middle of a billing cycle. In the event of a cancellation, Braintree won't automatically issue a partial refund; you would have to process the refund yourself. Here is the API call for a partial refund:
result = Braintree::Transaction.refund("transaction_id", "amount")
Also, keep in mind that a cancelled annual subscription will not renew the next year. The only way to "reactivate" the subscription is to create a new one.
I'm trying to retrieve the customer who created a subscription via its payment_method_token, as described by Braintree developer agf. However, one of my subscriptions has no Payment Method Token. The field comes back as null from the API, and shows up as a blank space in the dashboard:
The docs offer no suggestion that this field could ever be empty. What can cause this to occur, and how can I find out which customer this subscription is associated with?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
If a payment method is deleted and it has subscriptions connected to it, then the subscription will be canceled, the token will be disassociated from the subscription and you will see this in the control panel.
If there are transactions associated with the subscription, you can get customer information from the transaction objects. In this case, it seems like the subscription never created a transaction before it was deleted so unfortunately you won't be able to trace that back to a customer.
We are using Google Checkout - google handled subscriptions. In our html form we are using merchant-item-id parameter to store the subscription plan id and user id, so when Google Checkout send us back the notification for the new orders (merchant-item-id is there) we know what user for what plan to charge. So far this works perfect.
But now, when a month is passed, and Google Checkout start creating the reoccurring orders, there is no merchant-item-id parameter in the notifications they send. So we don't know what user for what plan is charged.
What should we use as user identifier, so we can handle properly the subscription on our site?
Any ideas?
Btw. I know about the "buyer-id" parameter which is send with each new order notification, but that will not work for us, because it is possible that the same google buyer is paying for several of our users accounts.
I would try putting some unique info in "shopping-cart.items.item-1.merchant-private-item-data" to something unique that I can identify the subscription by.
Nikolaj