Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating payment method arguments documentation are different from this library #920

Closed
dbarzdys opened this issue Aug 17, 2019 · 4 comments
Assignees

Comments

@dbarzdys
Copy link

While programming I found that PaymentMethodParams struct contains Customer

Customer *string `form:"customer"`

But API documentation does not list it under allowed arguments
https://stripe.com/docs/api/payment_methods/create?lang=go

How does it work? Does it automatically attaches customer to new payment method or is it not even used for creating new payment methods?

@remi-stripe
Copy link
Contributor

@dbarzdys Sorry about the confusion here. You're right that this parameter does not work in the API. You have to create the PaymentMethod and then separately attach it to a Customer

@remi-stripe
Copy link
Contributor

Opened a PR to clearly mention this parameter never worked and we will remove it in the next major version!

@bendiknesbo
Copy link

Removing this parameter removed the possibility to share a payment-method from a platform-account to a connected account.

After recommendation from "@karllekko" on #stripe on freenode IRC, a workaround is to use https://godoc.org/github.com/stripe/stripe-go#ExtraValues to manually add the Customer-parameter back.

Maybe another endpoint should be created for sharing payment-methods that take a ClonePaymentMethodParams/PaymentMethodCloneParams struct or similar?

@remi-stripe
Copy link
Contributor

Opened a fix in #983 sorry for the trouble here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants