Control is not redirected to Payment page after trail period exceeds - shopify

I have raise RecurringApplicationCharge for my app. I set 5 days trail period and for test purpose i include "test":true.
I install app in a test store
After completed 5 days trail my app is still active . it doesnot return to the payment page.
How can i handle this ? . shall i do any thing manually?

I think you are misunderstanding things. The merchant has agreed to install your App. That means they agreed to allow your App access to scopes and perhaps a charge. Once installed, the trial is nothing more than a buffer of days before Shopify starts charging them money.
In other words, when the trial ends, nothing changes except the customer begins being charged money... It is not like the trial stops the App from working. If you wanted that, you'd have to roll your own trial system.

Related

The RecurringApplicationCharge refund policy for unstalled application

In the case when the shop has the RecurringApplicationCharge for example with a 30-day recurring charge. The RecurringApplicationCharge was created on for example August 01, and the application was removed on August 15.
As I understood from Shopify documentation, Shopify platform will automatically remove the RecurringApplicationCharge, but what happened with the refund? Does the Shopify automatically refund for the not used days? Or this part is the responsibility of the application owner?
Any information will be helpful I'm trying to find some clear description/documentation what exactly happens after the application was uninstalled.
Application using the latest Shopify REST API (https://shopify.dev/docs/admin-api/rest/reference/billing/recurringapplicationcharge?api[version]=2020-07).
Uninstalling apps with recurring charges
Make sure that you consider app billing cycles when you plan to uninstall an app. Recurring app charges are generated the first time an app charge is approved, and then on the first day of an app's billing cycle. Because of this, a charge will appear on your bill even if you uninstall an app only a day or two after you install it.
Shopify themselves will not refund the amount. There is no procedure for the same. Me being an APP creater has faced the same issue. The only way here is the App creator pays the amount back to the merchant if they decide to Uninstall the App.
Here are few documentations that may help you understand better:
https://help.shopify.com/en/manual/your-account/manage-billing/your-invoice/apps
https://shopify.dev/tutorials/charging-for-your-app-with-rest-admin-api-concepts

Is there a way to dynamically extend the free trial period of a Shopify App?

I have my app in production working great! Now a feature that I would like to add is to extend a user's free trial period depending on if they take a specific action. Is there a way to do this manually? How about programmatically? Thanks, Lucas.
You won't be able to modify a charge but you have two options (both through the API):
If the trial has not ended then you could create another charge with a new trial period and ask the merchant to accept that. Once the new charge is activated it will replace the old charge.
If the trial ended then you could give the merchant an application credit in lieu of a longer trial.

How can I change subscription period on braintree?

I want to add some unit tests for our billing system which is using braintree but I don't know how to change the subscription period from 1 month (minimum in braintree for now) to 1 day. I cannot wait 1 month to execute my test. is there any solution to do that?
I recently asked Braintree support a similar question and here is the advice I was given:-
The sandbox environment is setup to mimic the production environment exactly. Unfortunately, this leaves us at the mercy of real time as well. However you can definitely test the subscription_charged_unsuccessfully and subscription_went_past_due webhooks in the sandbox by creating a past due subscription using the steps below:
Create a plan with a 1 day trial and $2000 price (a test amount that will automatically simulate a decline)
Create a customer with a credit card
Create a new subscription using the plan and customer
The first charge attempt will be after 1 day (when the trial expires) and will fail
The automatic retries will be at +10 and +20 days of the subscription going past due – this timeline can be changed by updating the recurring billing retry logic in your Control Panel
You could also test the subscription_charged_successfully webhook using the same basic principles – simply create a plan with a 1 day trial and a price less than $2000.
I hope that helps.
I work at Braintree. Feel free to reach out to support#braintreepayments.com with any further questions.
You can't modify the subscription billing period to shorter then a month. Sandbox is designed to mimic production for end-to-end testing and since Braintree doesn't offer subscription billing in smaller increments then a month we have decided to not offer a shorter billing period in sandbox.

Paypal Live Site Testing

I just wanted to ask among the gurus here if anyone has ever attempted to test a complete transaction from start to end on an ecommerce site using paypal or any other epayment gateway.
Please guys, I would appreciate any thoughts and comments. As it is a live site, I cant use the sandbox as that will negatively impact sales. However my firm is a startup and so can't afford the complete transaction and refund process that was suggested [here]:Accepting dummy credit cards on a live site with ActiveMerchant & PayPal.
Please help!
Previously I tested by buying low cost items from myself - that way you're only paying commission and you're getting most of the moneyback.
Admittedly you need 2 Paypal accounts, but that shouldn't be a problem, and you should only have to 'kick the tyres' in the live environment because all your testing will have been done in the dev environment.
We had a similar problem during startup and still use this process in the live site. We have specific "test" products that we purchase using a live credit card, then monitor the transactions: purchase, decline purchase, subscription (recurring billing), cancel, refund, etc.
Our test product is priced very low (5 cents). For subscriptions, the billing interval is 1 day, for a maximum of 3 intervals (with a free trial period of 1 day). This allows me to run a full test/validation, including recurring billing, in the live environment in less than a week.
We refund all charges following the test, which puts the money back on the credit card (or back in the PayPal account). Because of the refunding, our sales impact is zero (offsetting sale and refund). It does cost us a small non-refundable PayPal fee for each transaction, but that amounts to $1 or less.
These "test" products are not exposed to normal users. Also, we manually verify any "test" sales to make sure they are part of our internal testing.
"Sandbox" testing is the way to go during development, but a periodic test in the live environment is necessary to be verify that nothing is amiss.
Why not use a real credit card, then give yourself a refund? The commision fee is returned in that case.
All the time that I want to test our live sites we use a real credit card.
Thanks
I don't understand why you can't use the sandbox..?? How would using it negatively impact your sales? It's all fake.
Just setup your own sandbox.yourdomain.com version of your site and use that as your test server. Configure it to use PayPal's sandbox with sandbox API credentials, etc. This will allow you to go all the way through an order process and test everything from the UI stuff to payment processing, API requests/response processing, IPN, etc.
When everything is working you sync it up with your live server, which is hitting the live PayPal server, of course.
Again, I don't see how that would impact you in any way other than being a successful testing solution..??

Shopify Billing API - giving a user a free month

I have an App in the Shopify App store that uses a recurring application charge. No problems there.
Sometimes, one of my users will make a suggestion to improve the app. I would like to reward them with a free month of using the app without being charged.
Based on the Shopify API, The only thing I can think of is to cancel the current recurring application charge, create a new charge for $0, then a month later cancel that charge and create new one for the original price. This is far from ideal. I believe that the user would need to accept every new charge that is created.
Is there a better way? Any suggestions?
Agreed that that sounds pretty far from ideal.
If you create a new recurring app charge with a 30 day trial period, Shopify will change the customer over to this new charge while respecting the trial period. The customer will still see a prorated charge for the partial payment cycle before you “upgraded their plan” after the trial is up, but this will effectively do what you want.
As of 2017 there is now an API for granting credits to merchants using your app:
https://www.shopify.com/partners/blog/using-the-shopify-api-to-credit-merchants-for-app-charges
https://help.shopify.com/api/reference/applicationcredit