Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

alexpearson1313's avatar

Issue with Cashier and Stripe subscription billing

Hi,

I am building a subscription based application using Cashier and Stripe. I have it currently configured so within testing I can create a new customer, purchase / cancel and resume a subscription. I am using Stripe elements rather the button they provide with the popup, mainly due to wanting the subscription data within our database. Also having the checkout customised simply looks nicer in my opinion.

My issue is that I am currently only sending the card number / exp & cvc to stripe. I would also like to send through the billing address details as I feel most payments would just be declined if you do not provide the billing address for verification etc. On top of that I would want the invoice to have these details on it when downloaded. This is the other reason for wanting to pass that information.

I have tried the following methods but when I purchase a subscription none of the data shows on stripe. each payment simply shows it is coming from the US and no description or metadata is added.

Method 1

$user->newSubscription('main', $plan)->withMetadata(['description' => $name])->create($stripeToken);

Method 2

$user->newSubscription('main', $plan)->create($stripeToken, [

            'email' => $email
        ]);

Method 3

$user->newSubscription('main', $plan)->create($stripeToken, [

            "email" => $email
        ]);

Thanks in advanced for your help

Alex

0 likes
0 replies

Please or to participate in this conversation.