Fix DeprecationWarning when encoding StripeObject metadata (fixes #1651)#1687
Conversation
|
@praniketkw Can you also update the PR description based on the new approach? |
|
@ramya-stripe Done! |
|
@praniketkw Thanks for your work on this. Can you update the PR description to reflect the final approach we have taken here? |
|
@boris-savic Internally, the So both these properties should have the same value. |
|
In 14.1.0, if an object was passed in PaymentIntent.create for the |
|
@boris-savic I was looking at the PaymentIntent.create API and the customer key requires a string and not an object. |

Fixes #1651
Why?
When updating metadata on resources like invoices, users encountered a DeprecationWarning even though they were using the public API correctly. The warning was triggered internally when the encoder checked for the deprecated stripe_id property on StripeObject instances. While the deprecation warning serves an important purpose for direct user access to stripe_id, it should not be shown for internal library usage.
What?