#b33fb0n3

1 messages ยท Page 1 of 1 (latest)

warm currentBOT
little atlas
#

Hi there!

rancid cipher
#

Hey ๐Ÿ™‚

little atlas
#

You could save extra information in the metadata parameter of the PaymentIntent.

rancid cipher
#

ah ok. I saw that the metadata can only handle the length of x. So I wont be able to store everything if the customer buys multiple ones in one paymentintent. An contentId looks like this: cont_1690451575000

little atlas
#

You can store up to 50 keys in the metadata, that won't be enough for you?

#

If not, then store some kind of ID in the metadata, and then store the full content in your own database, which links to this ID.

rancid cipher
#

It would, but how could I store them dynamicaly. Cause the server will get an array ["cont_...", "cont_..."] and than I would save them dynamically and read it dynamically...

little atlas
#

I'm not sure I udnerstand the issue. Can you clarify the question with a conrete example?

rancid cipher
#

yeah. Currently I am not sure how I could do the splitting between the parts. For exmaple: I can store 27 content Ids in one key. What the name of the key to read it later. Is it maybe ids1 and on the second part ids2 and so on. How I can read them dynamically, so I will catch all of them later...

little atlas
#

I'm sorry I still don't understand.
If you think there's enough space in the metadata field, you could store the IDs like this: metadata: { ids: "id1, id2, id3" } or metadata: { 1: "id1", 2: "id2", 3: "id3" }.
If you think there's not enough space, then store a single ID like metadata: { customID: "xzy" }, and then in your own database store somewhere that xzy maps to IDs id1 id2 and id3

rancid cipher
#

alright, thanks!

little atlas
#

Happy to help ๐Ÿ™‚