However, the issue we have is that on the transaction export from the Stripe dashboard the Description of the payment is blank rather than the Description as specified in the Shopping Cart. This is making financial reconciliation/allocation across our products difficult.
From debug we can see that the product array is set up correctly prior to the call to Stripe.
Is the Stripe payment in the payments library still compatible with Stripe or are we not understanding how to use the shopping cart/stripe gateway.
Any help greatly appreciated.
Wallyhowe
The Chronoforms Shopping Cart action (as the product details for each payment are dynamic).
Wallyhowe
Below is the debug data just prior to submission to Stripe.
I can see that the price is carried into the checkout session array but I don't see the description passed through anywhere.
Also, can you explain how to use the 'Add more product data' in the Shopping Cart with its 3 options 'short text', lomg text' and 'array'.
I can't find any documentation on this.
Many thanks
Wally
[stripe_97] => Array
(
[products] => Array
(
[p1] => Array
(
[id] => p1
[quantity] => 1
[price] => 22
[name] => General Payment
[description] => Tournament fee
)
)
[checkout] => Array
(
[session] => Array
(
[id] => cs_test_a10pn5i2g7sBbB............
[object] => checkout.session
[after_expiration] => NULL
[allow_promotion_codes] => NULL
[amount_subtotal] => 2200
[amount_total] => 2200
[automatic_tax] => Array
(
[enabled] => false
[status] => NULL
)
[billing_address_collection] => NULL
[cancel_url] => https://**************.co.uk/administrator/index.php?option=com_chronoforms7&cont=manager&chronoform=payments_form_general&gpage=Cancel
[client_reference_id] => NULL
[client_secret] => NULL
[consent] => NULL
[consent_collection] => NULL
[created] => 1703949954
[currency] => gbp
[currency_conversion] => NULL
[custom_fields] => Array
(
)
[custom_text] => Array
(
[after_submit] => NULL
[shipping_address] => NULL
[submit] => NULL
[terms_of_service_acceptance] => NULL
)
[customer] => NULL
[customer_creation] => always
[customer_details] => NULL
[customer_email] => NULL
[expires_at] => 1704036354
[invoice] => NULL
[invoice_creation] => Array
(
[enabled] => false
[invoice_data] => Array
(
[account_tax_ids] => NULL
[custom_fields] => NULL
[description] => NULL
[footer] => NULL
[metadata] => Array
(
)
[rendering_options] => NULL
)
)
[livemode] => false
[locale] => NULL
[metadata] => Array
(
)
[mode] => payment
[payment_intent] => pi_3OT4QAI.............
[payment_link] => NULL
[payment_method_collection] => always
[payment_method_configuration_details] => NULL
[payment_method_options] => Array
(
)
[payment_method_types] => Array
(
[0] => card
)
[payment_status] => unpaid
[phone_number_collection] => Array
(
[enabled] => false
)
[recovered_from] => NULL
[setup_intent] => NULL
[shipping] => NULL
[shipping_address_collection] => NULL
[shipping_options] => Array
(
)
[shipping_rate] => NULL
[status] => open
[submit_type] => NULL
[subscription] => NULL
[success_url] => https://*************.co.uk/general-payment-success?session_id={CHECKOUT_SESSION_ID}
[total_details] => Array
(
[amount_discount] => 0
[amount_shipping] => 0
[amount_tax] => 0
)
[ui_mode] => hosted
[url] => https://checkout.stripe.com/c/pay/cs_test_a10pn5i2g7sBbB2...........
)
)
[var] => Array
(
[id] => cs_test_a10pn5i2g7sBbB22CZG.............
[object] => checkout.session
[after_expiration] => NULL
[allow_promotion_codes] => NULL
[amount_subtotal] => 2200
[amount_total] => 2200
[automatic_tax] => Array
(
[enabled] => false
[status] => NULL
)
[billing_address_collection] => NULL
[cancel_url] => https://*************.co.uk/administrator/index.php?option=com_chronoforms7&cont=manager&chronoform=payments_form_general&gpage=Cancel
[client_reference_id] => NULL
[client_secret] => NULL
[consent] => NULL
[consent_collection] => NULL
[created] => 1703949954
[currency] => gbp
[currency_conversion] => NULL
[custom_fields] => Array
(
)
[custom_text] => Array
(
[after_submit] => NULL
[shipping_address] => NULL
[submit] => NULL
[terms_of_service_acceptance] => NULL
)
[customer] => NULL
[customer_creation] => always
[customer_details] => NULL
[customer_email] => NULL
[expires_at] => 1704036354
[invoice] => NULL
[invoice_creation] => Array
(
[enabled] => false
[invoice_data] => Array
(
[account_tax_ids] => NULL
[custom_fields] => NULL
[description] => NULL
[footer] => NULL
[metadata] => Array
(
)
[rendering_options] => NULL
)
)
[livemode] => false
[locale] => NULL
[metadata] => Array
(
)
[mode] => payment
[payment_intent] => pi_3OT4QAIrAK.............
[payment_link] => NULL
[payment_method_collection] => always
[payment_method_configuration_details] => NULL
[payment_method_options] => Array
(
)
[payment_method_types] => Array
(
[0] => card
)
[payment_status] => unpaid
[phone_number_collection] => Array
(
[enabled] => false
)
[recovered_from] => NULL
[setup_intent] => NULL
[shipping] => NULL
[shipping_address_collection] => NULL
[shipping_options] => Array
(
)
[shipping_rate] => NULL
[status] => open
[submit_type] => NULL
[subscription] => NULL
[success_url] => https://************.co.uk/general-payment-success?session_id={CHECKOUT_SESSION_ID}
[total_details] => Array
(
[amount_discount] => 0
[amount_shipping] => 0
[amount_tax] => 0
)
[ui_mode] => hosted
[url] => https://checkout.stripe.com/c/pay/cs_test_a10pn5i2g7sBbB22CZGiXnSJ4..........
)
)
)
Am I the only customer who uses Stripe as a payment gateway?
UK users - please let me know what payment method you use.
Max - what payment gateways are supported in Chronoforms 8?
Wally
it has been sometime since I worked on the Stripe api and there may have been a change, but in the code you posted the "Description" (Tournament fee) is passed to the gateway along with the product name
this will need some checks in the stripe api documentation to find if they made changes and what is the new key for the item description
Thanks for this.
I've looked at the API but to be honest I am struggling to understand.
Here is the basic session creation from the Stripe website:
$stripe = new \Stripe\StripeClient('sk_test_26PHem9AhJZvU623DfE1x4sd');
$stripe->checkout->sessions->create([
'success_url' => 'https://example.com/success',
'line_items' => [
[
'price' => 'price_1MotwRLkdIwHu7ixYcPLm5uZ',
'quantity' => 2,
],
],
'mode' => 'payment',
]);
The description field now appears to be an option in the line items. Here is the relevant list of parameters to do with produce and description:
line_items.price
tring. Required conditionally
The ID of the Price or Plan object. One of price or price_data is required.
line_items.price_data
associative array. Required conditionally
Data used to generate a new Price object inline. One of price or price_data is required.
line_items.price_data.currency
enum Required
Three-letter ISO currency code, in lowercase. Must be a supported currency.
line_items.price_data.product
Required conditionally
The ID of the product that this price will belong to. One of product or product_data is required.
line_items.price_data.product_data
associative array Required conditionally
Data used to generate a new product object inline. One of product or product_data is required.
line_items.price_data.product_data.name
string Required
The product’s name, meant to be displayable to the customer.
line_items.price_data.product_data.description
The product’s description, meant to be displayable to the customer.
Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
I don't know if this helps. Is it worth me contacting Stripe support with the code from debug ?
Wally
I have consulted Strips support on the issue of getting the description in the checkout session to appear under 'Description' in the Strips dashboard.
Here is their reply:
<p style="margin: 0cm; margin-bottom: .0001pt;">Thanks for reaching out to Stripe. I hope all is well with you.
<p style="margin: 0cm; margin-bottom: .0001pt;">
<p style="margin: 0cm; margin-bottom: .0001pt;">I understand that you need assistance with your checkout session description field. Allow me to help.
<p style="margin: 0cm; margin-bottom: .0001pt;">
<p style="margin: 0cm; margin-bottom: .0001pt;">Upon further checking, you have to add the description here:
<p style="margin: 0cm; margin-bottom: .0001pt;">
<p style="margin: 0cm; margin-bottom: .0001pt;">https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-description
<p style="margin: 0cm; margin-bottom: .0001pt;">
<p style="margin: 0cm; margin-bottom: .0001pt;">That field data will show up under the 'Description' in the Payments dashboard.
<p style="margin: 0cm; margin-bottom: .0001pt;">
<p style="margin: 0cm; margin-bottom: .0001pt;">If you are using a third party application to take payments before it gets to Stripe, please reach out to your third party application to update that parameter in their integration moving forward.
<p style="margin: 0cm; margin-bottom: .0001pt;">
<p style="margin: 0cm; margin-bottom: .0001pt;">Hope that makes sense to you.
<p style="margin: 0cm; margin-bottom: .0001pt;">Wally
Hi wally
Please open this path:
JOOMLA\administrator\components\com_chronoforms7\chronoforms\functions\stripe\stripe_output.php
find this line:
'name' => $product['name'],
insert this after it:
'description' => $product['description'],
does it fix the issue ?
Hi Max
That did not work but put me on a path and with the help of Stripe support adding the following into $vars works:
'payment_intent_data' => [
'description' => $product['description'],
],
Wallyhowe
strange, according to following note from your earlier post:
line_items.price_data.product_data.description
The product’s description, meant to be displayable to the customer.
Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
it should work using the fix I suggested 🤨
Hi MaxI too was surprised so I queries Stripe support as to why it failed. Their response:"The field that needs to be used when creating the Checkout Session is payment_intent_data.description [0]. That parameter is used to specify the description that will be set on the Payment Intent created by the Checkout Session. The recent example Payment Intent you shared, pi_3P9NPXXXXXXX, was created by a Checkout Session that was not created using payment_intent_data.description. That can be seen in the request log for that request: https://dashboard.stripe.com/test/logs/req_XXXXXXXXXXNo description is set on the Payment Intent when that ield is omitted, leaving the dashboard to display the ID of the Payment Intent as the default description. "
The ID of the payment intent is a meaningless string that is of little use to our finance guys trying to reconcile payments. They need the meaningful description to be shown on the Stripe dashboard.
I have asked Stripe to explain the different purposes of the two description fields and whether in earlier versions these two fields were one.
For what it is worth we also use Jevents RSVPPro and its Stripe gateway uses the payment intent description field.
For the purposes of what we display to the customer we store data on our system and on successful return from Stripe we retrieve the stored data and construct our own response to the customer.
I will let you know what the Stripe response is.
Wally
Hello Max
Response from Stripe:
The field you need to use depends on exactly what it is you're trying to accomplish. The field you referenced, line_items.price_data.product_data.description
, is used to populate the description of the Product object that is dynamically created by your request. That description is used to populate what the customer sees within the Checkout Session that you create.
The field you're referring to in the dashboard, does not show the Product description though, as Checkout Sessions can have multiple Products in them. Instead, it pulls from the description of the Payment Intent object that the Checkout Session creates. You provide a value for that field via the payment_intent_data.description
parameter.
I believe these fields have always been available as the objects they are on have been introduced. I've tested and confirmed they're both still available and functional with our oldest API version.
Every time we introduce a change that requires integration adjustments, we introduce it in a new API version. The history of those can be found here:
https://docs.stripe.com/upgrades
When adding new features that don't impact existing behavior, those are added without a new API version being released. Those changes are documented in our changelog here:
https://docs.stripe.com/changelog
So the fix you provided addresses the first condition and the fix I supplied addresses the second one. In the form Shopping Cart which of these is the field 'Description' meant to represent?
It seems to me for the purposes of the stripe plugin it needs to cater for both, although the field 'Name' could be used for one and 'Description' used for the other.
Wally
Wally
Hi Max
Please refer to screenshot attached.
Here you can see that the shopping cart field 'Name' (Geeneral Payment) is shown above the Price and the field 'Description' (Tennis Party) appears below.
In the Stripe dashbourd the description 'Tennis Party' appeared
I then repeated my test after deleting my fix and the screen presented to me was exactly the same but in the dashboard the description was the payment intent id - basically meaningless in terms of describing the product.
So your fix is required to populate the Stripe screen that is presented by Stripe to the customer.
My fix is required to populate the dashboard.
I believe the Shopping cart as it stands with the two fields 'name' and 'description' as it is can serve the purpose.
Would you be happy to incorporate both fixes in a future release of the Stripe Gateway plugin?
Wally
PS: Do your payment gateways work with Chronoforms8 ?

