Below are all the properties we send to Stripe when creating a recurring subscription checkout session.- Full snippet code of the checkout session and creation of the subscription in plain text
// Applied by our general code
$requestParams = [ 'cancel_url' => $this->getStripeCancelURL( $paymentBasket ),
'client_reference_id' => $basketId,
'metadata[user_id]' => $paymentBasket->getInt( 'user_id', 0 ),
'metadata[order_id]' => $basketId,
'metadata[invoice]' => $paymentBasket->getString( 'invoice', '' ),
'metadata[gateway]' => (int) $this->getAccountParam( 'id', 0 ),
];
if ( $customerId ) {
$requestParams['customer'] = $customerId;
}
// Applied specifically to subscription checkout sessions
$requestParams = [ 'mode' => 'subscription',
'success_url' => $this->getStripeReturnURL( $paymentBasket, true, true ),
'line_items[0][price_data][currency]' => strtolower( $paymentBasket->getString( 'mc_currency', '' ) ),
'line_items[0][price_data][product_data][name]' => $paymentBasket->getString( 'item_name', '' ),
'line_items[0][price_data][recurring][interval]' => $recurringPeriodLimits['interval'],
'line_items[0][price_data][recurring][interval_count]' => $recurringPeriodLimits['interval_count'],
'line_items[0][price_data][unit_amount]' => ( $recurringAmount * 100 ),
'line_items[0][quantity]' => 1,
'subscription_data[description]' => $paymentBasket->getString( 'item_name', '' ),
'subscription_data[metadata][user_id]' => $paymentBasket->getInt( 'user_id', 0 ),
'subscription_data[metadata][order_id]' => $paymentBasket->getInt( 'id', 0 ),
'subscription_data[metadata][invoice]' => $paymentBasket->getString( 'invoice', '' ),
'subscription_data[metadata][gateway]' => (int) $this->getAccountParam( 'id', 0 ),
];
That would just be "Plan Name for Username" as per your configuration. You can see it as item_name being set to the subscription data above.- The expected description that you set when you created the checkout session
Please Log in to join the conversation.
Please Log in to join the conversation.
return [ 'mode' => 'payment',
'success_url' => $this->getStripeReturnURL( $paymentBasket, false, true ),
'line_items[0][price_data][currency]' => strtolower( $paymentBasket->getString( 'mc_currency', '' ) ),
'line_items[0][price_data][product_data][name]' => $paymentBasket->getString( 'item_name', '' ),
'line_items[0][price_data][unit_amount]' => ( $amount * 100 ),
'line_items[0][quantity]' => 1,
'payment_intent_data[description]' => $paymentBasket->getString( 'item_name', '' ),
'payment_intent_data[metadata][user_id]' => $paymentBasket->getInt( 'user_id', 0 ),
'payment_intent_data[metadata][order_id]' => $paymentBasket->getInt( 'id', 0 ),
'payment_intent_data[metadata][invoice]' => $paymentBasket->getString( 'invoice', '' ),
'payment_intent_data[metadata][gateway]' => (int) $this->getAccountParam( 'id', 0 ),
];
Please Log in to join the conversation.
Please Log in to join the conversation.
This shouldn't be a problem anymore. The JS should trigger the verification action just fine and does in my tests, but have implemented the following not long ago.1. If onsite - issue with security authentication
Unfortunately I don't really see anything I can do about this. Their proposed solution isn't very reasonable. Is it that significant of a problem though? You should be able to see the appropriate details after clicking into a payment as it links everything up to its subscription. Just makes first glance a little annoying.2. If hosted - issue with their description tagging
Please Log in to join the conversation.
Please Log in to join the conversation.