canonical: https://jentic.com/apis/stripe.com/stripe

# Stripe API

Accept and process payments across 135+ currencies and 50+ payment methods including cards, bank debits, wallets, and buy-now-pay-later. The API provides 587 endpoints covering payment intents, subscriptions, invoicing, refunds, disputes, connected accounts, and checkout sessions. Handles PCI compliance, 3D Secure authentication, and automatic retry logic for failed charges.

## For AI agents

Process payments, manage subscriptions, issue refunds, and handle invoicing for internet businesses. Supports 135+ currencies and 50+ payment methods with built-in fraud protection.

## Scope

Does not handle accounting, tax filing, or payroll - use for payment processing, subscription billing, and invoicing only.

## Capabilities

- Accept one-time and recurring card payments with automatic 3D Secure handling
- Create and manage subscriptions with metered billing, trials, and proration
- Generate and send invoices with configurable line items and payment terms
- Issue full or partial refunds against charges and payment intents
- Onboard connected accounts for marketplace and platform payment splits
- Run prebuilt Checkout sessions that handle payment form UI and validation
- Track and respond to payment disputes with evidence submission workflows

## Use cases

### AI Agent Payment Processing

AI agents use the Stripe API through Jentic to create payment intents, confirm charges, and check payment status without handling API keys directly. The agent searches Jentic for the operation (e.g., 'process a payment'), receives the /v1/payment_intents endpoint schema, and executes. Jentic stores Stripe secret keys in its encrypted vault and injects them into requests - the agent never sees raw credentials.

Example prompt: Create a Payment Intent for $49.99 USD with card payment method type, confirm it with a test card token, then verify the status is 'succeeded'

### Subscription Billing

Create and manage recurring subscriptions with flexible billing intervals, free trials, metered usage, and automatic proration on plan changes. Stripe handles dunning (retry failed charges), sends invoice emails, and applies tax rates automatically. Subscriptions support multiple price items, quantity adjustments, and pause/resume functionality.

Example prompt: Create a customer, attach a payment method, then create a subscription on the 'pro-monthly' price with a 14-day trial and confirm the subscription status is 'trialing'

### E-Commerce Checkout

Accept payments for physical and digital goods using Stripe Checkout, a prebuilt hosted payment page that handles card input, validation, and 3D Secure authentication. Checkout sessions support one-time payments and subscription sign-ups, with configurable success and cancel URLs. Supports 50+ payment methods and 135+ currencies without additional integration work per method.

Example prompt: Create a Checkout session for a $99 one-time purchase in USD with card and Apple Pay enabled, set the success URL, and return the checkout URL to the user

### Refunds and Dispute Management

Issue full or partial refunds against payment intents or charges, with refund reason tracking and status monitoring. For disputes (chargebacks), upload evidence documents, submit counter-arguments, and track outcomes. The API provides webhook events for real-time dispute status changes, enabling automated response workflows within the evidence submission deadline.

Example prompt: Create a partial refund of $15.00 against a specific payment intent, then retrieve the refund object to confirm the status is 'succeeded' and the amount matches

### Invoice Generation and Delivery

Generate itemised invoices for customers with configurable line items, tax rates, discounts, and payment terms. Invoices can be finalised and sent via email with a hosted payment link, or marked as paid externally. Auto-advance invoices charge the customer's default payment method on the due date, enabling hands-off accounts receivable.

Example prompt: Create a draft invoice for a customer with two line items (consulting $500, software license $200), finalise it, and send the hosted payment link

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/payment_intents | Create a Payment Intent to collect a payment |
| POST | /v1/payment_intents/{intent}/confirm | Confirm a Payment Intent to initiate the charge |
| GET | /v1/charges | List all charges with optional filters |
| POST | /v1/refunds | Create a refund against a charge or payment intent |
| POST | /v1/customers | Create a customer record |
| POST | /v1/subscriptions | Create a subscription for recurring billing |
| POST | /v1/invoices | Create a draft invoice |
| POST | /v1/checkout/sessions | Create a Checkout session for hosted payments |

