Create, update and delete stripe webhooks with your app deployment
Project description
@cloudcomponents/cdk-stripe-webhook
Create, update and delete stripe webhooks with your app deployment
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-stripe-webhook
Python:
pip install cloudcomponents.cdk-stripe-webhook
How to use
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from aws_cdk.aws_apigateway import RestApi
from cloudcomponents.cdk_stripe_webhook import StripeWebhook
class StripeWebhookStack(Stack):
def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection)
api = RestApi(self, "Endpoint")
api.root.add_method("POST")
secret_key = process.env.SECRET_KEY
events = ["charge.failed", "charge.succeeded"]
StripeWebhook(self, "StripeWebhook",
secret_key=secret_key,
url=api.url,
events=events,
log_level="debug"
)
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cloudcomponents.cdk-stripe-webhook-1.0.44.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060e2a775e970646d8c5433a0d02c854b210b36b11f56329678013255b0990fe |
|
MD5 | d8ee5d3059902c4ba9b68ba6e1bdc16a |
|
BLAKE2b-256 | f692ac5462cec8b42057b1b3ec245ca2b998118b3ea1d1ec3a3601cc8fb55b03 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.44-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fea22d626fbe536a8428046cfab3cc7b2481641e9012185e2184e864fb8e759b |
|
MD5 | 34fbea38cf30d79f728454b0071a2bde |
|
BLAKE2b-256 | a7f9e37196726cd7a1737f1b1fc33771eddd72b2c0b675d929b6c3e02cbb4300 |