Stripe developer foundations videos
Tags: payments, devrel, stripe
Published: 2021-04-27 23:54:00

Learn the fundamentals of working with the Stripe API so you can build almost anything on Stripe.

We’ve launched a series of videos that shows you how to get started with the 7 officially supported client libraries.  As a developer, these client libraries are the main way you’ll interact with the Stripe API. 

You’ll learn about:

- Authentication
- Making requests
- Pagination
- Metadata
- Webhook helpers
- Idempotency & retries
- Versioning
- Expanding objects
- `.env` and environment variables


![Thumbnail image showing advocates Developer Foundations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mf0qo3elh412h1rtushj.png)


Check out the individual client library playlists below or read on for an overview of each topic:

[stripe-ruby](https://www.youtube.com/playlist?list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk)
[stripe-python](https://www.youtube.com/playlist?list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO)
[stripe-php](https://www.youtube.com/playlist?list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE)
[stripe-node](https://www.youtube.com/playlist?list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY)
[stripe-go](https://www.youtube.com/playlist?list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a)
[stripe-java](https://www.youtube.com/playlist?list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg)
[stripe-dotnet](https://www.youtube.com/playlist?list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC)


### Authentication

Authentication is how you prove that you have access to a specific Stripe account when making an API call. When building a Stripe integration, you’ll work with several API keys, each with a particular use case. In these videos, you’ll learn about:


- Authorization HTTP headers
- Types of Stripe API keys
    - Publishable keys
    - Secret keys
    - Restricted keys
    - Webhook signing secrets
- Roll leaked API keys
- Configure an API key globally
- Configure an API key per-request
- Authenticate requests for Stripe Connect globally
- Authenticate requests for Stripe Connect per-request

[ruby](https://www.youtube.com/watch?v=8Db0nTVlKM0&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=1)
[python](https://www.youtube.com/watch?v=gRvlMeBks6k&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=1)
[php](https://www.youtube.com/watch?v=CeufP46S5BI&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=1)
[node](https://www.youtube.com/watch?v=R5RoYDEIhCI&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=1)
[go](https://www.youtube.com/watch?v=oJRPV07bVS0&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=1)
[java](https://www.youtube.com/watch?v=t4iJ07E_tA8&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=1)
[dotnet](https://www.youtube.com/watch?v=N20T0rXAWsc&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=1)



### Making requests

The Stripe API has hundreds of API endpoints and accepts thousands of parameters. Once you've mastered the small set of patterns for passing arguments to create, retrieve, update, and delete objects, you'll be able to confidently use the API reference documentation and apply these patterns to build what your business needs. You'll see how to format parameters and pass request body, query string params, and request headers when making requests to the Stripe API. In these videos, you’ll learn how to:


- Navigate the API reference documentation
- Create an object passing without passing any params
- Retrieve single object
- Create an object with:
    - scalar values
    - enum values
    - nested hashes
    - lists of strings
- Update an object with scalar values
- Update an object with a list of nested hashes
- Retrieve a list of objects
- Filtering lists of objects
- Delete an object
- Using custom methods
- Using nested service methods
- Passing request headers

[ruby](https://www.youtube.com/watch?v=ALYCKg7E7AA&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=2)
[python](https://www.youtube.com/watch?v=Hg5FkqSmV68&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=2)
[php](https://www.youtube.com/watch?v=Fc75MwzT4MI&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=2)
[node](https://www.youtube.com/watch?v=_Ayi6wohGkc&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=2)
[go](https://www.youtube.com/watch?v=Wkgftgu5nag&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=2)
[java](https://www.youtube.com/watch?v=cg6xosdd2GM&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=2)
[dotnet](https://www.youtube.com/watch?v=HZnzzHpGrMU&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=2)


### Pagination

Pagination, also known as paging, divides a set of API results into discrete pages. Pagination is useful when you need to retrieve a list of objects when you have more than 100 items. The Stripe API uses cursor-based pagination, and the client libraries have built-in support for helping you iterate over a list of objects. Learn how to work with lists of Stripe objects using the client libraries, including how to take advantage of auto-pagination. In these videos, Amanda covers:


- Manual pagination using a cursor
- Auto-pagination using the helpers

[ruby](https://www.youtube.com/watch?v=mawDqjFzTIQ&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=3)
[python](https://www.youtube.com/watch?v=R0gnaIn9g18&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=3)
[php](https://www.youtube.com/watch?v=IGh-pn2g5_0&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=3)
[node](https://www.youtube.com/watch?v=13StUEc9XrY&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=3)
[go](https://www.youtube.com/watch?v=1sueI-8_kNA&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=3)
[java](https://www.youtube.com/watch?v=t5i6B26u08A&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=3)
[dotnet](https://www.youtube.com/watch?v=kcCwtJuI5ck&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=3)


### Metadata

Metadata is useful for storing additional, structured information on an object. For example, you could store your user's full name and corresponding unique identifier from your system on a Stripe Customer object. Metadata is not used by Stripe—for example, not used to authorize or decline a charge—and won't be seen by your users unless you choose to show it to them. In this video, Dawn shows you how to work with metadata from the Stripe API. She covers:


- Supported resources (updateable objects)
- Use cases for passing metadata
- Capabilities and limitations
- Best practices
- When metadata is copied from one object to another
- Descriptions vs. metadata
- Security and privacy
- Add new metadata to an object
- Add key-value pair to existing metadata
- Update a metadata value
- Remove a key-value pair

[ruby](https://www.youtube.com/watch?v=fPYi0y2LSDQ&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=4)
[python](https://www.youtube.com/watch?v=7BHqLj2Xm0E&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=4)
[php](https://www.youtube.com/watch?v=u_qsyUSTVKw&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=4)
[node](https://www.youtube.com/watch?v=KxBwIhncYD8&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=4)
[go](https://www.youtube.com/watch?v=qeCDxIfneww&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=4)
[java](https://www.youtube.com/watch?v=wdaja6Fx92E&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=4)
[dotnet](https://www.youtube.com/watch?v=Li2rnWgRwVE&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=4)


### Webhook helpers

A webhook handler is a core piece of Stripe integrations and helper methods in the client libraries make it easier to build them. Webhook notifications are requests directly from Stripe to your server to update you when events happen on your Stripe Account. Learn from Thorsten about how to use helper methods in the client library to deserialize webhook event payloads into instances of objects rather than working with raw JSON directly. You'll also learn how signature verification works and how you can use the client library methods to handle signature verification for you. You'll also learn to use the `listen` command in the Stripe CLI, so you don't need a tool like ngrok for testing your webhook endpoints locally.


- Events
- Webhooks vs. polling
- Event versioning
- Deserialization of event data
- Implement a basic webhook handler
- Securing your webhook handler with signature verification
- Create webhook endpoints
- Using the `listen` command in the Stripe CLI

[ruby](https://www.youtube.com/watch?v=lmrSi_0UP14&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=5)
[python](https://www.youtube.com/watch?v=QK31ioLTqGU&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=5)
[php](https://www.youtube.com/watch?v=ROBIBNiVPI4&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=5)
[node](https://www.youtube.com/watch?v=WLHvHUWd2ug&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=5)
[go](https://www.youtube.com/watch?v=ZEuYtQ-vnB4&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=5)
[java](https://www.youtube.com/watch?v=LI2dnE6olQY&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=5)
[dotnet](https://www.youtube.com/watch?v=pQQH1bLVqjM&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=5)


### Idempotency & retries

Idempotence is the property of an API call whereby it can be repeated without changing the result beyond the first application. For instance, making an idempotent request to create a payment could help avoid accidentally double-charging a customer when they double click. 

Learn how to use idempotency for safely retrying requests without accidentally performing the same operation twice. Passing idempotency keys can save you when an API call fails in transit and you do not receive a response. For example, if a request to create a charge does not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee that no more than one charge is created. Matthew shows us how to pass idempotency keys and automatically retry requests using the client library in this edition. He covers how to:


- Pass the Idempotency-Key request header
- Create an object with an idempotency key
- Generate UUIDs to use as idempotency keys
- Use our built-in client library retry logic

[ruby](https://www.youtube.com/watch?v=nnMqSQtSZUQ&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=6)
[python](https://www.youtube.com/watch?v=y0ONKsP1LkU&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=6)
[php](https://www.youtube.com/watch?v=c-LA0AVc6zQ&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=6)
[node](https://www.youtube.com/watch?v=n5qQcZ18mY4&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=6)
[go](https://www.youtube.com/watch?v=sUkZnCvmQ8g&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=6)
[java](https://www.youtube.com/watch?v=ywxFlbY36_o&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=6)
[dotnet](https://www.youtube.com/watch?v=fLnM04yS6Zc&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=6)


### Versioning

When backward-incompatible changes are introduced to the API, a new, dated version is released. In this episode, you'll learn from Dawn about API versioning with the Stripe API. You'll also see the differences between some responses returned from the API for different versions and how they impact the shape of webhook notification payloads. 


- The difference between API versions, client library versions, and Stripe.js versions
- How API changes work with Stripe
- Account API versions
- See the same object with two API versions
- Create a webhook endpoint for a specific API version

[ruby](https://www.youtube.com/watch?v=PxMztPi6q6Q&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=8)
[python](https://www.youtube.com/watch?v=ETPQ_M3eb1Q&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=7)
[php](https://www.youtube.com/watch?v=5HjveO8XAdU&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=7)
[node](https://www.youtube.com/watch?v=nYCW6hvAjek&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=7)
[go](https://www.youtube.com/watch?v=mBrhFLWxAD8&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=7)
[java](https://www.youtube.com/watch?v=bxh6Z9aNGwA&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=7)
[dotnet](https://www.youtube.com/watch?v=1mJnx7wnNYE&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=7)


### Expand

In this episode, we’ll learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses. Expand is a feature for addressing the N+1 problem performance problem with API requests. In these videos, Matthew will show you how to:


- Determine which properties are expandable by looking at the API reference
- Expand properties from related objects
- Expand properties from distantly related objects
- Expand additional properties on all objects in a list
- Expand properties that aren’t included by default in a response
- Use expand with POST requests (not just retrieve)

[ruby](https://www.youtube.com/watch?v=dkpknsaWuQQ&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk)
[python](https://www.youtube.com/watch?v=94RgPhqBLfU&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=8)
[php](https://www.youtube.com/watch?v=xmfgetuwf-0&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=8)
[node](https://www.youtube.com/watch?v=3-erqAmS8Ak&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=8)
[go](https://www.youtube.com/watch?v=UA7c4Y524HY&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=8)
[java](https://www.youtube.com/watch?v=6Ffo4id49QI&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=8)
[dotnet](https://www.youtube.com/watch?v=ODf4LyTmci8&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=8)


### Environment variables and `.env`

An environment variable is a dynamic-named value that can affect the way running processes will behave. In Stripe Samples and many of our tutorials, we use `.env` files to load test API keys and other settings so they can be accessed like environment variables from code. In this edition, CJ walks through the fundamentals of managing environment variables with `.env` and covers the third party libraries we use for working with `.env` files. Note that in production you might use a more feature rich and secure credential management system.

[ruby](https://www.youtube.com/watch?v=KRzt_vTZaLQ&list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index=7)
[python](https://www.youtube.com/watch?v=ecshCQU6X2U&list=PLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index=8)
[php](https://www.youtube.com/watch?v=qAkxQIYHlUw&list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE&index=8)
[node](https://www.youtube.com/watch?v=onhXVIvxFQU&list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index=8)
[go](https://www.youtube.com/watch?v=TWF6VUyxQ84&list=PLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index=8)
[java](https://www.youtube.com/watch?v=o1HsGbTZObQ&list=PLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index=8)
[dotnet](https://www.youtube.com/watch?v=QFf2HlOcD24&list=PLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index=8)
 
We look forward to sharing some behind the scenes for those curious about creating content in a scalable way across several languages you officially support.