Reputation: 23
I am using Stripe Checkout and was wondering how to display some message on the Checkout page for a subscription. I have:
created product and plan on the Stripe dashboard.
created session in my php code:
$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'billing_address_collection' => 'required',
'subscription_data' => [
'items' => [
[
'plan' => $plan_id
]
],
],
'success_url' => $success_url.'?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => $cancel_url,
]);
unction redirect(id){
var stripe = Stripe('pk_test_######################');
stripe.redirectToCheckout({
sessionId: id
}).then(function (result) {
result.error.message = 'error';
});
}
redirect('<? echo $session->id; ?>');
The payment is made successfully.
Now I am just really curious about where can I (or is it possible to) add some message on the checkout page. I know for a one-time payment, you can add 'description' to 'line_items' when creating the session. However I found no clue of how to do it for a subscription.
Thanks in advance!
Upvotes: 2
Views: 748
Reputation: 7419
Unfortunately, that's not possible today.
I'd recommend signing up for the Checkout Roadmap mailing list to be notified of changes to Checkout in the future.
Upvotes: 1