## Key resources

- **Payment Intents** — Payment lifecycle management from creation through confirmation to settlement
- **Customers** — Customer records with payment methods, subscriptions, and invoice history
- **Subscriptions** — Recurring billing with trials, metering, and automatic invoicing
- **Invoices** — Itemised invoices with line items, tax, and hosted payment collection
- **Refunds** — Full and partial refund processing with reason tracking
- **Checkout Sessions** — Hosted payment pages handling UI, validation, and payment method selection

## Why Jentic

- **Setup:** Wiring the Stripe API by hand means handling its bearer or basic key auth, idempotency keys, and the surface area of hundreds of payment, subscription, and invoice endpoints yourself. Through Jentic you install once, import the Stripe API from the API Directory, store the secret key once, and your agent calls it.
- **Permission scoping:** You limit the agent to the operations it needs, such as creating a payment intent or a checkout session, and leave the rest of Stripe's surface out of the allowed set. Because you choose the operations, actions like issuing refunds or cancelling subscriptions are not available to the agent unless you add them.
- **Credential handling:** Your Stripe secret key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'process a payment' or 'create a subscription', and Jentic returns the matching Stripe operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Adyen Checkout API** — Adyen offers similar payment processing with stronger in-person POS and enterprise acquirer features
- **PayPal Payments API** — PayPal provides wallet-based payments and buyer protection while Stripe focuses on card and bank-based processing
- **The Plaid API** — Plaid verifies bank accounts that Stripe uses for ACH payments
- **Xero Accounting API** — Xero records Stripe payments in the accounting ledger for reconciliation

## FAQ

### What authentication does the Stripe API use?

Stripe supports HTTP Basic authentication (API key as username) and Bearer token authentication. Secret keys are prefixed with sk_live_ or sk_test_. Through Jentic, API keys are stored encrypted in your Jentic One instance - agents receive authenticated requests and never handle raw secret keys directly.

### Can I create subscriptions with free trials using the Stripe API?

Yes. POST to /v1/subscriptions with a trial_period_days parameter or trial_end timestamp. During the trial, no charge is made. When the trial ends, Stripe automatically creates an invoice and charges the customer's default payment method. Trials support conversion tracking via the subscription.trial_will_end webhook event.

### What are the rate limits for the Stripe API?

Stripe allows up to 100 read requests per second and 100 write requests per second in live mode per account. Test mode has higher limits. When exceeded, the API returns HTTP 429 with a Retry-After header. Batch operations like list endpoints count as single requests regardless of result count.

### How do I process a payment through the Stripe API via Jentic?

Search Jentic for 'process a credit card payment', then load the /v1/payment_intents operation schema. The agent provides amount (in cents), currency, and payment method type. Jentic handles API key injection and the agent receives the payment intent status. Install with pip install jentic run it through Jentic One, the self-hosted execution layer.

### Does the Stripe API support marketplace payment splits?

Yes. Connected accounts enable platforms to split payments between themselves and sellers. The /v1/accounts endpoint onboards connected accounts, and payment intents accept transfer_data or application_fee_amount parameters to split funds. The Connect platform handles payouts to connected accounts on configurable schedules.

### Can I issue partial refunds with the Stripe API?

Yes. POST to /v1/refunds with the payment_intent or charge ID and an amount parameter less than the original charge. Multiple partial refunds can be issued against the same payment until the total reaches the original amount. Each refund includes a reason field (duplicate, fraudulent, or requested_by_customer).

### Can I limit what my agent is allowed to do with the Stripe API?

Yes. Because Jentic One is self-hosted and you set its rules, you choose exactly which Stripe operations your agent can call, so you can allow only what it needs, such as creating a payment intent or a Checkout session, and leave the rest of Stripe's surface out of the allowed set. Actions like issuing a refund or cancelling a subscription stay unavailable to the agent unless you explicitly add those operations. Your Stripe secret key is stored encrypted by your own instance and injected at execution time, so the agent acts only within the scope you granted and never sees the raw credential.
