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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc71c5352947f38244c4a08340679b7533fd4b1f4f296c82294777830b487a11 |
|
MD5 | 26da05ea2bf6f0ad1bf264b124170cab |
|
BLAKE2b-256 | a722c3648d31baaa809623976a81f2fa72a90998ba5f5d73aad6372755f94d2a |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24ae6996ced7a78322ba52dbc2aff75ce85e48b96821d79f822730cd7c1fe44a |
|
MD5 | c784ed3121a9690a2a56b9e13fc3b7e2 |
|
BLAKE2b-256 | 40ba695c9067ebed385d9d1a3b07572800e0c17684baa89d7ba595cac4d38513 |