tldr/pages/common/stripe.md

25 lines
604 B
Markdown
Raw Permalink Normal View History

2020-04-06 19:59:20 +01:00
# stripe
2020-04-16 04:19:45 +01:00
> Interact with a Stripe account.
2020-04-06 19:59:20 +01:00
> More information: <https://github.com/stripe/stripe-cli>.
2020-04-16 04:19:45 +01:00
- Follow the logs of activity on the account:
2020-04-06 19:59:20 +01:00
`stripe logs tail`
- Listen for events, filtering on events with the name `charge.succeeded` and forwarding them to localhost:3000/events:
`stripe listen --events="{{charge.succeeded}}" --forward-to="{{localhost:3000/events}}"`
- Send a test webhook event:
`stripe trigger {{charge.succeeded}}`
- Create a customer:
`stripe customers create --email="{{test@example.com}}" --name="{{Jenny Rosen}}"`
2020-04-16 04:19:45 +01:00
- Print to JSON:
2020-04-06 19:59:20 +01:00
2020-04-16 04:19:45 +01:00
`stripe listen --print-json`