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.48.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6a1175e971e99f85b20a49bc3cab453952c1bac4f5c09ba8b044cf19ff97c3 |
|
MD5 | b3b53b7e18d8094b9eeb95d3dae26dde |
|
BLAKE2b-256 | 34bcb06a799f8e7b613603688246c02f1c630ee01fada81e5d07a715f0982ff5 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.48-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db66505f18d69ca8d7e48a2fcd19aed75ed251e91bd2b4e3c07283a8dc0c522 |
|
MD5 | 1157bfcfc09519934ee5ba6594865851 |
|
BLAKE2b-256 | 9066ebb51131f64e5ec18c6e1c746537426d2f5b4405c65286a0d0c4889381d8 |