Screenshot of stripe payment form
ok, it's good to know that there are different descriptions, so the change you made is in the variable below ?
$vars = [
'payment_method_types' => ['card'],
'line_items' => $line_items,
'mode' => 'payment',
'success_url' => $function['successUrl'],
'cancel_url' => $function['cancelUrl'],
];
if possible please post the whole variable code at the moment
In the form Shopping Cart which of these is the field 'Description' meant to represent?
it's supposed to be a description for the product
PS: Do your payment gateways work with Chronoforms8 ?
No but I can add stripe by the next update hepefully
Thank you for sharing the stripe feedback
Hi Max
Thanks for the response.
Here is the relevant code with both amendments and currently working in our live system.
Wally
$line_items = [];
foreach($products as $product){
$line_items[] = [
'price_data' => [
'currency' => $function['currency'] ?? 'USD',
'product_data' => [
'name' => $product['name'],
'description' => $product['description'],
],
'unit_amount' => $product['price'] * 100,
],
'quantity' => $product['quantity'],
];
}
$vars = [
'payment_method_types' => ['card'],
'line_items' => $line_items,
'mode' => 'payment',
'success_url' => $function['successUrl'],
'cancel_url' => $function['cancelUrl'],
'payment_intent_data' => [
'description' => $product['description'],
],
];
Hi Wally
Thank you, I have added stripe action to v8 with this fix, hopefully you can try it when you have time, it should be available in v8.0.21