Files
tldr/pages.zh/common/stripe.md

24 lines
577 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Stripe
> 与 Stripe 账户互动。
> 更多信息:<https://docs.stripe.com/stripe-cli>。
- 跟踪账户上的活动日志:
`stripe logs tail`
- 监听事件,过滤名称为 `charge.succeeded` 的事件,并将其转发到 localhost:3000/events
`stripe listen --events="{{charge.succeeded}}" --forward-to="{{localhost:3000/events}}"`
- 发送测试 webhook 事件:
`stripe trigger {{charge.succeeded}}`
- 创建客户:
`stripe customers create --email="{{test@example.com}}" --name="{{Jenny Rosen}}"`
- 输出为 JSON
`stripe listen --print-json`