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
I will promote your startup to 50K+ people 63 comments I made Session, a productivity timer that makes $5K/month in net profit, AMA! 21 comments I built an NFT Guide site. Feedback welcome! 15 comments I've teased this project for a while. Initial thoughts on this landing page? 12 comments Only 30 days! We finished a great Etsy products research tool 10 comments #1 on Product Hunt with an open-source project 8 comments