#Ali Raza - metadata

1 messages · Page 1 of 1 (latest)

pseudo heron
#

heya @rustic bloom, can you share the request id where you added a metadata to your subscription?

rustic bloom
#

this is my payment

#

$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'line_items' => [[
'price' => $price->id,
// For metered billing, do not pass quantity
'quantity' => 1,
]],

                'mode' => 'subscription',
                'customer' => Auth::user()->customer_id,
                        // 'transfer_group'=>mt_rand(000000000,999999999),
                'subscription_data' => [
                    'metadata'=>[

                        'Client email' => $client->email,
                        'PR email' => $user->email,
                        'Brief type' => $type,
                        'Brief Price' => $amount_without_fee_meta,
                        'VAT' => $vatN,
                    ],
                ],
#

this is code

#

@pseudo heron

pseudo heron
#

the metadata is showing on the Subscription object : https://dashboard.stripe.com/test/subscriptions/sub_1KDtuqHswjr8bdMVpVfx6ayv

As a general rule, metadata that is set on an object will not be silently copied over to any associated objects, so the metadata on a Subscription will not automatically copy over to the PaymentIntent of the Invoice i.e. pi_3KDtuqHswjr8bdMV1QqZQesH

Do you need the metadata of the Subscription to be on every corresponding PaymentIntent?

rustic bloom
#

yes @pseudo heron

pseudo heron