#avpsolution-subscription-metadata

1 messages ยท Page 1 of 1 (latest)

brazen gulch
#

Hey ๐Ÿ‘‹ just to clarify, are you attempting to update a checkout session, or are you trying to set the subscription_data.metadata when you create the session?

fiery stone
#

Trying to add subscription_data.metadata while creating a session.

brazen gulch
#

Gotcha, and are you receiving any sort of an error?

fiery stone
#

not really, didn't catch any error so far

brazen gulch
#

Do you have the request ID for a one of these requests (req_123)?

fiery stone
#

When I checked the logs on the server the Request POST body was not showing subscription_data.metadata

#

req_hPEOU2SRTuwVCT request Id

brazen gulch
#

Thanks, bear with me while I dig into that.

fiery stone
#

Checkout session object

brazen gulch
#

Looking at that request I don't see any subscription_data being passed in. Looking at your snippet, it also looks like the user_feature isn't being entered as a string.

fiery stone
#

user_feature value is a JSON object.

#

I can give it a try by just passing a string.

brazen gulch
#

Gotcha, bear with me while I run through a test case in my account.

#

Hm, it seemed to work on my end. Would it be possible to replace UserFeature.getStripeMetaData() with a hard coded string such as 'test_value' to see if that works?

#

Additionally, can you share any insight on what you expect that function to return?

fiery stone
#

ok, so whenever I tried to pass nested JSON object as value of metadata tag it didn't work.

#

It works absolutely perfect with a plain JSON object.

#

in short, I must not use nested JSON objects

#

๐Ÿ™‚

brazen gulch
#

Ah, gotcha, yeah our metadata objects only support string values.

fiery stone
#

Thanks for the help and double-checking stuff for me on your side.

#

This resolves my problem thanks again.

brazen gulch
#

๐Ÿ‘ glad to hear, and best of luck on the rest of your project!