Metadata on subscriptions not working.

const { error: upgradeError } = await authClient.subscription.upgrade({
plan,
successUrl,
cancelUrl,
annual: isAnnual,
metadata: {
ga_client_id: clientId,
},
fetchOptions: {
headers: {
'x-currency': currency,
// Pass GA client_id for server-side GTM attribution
...(clientId && { 'x-ga-client-id': clientId }),
},
},
});
const { error: upgradeError } = await authClient.subscription.upgrade({
plan,
successUrl,
cancelUrl,
annual: isAnnual,
metadata: {
ga_client_id: clientId,
},
fetchOptions: {
headers: {
'x-currency': currency,
// Pass GA client_id for server-side GTM attribution
...(clientId && { 'x-ga-client-id': clientId }),
},
},
});
4 Replies
Lukem121
Lukem121OP2w ago
So attempting to add metadata to a subscription created via the Stripe plugin, but it's not working.
Ping
Ping2w ago
Hey mind opening an issue on Github for this?
Lukem121
Lukem121OP2w ago
Sure!
Lukem121
Lukem121OP2w ago
GitHub
[Stripe] Metadata not passed through to Stripe subscription on upgr...
Is this suited for github? Yes, this is suited for github To Reproduce When creating a subscription using the authClient.subscription.upgrade method, the metadata object does not get applied to the...

Did you find this page helpful?