You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the Stripe Customer Documentation, a token can be passed into this endpoint which will create a new default payment source for the customer:
Currently, this method accepts a Stripe.Source.t(), but that would require an additional HTTP request. Instead, if we allow a binary type for the param token then we can let Stripe handle the downstream Source creation.
I'm currently getting around this by doing the following:
This allows the token to be passed when it encounters cast_id
However, this isn't really clear in the docs. If we don't want to change the type contracts to accept a binary() for source, then maybe we should indicate this solution in the documentation. Also, there are no tests that pass parameters to this function, the only test for create passes an empty map.
The text was updated successfully, but these errors were encountered:
According to the Stripe Customer Documentation, a token can be passed into this endpoint which will create a new default payment source for the customer:
Currently, this method accepts a
Stripe.Source.t()
, but that would require an additional HTTP request. Instead, if we allow a binary type for the paramtoken
then we can let Stripe handle the downstream Source creation.I'm currently getting around this by doing the following:
This allows the token to be passed when it encounters
cast_id
However, this isn't really clear in the docs. If we don't want to change the type contracts to accept a binary() for
source
, then maybe we should indicate this solution in the documentation. Also, there are no tests that pass parameters to this function, the only test for create passes an empty map.The text was updated successfully, but these errors were encountered: