1
0 Comments

3rd party (stripe) metadata best practices?

Is there a best practice of storing metadata in 3rd party systems?

When we create a payment we use stripe metadata to reference a record in our system like so:

StripePaymentIntent::create([
  'amount' => 200,
  'metadata' => [
    'our_app' => '{'invoice_id': 'invoice_123'}'
  ]
]);

Because we use stripe connect this will be visible and editable in the user's platform. I feel like this is too open.

The only other way I could think to do this was base64 encoding which would give us something like:

StripePaymentIntent::create([
  'amount' => 200,
  'metadata' => [
    'our_app' => 'eydpbnZvaWNlX2lkJzogJ2ludm9pY2VfMTIzJ30='
  ]
]);

Has anyone else run into this challenge and how did you/would you solve it.

All input is appreciated.

Many Thanks

Trending on Indie Hackers
📈 We raised $500K pre-seed for our Reddit Marketing Tool 22 comments How I Acquired a Mobile App on Flippa (and grew it from $700/MRR to $5.4k) 17 comments Steph Smith on making $130k w/ an ebook, creating a course in 20 days, and the latest trends 10 comments Feedback, please: does the landing page explain the product? 7 comments Frictionless Customer Knowledge Base needs beta users 6 comments Tool to edit a mockup video? 1 comment