跳到正文
TakoAPI
返回技能列表

stripe-payments

由 kjaylee 提供

Web & Frontend Development
—暂无评分
你的评分

简介

Best practices for Stripe payment integration.

描述

该技能的功能

Best practices guide for integrating Stripe payments into games and web apps. Covers CheckoutSessions, subscriptions via Billing API, embedded checkout, and multi-party payments with Connect. Includes a list of deprecated APIs to avoid.

Codifies which Stripe APIs are current versus deprecated, preventing teams from accidentally building on legacy endpoints like Charges or Sources.

何时使用

  • Adding a one-time purchase flow to a web game
  • Setting up monthly subscriptions for a SaaS app
  • Selling in-app items with metadata tracking
  • Building a marketplace that pays out to multiple developers
  • Accepting donations with Payment Links

示例工作流

输入

User asks: how do I add a $9.99 one-time purchase to my game

智能体
  1. 1

    Create a CheckoutSession on the server with mode set to 'payment'

  2. 2

    Define line_items using price_data with unit_amount in cents

  3. 3

    Set success_url and cancel_url pointing to game domain

  4. 4

    Return session.url to the client and redirect the user

  5. 5

    Verify payment via webhook signature on the server

输出

A working Stripe-hosted checkout flow for a one-time game purchase

前置要求

  • Stripe account
  • STRIPE_SECRET_KEY environment variable
  • Stripe webhook secret for signature verification

安装

clawhub install kjaylee/stripe-payments

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接