-
Notifications
You must be signed in to change notification settings - Fork 773
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
Typing issue in CustomerSourceCreateParams.source
#974
Comments
@svallory Thanks for reaching out! This one is by design. Passing raw card details is something that is actively discouraged since it puts you under a higher scope for PCI compliance. Our types actively hide this feature to ensure developers don't mistakenly use this and put their business at risk. Our API also blocks this by default and requires a custom setting to get access. I hope this helps clarify the decision! |
Thanks @remi-stripe. I disagree with the approach, but it does clarify the issue. We use VGS proxy to remain PCI compliant. May I suggest adding a comment to the code explaining this? It would save a lot of time. Also, the documentation implies sending the card data in the |
@svallory Thanks for catching the failing tests, I'll get them fixed! |
@remi-stripe any update on this. Using the code mentioned on the customer.spec also gives type issues const params = {
source: {
object: 'card',
number: '123456',
exp_month: '12',
exp_year: '30',
},
};
stripe.customers.createSource('cus_123', params); |
Type issues are expected, we strongly discourage sending raw card details server-side as it drastically increases your PCI compliance burden. It works, it's just not in types. |
Stripe Node library version:
8.83.0
The
source
property ofCustomerSourcesCreateParams
, used inStripe.customers.createSource()
has type string and does not support an object, as specified in the API hereThe text was updated successfully, but these errors were encountered: