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, analyticsReporting=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)
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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 655ad9699591f708c82315d96197306c3c5ee213ce46697d1063848c19fe039a |
|
MD5 | c3124429a5430a962e314cce63acb0fe |
|
BLAKE2b-256 | 70c0f6cf46edbfe450ad9a8ab7dc4a4a08148b1c6f16d82b03dcd1118afa3f8c |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0b0dae7b26ffec1eee1f90ebf4d267a982854e94a371d25158f87f63a93da1b |
|
MD5 | ee3f7fb4486c173e7690f5a3f30d62a5 |
|
BLAKE2b-256 | 0cb97a3c0994b83e8de9c1b58a1ddf3fcbdadd05f7382479328dc88ca7db08cf |