fuentesloic / nuxt-stripe

MIT License
90 stars 8 forks source link

feat: stripeConfig server options and related types #23

Closed sandros94 closed 1 year ago

sandros94 commented 1 year ago

Following the official stripe-node repo and its documentation it could be beneficial to add all the other available options:


From the original README, some of the configurations are:

Option Default Description
apiVersion null Stripe API version to be used. If not set, stripe-node will use the latest version at the time of release.
maxNetworkRetries 0 The amount of times a request should be retried.
httpAgent null Proxy agent to be used by the library.
timeout 80000 Maximum time each request can take in ms.
host 'api.stripe.com' Host that requests are made to.
port 443 Port that requests are made to.
protocol 'https' 'https' or 'http'. http is never appropriate for sending requests to Stripe servers, and we strongly discourage http, even in local testing scenarios, as this can result in your credentials being transmitted over an insecure channel.
telemetry true Allow Stripe to send latency telemetry.

Note Both maxNetworkRetries and timeout can be overridden on a per-request basis.

sandros94 commented 1 year ago

Ofcourse this introduces some breaking changes, since apiVersione should be configured under stripe.serverConfig.apiVersion instead of the old stripe.apiVersion.