Code Monkey home page Code Monkey logo

stripe-postman's Introduction

Now available within Postman's API Network

The Stripe API Collection is now hosted within Stripe's public workspace in Postman. This means you no longer need to import this collection, but can instead fork from the public workspace into yours. Head over there to get started.

Stripe API Postman Collection

This is a postman collection covering the Stripe API. See https://stripe.com/docs/api for more details.

Prerequisites

Getting Started

To get started you can either fork the collection from Stripe's public workspace within Postman or import the collection JSON file from this repo.

Fork the collection from Stripe's public workspace

From within the Stripe's public workspace, fork the Stripe API collection:

Fork collection

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

Fork form

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

Fork environment template

Next: Set your API key

Import the collection file into your workspace

If you don't want to fork the collection from the public workspace, you can import it from this repo.

Within your Postman workspace select the Import button:

Import collection

Next copy the StripeAPICollection.json contents and paste in the Paste Raw Text section of the import dialog:

Import raw text

Set your API key

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, fork the environment template within the Stripe public workspace, or create a new envionment within Postman:

create a 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

Now within the collection set it to use the environment you just created:

set collection environment

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:

secret key mouseover

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

save key

Make a test call

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

customer endpoints

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

create customer send

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

create customer send

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

Passing Metadata In a Request

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

Other useful links

To keep track of major Stripe API updates and version, reference the API upgrades page in our documentation. For a detailed list of API changes, please refer to our API Changelog.

We want to hear from you

We want to hear how we can make the collection better! Don't hestiate to file issues for any bugs you encounters, features you'd like to see or other suggestions you have.

stripe-postman's People

Contributors

cching-stripe avatar cecilphillip-stripe avatar charlesw-stripe avatar christopherb-stripe avatar dawn-stripe avatar oktawianlagiewski avatar richardm-stripe avatar trag-stripe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

stripe-postman's Issues

Execution

This is mt first time actually executing. But can you please explain why I need 3 sets of keys? I feel lile that's a lie

Customer Shipping Address Update/Creation

When using update a customer the shipping[address] is shown as {"line1":"","city":"","country":"","line2":"","postal_code":"","state":""} in the example.

This returns an error

{
"error": {
"message": "Invalid object",
"param": "shipping[address]",
"type": "invalid_request_error"
}
}

I could only get it to work by creating new keys:

shipping[address][line1]
shipping[address][line2]
shipping[address][city]
shipping[address][country]
shipping[address][postal_code]
shipping[address][state]

Am I missing something in the way it is shown in the example

Andy

Request URLs should use Postman variables

If we replace object id in the request URLs with Postman variables it may make it easier for users to chain requests:

I.e. GET {{baseUrl}}/v1/customers/:customer becomes GET {{baseUrl}}/v1/customers/{{customer}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.