Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe checkout API: setting a statement descriptor for subscriptions

In Stripe Checkout, we can easily modify the statement descriptor for a single payment intent (charge) in Stripe API using the code below.

Session::create([
    'payment_method_types' => ['card'],
    'success_url' => 'https://example.com/success',
    'cancel_url' => 'https://example.com/cancel',
    'line_items' => [...],
    'mode' => 'payment',
    'payment_intent_data' => [
        'statement_descriptor' => $statementDescriptor,
    ]
]);

How can we set a custom statement descriptor when using mode subscription??

Session::create([
    'payment_method_types' => ['card'],
    'success_url' => 'https://example.com/success',
    'cancel_url' => 'https://example.com/cancel',
    'line_items' => [...],
    'mode' => 'subscription',
    'subscription_data' => [ ??? ]
]);
like image 718
BassMHL Avatar asked Oct 27 '25 06:10

BassMHL


2 Answers

It's not possible to set up statement descriptor on Checkout Session in subscription mode. The default statement descriptor will be set to the first subscription item’s product’s statement_descriptor.

Alternatively, you may create subscription using API and update statement descriptor on the invoice every time when the invoice is still in draft state. The update Invoice request has to be made every billing cycle when an invoice is created.

like image 127
yuting Avatar answered Oct 29 '25 07:10

yuting


It's not possible to set up statement descriptor on Checkout Session in subscription mode. The default statement descriptor will be set to the first subscription item’s product’s statement_descriptor.

Alternatively, you may create subscription using API and update statement descriptor on the invoice every time when the invoice is still in draft state. The update Invoice request has to be made every billing cycle when an invoice is created.

like image 33
yuting Avatar answered Oct 29 '25 06:10

yuting



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!