stripe: add page (#3962)

client-spec/clarity
paulasjes-stripe 2020-04-07 02:59:20 +08:00 committed by GitHub
parent aa4c63951b
commit ccd220a1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 0 deletions

24
pages/common/stripe.md Normal file
View File

@ -0,0 +1,24 @@
# stripe
> Interact with your Stripe account.
> More information: <https://github.com/stripe/stripe-cli>.
- Log all activity on your account:
`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}}"`
- Print to JSON and use `jq` to parse events:
`stripe listen --print-json | jq .type`