Comments (6)
I tested this just now and can confirm there is a bug. Interestingly, I see duplicate meta on the initial subscription order:
That meta is missing from the renewal:
from woocommerce-gateway-stripe.
Just following up, I've confirmed it's definitely related to the api version change. I switched out the API version used when create_and_confirm_intent_for_off_session()
is called and that resolved it.
I'd still like to look at what could be causing the difference between checkout payments and subscription payments. All I have been able to tell so far, is that Stripe updates the charge with the balance transaction after it has succeeded so there's a short delay (3ms).
The only potential fix that comes to mind is listening to that charge.updated
webhook or scheduling an async job to go update the order fee from the balance information shortly after the transaction has been processed.
from woocommerce-gateway-stripe.
I'd still like to look at what could be causing the difference between checkout payments and subscription payments.
I think I found what the difference is and what will fix it. Subscription payments don't have the capture_method
set to automatic
. I'll submit a PR later tonight.
from woocommerce-gateway-stripe.
FWIW this is the relevant change to the API:
Ref: https://docs.stripe.com/upgrades#2024-04-10
In the 2024-04-10
version they changed the default payment intent capture_method
to async so we don't get charge information immediately. As I mentioned above changing it to automatic will cause the payment to be captured as soon as it is raised and we will receive charge information.
from woocommerce-gateway-stripe.
8472579-zd
from woocommerce-gateway-stripe.
It looks like this could be related to the Stripe API version bump included in 8.5.0.
After making a subscription charge, we use to receive from Stripe a response that included a balance_transaction
. That balance transaction is what we used to process the fee data.
Stripe API version 2019-09-09
response includes the charge object with a balance transaction ID directly:
That's no longer the case though. In the 2024-06-20
version, the charges
arg doesn't exist, we have a latest_charge
but when you fetch the charge, the balance transaction is empty.
What I haven't yet worked out is why the balance transaction is missing when processing subscription payments, but aren't missing when you process payments on the front end. 🤔
from woocommerce-gateway-stripe.
Related Issues (20)
- Refunds via Giropay not available after deprecation
- Deprecate Key Sharing - Add re-connect promotional surface
- Minor text updates to webhook settings
- Clear the webhook status when configuring a new one
- Creating a setup intent with a new payment method fails when using the Legacy checkout experience
- Non-existent billing field throwing JS errors on console
- Flag accounts that are connected via the oauth flow and use it to display connected status
- Update the `WC_Stripe_Connect_API` class to support test mode requests
- Webhooks should be configured automatically when connecting via OAuth
- Enable express checkout capability when using Yith Multi-Vendor plugin with shipping enabled
- Missing Payment Method: Paypal HOT 1
- Missing Payment Method: Twint HOT 1
- Duplicate charges when placing order (if "Link By Stripe" was previously connected) HOT 3
- Failing refund e2e test
- Merchant Message Visible on Checkout Page HOT 1
- [HC] - Disabling the CC option makes Stripe APMs show up first, not respecting the order set in the overall WooCommerce Payment settings
- Updating Subscription's payment method to a 3DS card results in an error HOT 1
- Display a notice when the empty state Connect API oauth URL is missing
- Update the empty state connect flow to support connecting test mode
- Why is stylesheet with ID 'wc-stripe-blocks-checkout-style' enqueued everywhere?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce-gateway-stripe.