I cannot find the answer to this question that I once found. Basically I was able to create a stripe subscription using Laravel Cashier, and then trigger via code the subscription to be billed again, so I could test my invoice succeeded webhook. I am using Laravel Cashier. I recall I used ngrok to proxy, so I could get my webhook to work.
Basically it is recharging an active subscription. Any help would be great. PHP preferably.
The best option for now is to create a Subscription with a short trial period of a few minutes using the trial_end parameter. This lets you create a Subscription that will renew a few minutes later to simulate a new period that is starting.
There is no way to "fast forward time" or similar to go through multiple cycles in a few minutes otherwise.
As for webhooks the best option is to use Stripe's CLI: https://stripe.com/docs/stripe-cli
Related
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.
So when I submit a braintree order for settlement, there will/can be multiple state changes until I get my money. It can settle, stay in settling, get declined, and so on.
How can I get this information without having to call their API constantly? Is there some kind of webhook for that? Because in my tests, I only get updates for disbursements, which is (if I understood it correctly) basically the last step of the whole transaction.
There are webhooks for some events, but not for specifically when a transaction changes status.
You can, however, use the Search API to create a script or cron job that checks for status changes over a period of time.
If you have additional questions about webhooks or using the API, contact Support.
I am working on Paypal webhook (subscription) section to insert recurring payment information into the database. I have done coding based on the link "https://jslim.net/blog/2018/01/22/PayPal-Rest-API-with-Laravel-5-and-Angular/" but Paypal webhook always return “payment_status: Pending” on sandbox image and its not inserting recurring payment information into the database (insert option added in PayPalController - function webhooksPaymentSaleCompleted ).
I think the problems related with routes/api.php file but I can't figure out what exactly is going wrong.
Another URL that I have referred and tried was "https://github.com/supermavster/PayPal-PHP-SDK"
Laravel version 5.8
paypal/rest-api-sdk-php: "^1.14"
Please suggest a feasible solution to this problem.
Thanks in advance.
Verify that the sandbox account's email is confirmed, by logging into the sandbox business account receiving the payment and navigating to: https://www.sandbox.paypal.com/businessprofile/settings/email
Resend the confirmation message. Open the message via https://developer.paypal.com/developer/notifications/ , and confirm the sandbox email.
The v1 PayPal-PHP-SDK is deprecated and there is no reason to be using it for a new integration. Use the v2 Checkout-PHP-SDK for payments.
You'll need two routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here; https://developer.paypal.com/docs/checkout/reference/server-integration/
The best approval flow to pair it with is https://developer.paypal.com/demo/checkout/#/pattern/server
I am using Laravel Cashier to add stripe payments (subscriptions) for the premium version of my web app. Users are offered a 5-day free trial (card in advance).
Now what happens is, I create a subscription using:
$user->newSubscription('premium','monthly')->trialDays(5)->create($stripeToken,['email' => $user->email], "")
Works really well, but let's say the user cancels his subscription within the trial period.. He will be on the 'grace' period, let's say for 4 more days..
When these days are passed, user will lose account benefits, as the trial will expire and subscription is cancelled.
But, after that, if the user wants to subscribe again, since $subscription->resume() is only available during the grace period, I would have to create a subscription using $user->newSubscription, generating a new subscription on the table and a new trial period.. allowing them to cancel again, wait 5 days, create another one and repeat this getting free trial days forever..
Is there a way to "resume" an existing subscription when it is cancelled and grace period is over?
With the release of the new subscription option from In-App Billing API we started a proof of concept of the service and we found a few issues. Has anyone else tried it and would have some answers for us? Here's the issues we have been facing so far:
1 – While testing the unsubscribe functionality, the Google Play interface displays a white page with an “Item not found” message and a retry button. Is it due to the fact the app is not yet published? If yes, how can we test this flow without publishing it first?
2 – Inter device synchronization. When making a subscription on one device, other devices tied to the same account did not receive a OnPurchaseStateChange event. Is it again due to the fact the app is not published? Or are subscriptions tied to a particular device and not to an account?
3 – On our Google merchant page, when we cancel a purchase, the device does not receive a notification telling the subscription has been cancelled. Is this a bug? As a workaround we are manually checking the current time and comparing with the expiration date to force a restore transactions call. At this point, we are able to see the subscription is no longer valid. Do you think this is an acceptable solution?
4 – When a subscription is made, two transactions show up on the Google Merchant page: a FAILED transaction with a value of $0 and a valid one with the value we charged. Is this the expected behavior? What’s the purpose of the $0 FAILED transaction?
If anyone has faced similar issues we would like to know. Maybe these could be bugs on Google's end or maybe we did not understand 100% how it is supposed to work.
Thanks in advance.
1.I had the same issue and after I published (and later unpublished) my app I could see the app page in the market,so you can publish and than unpublish.
2.I didn't check it with subscriptions ,but for managed item i didn't get purchaseStateChange on two different devices as expected.
3.I do get subscription expired after canceling one,but only after a while.
I didn't understood how you can get the expiration date ?
you only can get it with access to play developer api.
the restore transactions will give you same purchaseStateChange as you got when purchase the item.
*in the developer guide it is recommanded to use restore transactions only in first app use.
4.I have same issue,and i heard at least about 10 people with same 0$ charge.