Skip to main content

Stripe — Application Overview

Written by Wrk Product

Overview

Stripe is a payment processing and financial infrastructure platform used by businesses to accept payments, manage subscriptions, handle invoices, and facilitate online commerce. It is commonly used by finance, operations, and engineering teams to manage payment workflows and customer billing.

The Stripe integration within the Wrk platform allows you to automate payment, customer, and billing workflows by calling the Stripe REST API through prebuilt Wrk Actions.

This document provides an overview of how Stripe integrates into Wrk, how authentication works, general API behaviour, and a full list of available Wrk Actions.


Authentication

Stripe uses API key–based authentication for all API requests.

When connecting Stripe in Wrk, you must provide a valid API key, which is included in the Authorization header for every request.

Input

Description

Secret Key

Your Stripe API secret key

If the API key is missing, invalid, or revoked, Stripe returns an HTTP 401 Unauthorized response.

How to Obtain API Keys

API keys can be generated from the Stripe Dashboard:

  1. Log in to your Stripe account

  2. Navigate to Developers → API keys

  3. Copy your Secret Key (starts with sk_)

  4. Store it securely and use it in your Wrk Connected Account

Important Notes

  • Stripe provides both test and live API keys; ensure the correct mode is used for your workflow

  • Secret keys must be kept secure and never exposed client-side

  • API keys can be rotated from the Stripe Dashboard if needed


General API Behaviour

Pagination

Stripe uses cursor-based pagination for all list endpoints.

  • limit — number of objects per page (default: 10, max: 100)

  • starting_after — cursor to fetch the next page

  • ending_before — cursor to fetch the previous page

Responses include:

  • data — array of objects

  • has_more — boolean indicating if additional pages exist

To retrieve additional results, pass the ID of the last object from the previous response into starting_after.

Object Structure

Stripe returns consistent JSON structures across most resources such as customers, charges, invoices, and subscriptions.

Common fields include:

  • id — unique identifier for the object

  • object — type of resource (e.g., customer, charge)

  • created — timestamp of object creation

  • metadata — key-value pairs for custom data

These IDs must be used when referencing objects in subsequent API calls.

Filtering and Querying

Stripe supports filtering through query parameters on list endpoints.

Examples:

  • Filter charges by customer

  • Retrieve invoices by subscription

  • Filter events by type or date range

Stripe does not use a SQL-like query language; filtering is endpoint-specific and parameter-driven.

Idempotency

Stripe supports idempotency keys for safely retrying requests without creating duplicate operations.

  • Pass an Idempotency-Key header when creating or updating resources

  • Stripe ensures that repeated requests with the same key produce the same result

This is especially important for payment and charge creation workflows.

Rate Limits

Stripe enforces rate limits to ensure API stability.

  • Excessive requests may return HTTP 429 Too Many Requests

  • Limits vary depending on account activity and endpoint usage

Clients should implement retry logic with exponential backoff when handling rate limit responses.

Errors and Troubleshooting

Stripe uses standard HTTP status codes:

  • 400 — Bad Request (invalid parameters)

  • 401 — Unauthorized (invalid API key)

  • 402 — Request Failed (e.g., card declined)

  • 404 — Resource not found

  • 429 — Rate limit exceeded

Error responses include a structured error object with a message and type for debugging.


Available Wrk Actions

Wrk provides a curated set of Stripe Actions that map directly to commonly used payment and billing endpoints.

General

  • Perform an API call in Stripe

Customers

  • Create a customer in Stripe

  • Retrieve a customer from Stripe

  • Retrieve all customers from Stripe

  • Update a customer in Stripe

  • Delete a customer in Stripe

Payments & Charges

  • Create a charge in Stripe

  • Retrieve a charge from Stripe

  • Retrieve all charges from Stripe

Invoices

  • Create an invoice in Stripe

  • Retrieve an invoice from Stripe

  • Retrieve all invoices from Stripe

  • Finalize an invoice in Stripe

  • Send an invoice in Stripe

Subscriptions

  • Create a subscription in Stripe

  • Retrieve a subscription from Stripe

  • Update a subscription in Stripe

  • Cancel a subscription in Stripe

Products & Prices

  • Create a product in Stripe

  • Retrieve a product from Stripe

  • Create a price in Stripe

  • Retrieve a price from Stripe


Additional Resources

Did this answer your question?