Stripe.setGlobalDefaults()

Save the specified default options (e.g. developer credentials) in a process-wide global variable for future, automatic (and easier) use of the other methods in this package.

If you only need to interact with one developer account (one API key), we recommend using this method to simplify your userland code by passing that API key in here. That way, you only have to do it once, allowing you to avoid the headache of making sure the configured API key is always consistently applied. > One notable (yet rare) exception is if you need to manually manage multiple sets > of dev credentials. In that case, just pass in the API key directly when you call > each method. (Also note that, even if you provide defaults using this method, those > default credentials etc. can always be overridden on a per-use basis.)

Usage

Hover over inputs/exits for more info.

var Stripe = require('machinepack-stripe');


// Save the specified default options (e.g. developer credentials) in a process-wide global variable for future, automatic (and easier) use of the other methods in this package.

Stripe.setGlobalDefaults({

: ,

}).execSync();

Inputs

undefined

Exits

error

An unexpected error occurred.

success

OK.