#789 Stripe metadata (from J2Commerce)

Posted in ‘Technical Support / Bugs’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Olivier on Sunday, 31 May 2026 00:39 UTC

George Jemison

During test and live implementation I need a unique metadata marker from J2Commerce to identify from which shop the order originated for automation. Something like metadata:
source: j2commerce, j2_order_id: 12345. I am not seeing this in "checkout.session.completed" or "payment.intent.succeeded". Should I be looking somewhere else? 

Olivier

Hello George,

why don't you enter a different prefex is both stores in setup -> configuration -> order tab ? That will deferentiate orders from each other.

Hopefully I understood your question...

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

George Jemison

Hello Olivier,

Thank you for responding.

I'm not sure I fully understand your reply. Are you saying the Invoice prefix is another way of identifying where the order origingated? 

Even if that was the case the stripe checkout plugin doesn't send the invoice number when data is sent to Stripe. I've tried both payment_intent.succeeded and checkout.session.completed.

It does send the order number which is reference in the payload as "client_reference_id": "17789664322", in checkout.session.completed only.

Your assistance is greatly appreciated.

Olivier

Are you saying the Invoice prefix is another way of identifying where the order originated? 

yes

But it is not what you are looking for. I did misunderstand.

 

The Stripe plugins do not send metadata to Stripe.

In Stripe checkout, it should be done at the time of 

\Stripe\Checkout\Session::create([...]);

 

In Stripe, it should be done at time of 


\Stripe\PaymentIntent::create([...]);
 
As far as I can glan from the docs, there would need a metadata block in those functions (with your suggestions, it would become).

'metadata' => [ 'source' => 'j2commerce', 'j2_order_id' => $order->order_id, 'shop_url' => JURI::root(), ]
 
Good news, this is already implemented in J2Commerce v6, but it needs to be added to the Stripe version for J2Commerce v4.

					

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

George Jemison

I updated to J2Commerce v6 and can now see metadata. Now having issue with tax rates not getting applied to local sales. It was working in v4. There are two tax rates that get applied for local sales, state(6.25%) and local(2%) and need to track individually. 

Olivier

Hi George, we have identified the issue, it will be part of the next update. Please confirm after updating to J2Commerce 4.3.4 that the issue is resolved. Thank you!

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Stay Updated

Subscribe for free and be the first to know about the latest features, updates, and new additions.