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"
)
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.43.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e4b524f8e231ef7be040cab2fd53c9ff88397e8f8f6fb059c505c3d6a74cfa |
|
MD5 | 93e3c45f75572eef35b750cfd5b2fda6 |
|
BLAKE2b-256 | 0d7a6833baab0c3b73bd68f8a3bfe5138738a4d5b2cb2d8d46ea1101ec79a787 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.43-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f09d86cca681cee974033a4b29838e2fb44b4d565b0ad536e13194dd9a0f7c4 |
|
MD5 | ff0f9e12609147b4a4da4be43d52c183 |
|
BLAKE2b-256 | 7c0482c868f9c1664a1ccaa5dafcf17a60bc6d44346b4928b8966d2b28c74936 |