What You'll Learn

What You'll Build

To get started fork the collection from Stripe's public workspace within Postman.

Fork the collection

Enter a name for your fork and select the workspace where it will be created:

Fork label

You can also fork the environment template from the Stripe Developers Workspace:

Fork environment

To run requests you'll need to supply your testmode secret API key and set it as an environment variable within your workspace.

To set any environment variable, create a new envionment within Postman:

Create new environment

Add your secret key as a variable to the environment and save:

set API key

Set the environment to active:

save as active

Or, select it from the dropdown to set the active environment:

set environment dropdown

If your environment is set up correctly, you should see your secret key value if you mouse over the secret_key variable in the Token field:

mouseover variable resolution

Be sure to save the collection after you've configured the set the key:

save changes

You should be ready now to make a test call. An easy first call is to create a customer:

see customer endpoints

Since no parameters are required to create a customer, you can just hit the Send button to run this request:

send button

If your environment is set up you'll get a customer object back as the response to the call:

create customer

Add parameters to the call by clicking the body tab, where you'll see a list of available parameters. Select and populate the ones you want to use. Here's an example of adding an email parameter:

create customer with email

You'll see the email address in the reponse:

create customer with email response

Right now metadata does not show up as a optional parameter on requests, but it can still be provided to calls that will accept it. Here's an example of adding 2 metadata fields to the customer create call:

set metadata on a request

Metadata key value pairs can be updated in a similar manner. To remove a metadata key during an update call, supply the metadata[key] parameter without setting a value. This will pass an empty string as part of the request:

clear metadata key

To remove all metadata pass the metadata parameter without a value set:

remove metadata key

If you want to learn more about the Stripe API, check out other endpoints in the collection, and review the official API documentation for more details.

What we've covered